For every nilspace $\operatorname{X}$ and every $k\in\mathbb{N}$ the relation
$\sim_{k}$ is an equivalence relation.

###### Proof.

Suppose that $x,y,z\in\operatorname{X}$ satisfy $x\sim_{k}y$ and $y\sim_{k}z$.
By symmetry and Lemma 2.4, there exist
$\operatorname{c}_{0},\operatorname{c}_{1}\in\operatorname{C}^{k+1}(\operatorname{X})$
such that $\operatorname{c}_{0}(0^{k+1})=x,\operatorname{c}_{1}(0^{k+1})=z$
and $\operatorname{c}_{0}(v)=\operatorname{c}_{1}(v)=y$ for every $v\neq
0^{k+1}$. Therefore $x\sim_{k}z$. ∎

######  Example 2.6.

We pause to illustrate the relations $\sim_{k}$ for the main examples of
nilspaces from Chapter 1. Let $\operatorname{X}$ consist of a filtered group
$(G,G_{\bullet})$ with cube sets $\operatorname{C}^{n}(G_{\bullet})$, $n\geq
0$. Using Lemma 2.4 and composition with an automorphism of $\\{0,1\\}^{k+1}$
sending $0^{k+1}$ to $1^{k+1}$, we have that $x,y\in\operatorname{X}$ satisfy
$x\sim_{k}y$ if and only if the map $\operatorname{c}:\\{0,1\\}^{k+1}\to G$
with $\operatorname{c}(v)=x$ for $v\neq 1^{k+1}$ and
$\operatorname{c}(1^{k+1})=y$ is a cube in
$\operatorname{C}^{k+1}(G_{\bullet})$. Using the factorization of
$\operatorname{c}$ given by Lemma 2.5, we find that the coefficients $g_{i}$
in this factorization must be as follows: $g_{0}=x$, then
$g_{j}=\mathrm{id}_{G}$ for $0<j<2^{k+1}-1$, and then $g_{2^{k+1}-1}$ must
satisfy $x\,g_{2^{k+1}-1}=\operatorname{c}(1^{k+1})=y$. It follows that
$x\sim_{k}y$ if and only if there exists $g\in G_{k+1}$ such that $y=g\,x$.
Now if $\operatorname{X}$ is a quotient $G/\Gamma$ with the coset nilspace
structure described in Proposition 3.1, then two cosets $x\Gamma,y\Gamma$ in
$\operatorname{X}$ satisfy $x\Gamma\sim_{k}y\Gamma$ if and only if there is a
map $\gamma_{0}:\\{0,1\\}^{k+1}\to\Gamma$ and a cube
$\operatorname{c}\in\operatorname{C}^{n}(G_{\bullet})$ such that
$\operatorname{c}(v)=x\gamma_{0}(v)$ for $v\neq 1^{k+1}$ and
$\operatorname{c}(1^{k+1})=y\gamma_{0}(1^{k+1})$. Since
$\operatorname{c}^{\prime}:v\mapsto x^{-1}\operatorname{c}(v)$ is a cube and
$\operatorname{c}^{\prime}(v)=\gamma_{0}(v)$ for all $v\neq 1^{k+1}$, by the
completion axiom applied on $(\Gamma,\Gamma_{\bullet})$ we can find a cube
$\gamma\in\operatorname{C}^{k+1}(\Gamma_{\bullet})$ such that
$\gamma(v)=\gamma_{0}(v)$ for all $v\neq 1^{k+1}$. This can then be used to
show that in $G$ we have $x\sim_{k}y\gamma_{0}(1^{k+1})\gamma^{-1}(1^{k+1})$,
and so there exists $g\in G_{k+1}$ such that $y^{-1}gx\in\Gamma$. It follows
that the equivalence classes of $\sim_{k}$ are the orbits of the left action
of $G_{k+1}$ on $\operatorname{X}$.

Lemma 2.4, combined with cube automorphisms, tells us that $x\sim_{k}y$ if and
only if, given the $(k+1)$-cube $\operatorname{c}_{0}$ with constant value $x$
and any vertex $v$, we obtain a $(k+1)$-cube by modifying
$\operatorname{c}_{0}(v)$ from $x$ to $y$. The following lemma generalizes
this so that $\operatorname{c}_{0}$ need not be constant.

######  Lemma 2.7.

For $x,y\in\operatorname{X}$, we have $x\sim_{k}y$ if and only if for every
$u\in\\{0,1\\}^{k+1}$ and every
$\operatorname{c}_{0}\in\operatorname{C}^{k+1}(\operatorname{X})$ with
$\operatorname{c}_{0}(u)=x$, the map
$\operatorname{c}_{1}:\\{0,1\\}^{k+1}\to\operatorname{X}$,
$v\mapsto\;\left\\{\begin{array}[]{lr}\operatorname{c}_{0}(v),&v\neq u\\\
y,&v=u\end{array}\right.$ is in $\operatorname{C}^{k+1}(\operatorname{X})$.

###### Proof.

By composition with automorphisms, it suffices to prove the case $u=0^{k+1}$.
The ‘if’ direction is immediate from Lemma 2.4. For the converse, let
$\phi=f^{k+1}:T_{k+1}\to\\{0,1\\}^{k+1}$ where $f(-1)=0,f(0)=0,f(1)=1$. For
each subcube of $T_{k+1}$, with corresponding map
$\operatorname{\Psi}_{v}:\\{0,1\\}^{k+1}\to T_{k+1}$ as specified in (2),
there is a unique subset $S$ of $[k+1]$ of indices of coordinates that can be
negative for points in that subcube, namely
$S=\\{i\in[k+1]:v\scalebox{0.8}{$(i)$}=0\\}$. Note that $\phi$ is thus the
morphism that sends such a subcube to the lower face
$\\{v\in\\{0,1\\}^{k+1}:v\scalebox{0.8}{$(j)$}=0,\,\forall\,j\in S\\}$. In
particular, the morphism $\operatorname{c}_{0}\operatorname{\circ}\phi$ takes
the same values on the set of outer points of $T_{k+1}$ as
$\operatorname{c}_{0}$ does on $\\{0,1\\}^{k+1}$ (identifying these two sets
the natural way). Moreover, on the subcube corresponding to $S=[k+1]$, the map
$\operatorname{c}_{0}\operatorname{\circ}\phi$ is the constant $x$. By Lemma
2.4, if we change the value of
$\operatorname{c}_{0}\operatorname{\circ}\phi\big{(}(-1)^{k+1}\big{)}$ from
$x$ to $y$, then we still have a $(k+1)$-cube and so the resulting function
$T_{k+1}\to\operatorname{X}$ is still a morphism. The result now follows by
Lemma 1.16. ∎

By iterating this result, we deduce the following.

######  Corollary 2.8.

Let $k\in\mathbb{N}$ and let
$\operatorname{c}_{0}\in\operatorname{C}^{k+1}(\operatorname{X})$. If a
function $\operatorname{c}_{1}:\\{0,1\\}^{k+1}\to\operatorname{X}$ satisfies
$\operatorname{c}_{1}(v)\sim_{k}\operatorname{c}_{0}(v)$ for every
$v\in\\{0,1\\}^{k+1}$, then
$\operatorname{c}_{1}\in\operatorname{C}^{k+1}(\operatorname{X})$.

Another consequence is the following result generalizing Corollary 2.6.

######  Corollary 2.9.

Let $\operatorname{X}$ be a nilspace and let $k\in\mathbb{N}$. A cube
$\operatorname{c}\in\operatorname{C}^{n}(\operatorname{X}/\sim_{k})$ is
uniquely determined by its values on $\\{0,1\\}^{n}_{\leq k}$.

###### Proof.

We first check the case $n=k+1$. A cube in
$\operatorname{C}^{k+1}(\operatorname{X}/\sim_{k})$ is by definition of the
form $\pi_{k}\operatorname{\circ}\operatorname{c}$ for some
$\operatorname{c}\in\operatorname{C}^{k+1}(\operatorname{X})$. Suppose that
$\pi_{k}\operatorname{\circ}\operatorname{c}_{0}$ and
$\pi_{k}\operatorname{\circ}\operatorname{c}_{1}$ are two such cubes with the
same value at each $v\neq 1^{k+1}$. Then using Lemma 2.7 at each $v\neq
1^{k+1}$, we can modify $\operatorname{c}_{1}$ to a new cube
$\operatorname{c}_{2}$ having same values as $\operatorname{c}_{0}$ except at
$1^{k+1}$ where it is still $\operatorname{c}_{1}(1^{k+1})$. By Definition
2.3, we then have
$\operatorname{c}_{0}(1^{k+1})\sim_{k}\operatorname{c}_{1}(1^{k+1})$, so
$\pi_{k}\operatorname{\circ}\operatorname{c}_{0}=\pi_{k}\operatorname{\circ}\operatorname{c}_{1}$
as required. For $n>k+1$, one can use an argument by induction on $|v|$
similar to the one in the proof of Lemma 2.27 (using the case $k+1$ at each
step). ∎

######  Lemma 2.10.

Let $k\in\mathbb{N}$ and let $\operatorname{X}$ be a nilspace. Then
$\operatorname{X}/\sim_{k}$ with the quotient cubespace structure is a
$k$-step nilspace. We denote this factor of $\operatorname{X}$ by
$\operatorname{\mathcal{F}}_{k}(\operatorname{X})$, and $\pi_{k}$ denotes the
canonical projection
$\operatorname{X}\to\operatorname{\mathcal{F}}_{k}(\operatorname{X})$.

In particular we have that $\operatorname{X}$ is $k$-step if and only if
$\operatorname{X}=\operatorname{\mathcal{F}}_{k}(\operatorname{X})$.

###### Proof.

Note first that $\operatorname{\mathcal{F}}_{k}(\operatorname{X})$ inherits
ergodicity from $\operatorname{X}$. To see that
$\operatorname{\mathcal{F}}_{k}(\operatorname{X})$ satisfies the completion
axiom, let
$\operatorname{c}^{\prime}:\\{0,1\\}^{n}\setminus\\{1^{n}\\}\to\operatorname{\mathcal{F}}_{k}(\operatorname{X})$
be an $n$-corner. It follows from Corollary 2.8 that there exists a morphism
$\bar{f}$ from the simplicial cubespace $\\{0,1\\}^{n}_{\leq k+1}$ to
$\operatorname{X}$, such that $\pi_{k}\operatorname{\circ}\bar{f}$ equals
$\operatorname{c}^{\prime}$ on $\\{0,1\\}^{n}_{\leq k+1}$. By simplicial
completion (Lemma 1.5), $\bar{f}$ extends to a cube
$\bar{\operatorname{c}}:\\{0,1\\}^{n}\to\operatorname{X}$. The maps
$\pi_{k}\operatorname{\circ}\bar{\operatorname{c}}$ and
$\operatorname{c}^{\prime}$ are equal on $\\{0,1\\}^{n}_{\leq k+1}$. By
Corollary 2.9, this equality extends to all of
$\\{0,1\\}^{n}\setminus\\{1^{n}\\}$. Hence, the cube
$\operatorname{c}=\pi_{k}\operatorname{\circ}\bar{\operatorname{c}}$ completes
$\operatorname{c}^{\prime}$. Completion of $(k+1)$-corners is unique by
Corollary 2.9, so $\mathcal{F}_{k}(\operatorname{X})$ is a $k$-nilspace. ∎

The following useful result enables us to lift
$\mathcal{F}_{k}(\operatorname{X})$-valued morphisms to
$\mathcal{F}_{k+1}(\operatorname{X})$-valued ones.

######  Lemma 2.11 (Lifting a morphism).

Let $P$ be a subcubespace of $\\{0,1\\}^{n}$ with the extension property, let
$k\in\mathbb{N}$ and let $\operatorname{X}$ be a nilspace. Then every morphism
$f:P\to\operatorname{\mathcal{F}}_{k}(\operatorname{X})$ can be lifted to
$\operatorname{\mathcal{F}}_{k+1}(\operatorname{X})$, that is there exists a
morphism $f^{\prime}:P\to\operatorname{\mathcal{F}}_{k+1}(\operatorname{X})$
such that $\pi_{k}\operatorname{\circ}f^{\prime}=f$.

###### Proof.

Fix any $n\geq 0$. For $P=\\{0,1\\}^{n}$ the claim follows clearly from the
definition of $\operatorname{C}^{n}(\mathcal{F}_{k}(\operatorname{X}))$. For
$P$ a proper subset of $\\{0,1\\}^{n}$, we can first complete $f$ to a cube
$\operatorname{c}\in\operatorname{C}^{n}(\mathcal{F}_{k}(\operatorname{X}))$,
then lift $\operatorname{c}$ to a cube
$\bar{\operatorname{c}}\in\operatorname{C}^{n}(\mathcal{F}_{k+1}(\operatorname{X}))$,
then set $f^{\prime}=\bar{\operatorname{c}}|_{P}$. ∎

######  Remark 2.12.

Note that by combining Lemma 2.11 with Corollary 2.8 we have that if
$\operatorname{c}:\\{0,1\\}^{k+1}\to\operatorname{\mathcal{F}}_{k}(\operatorname{X})$
is a cube, then any lift of $\operatorname{c}$ given by the last lemma is also
a cube on $\operatorname{\mathcal{F}}_{k+1}(\operatorname{X})$. In particular,
for
$\operatorname{c}:\\{0,1\\}^{k+1}\to\operatorname{\mathcal{F}}_{k+1}(\operatorname{X})$
to be a cube it suffices to have $\pi_{k}\operatorname{\circ}\operatorname{c}$
being a cube on $\operatorname{\mathcal{F}}_{k}(\operatorname{X})$. For
instance if
$\operatorname{X}=\operatorname{\mathcal{F}}_{2}(\operatorname{X})$ is a
2-step nilpotent group $G$ (with lower central series), then this is saying
that a map $\\{0,1\\}^{2}\to G$ is a $2$-cube if and only if its projection to
the abelianization $G/[G,G]$ gives an additive quadruple (i.e. a quadruple
$(a_{00},a_{10},a_{01},a_{11})$ such that $a_{00}+a_{10}=a_{01}+a_{11}$).

######  Lemma 2.13.

Let $\operatorname{X}$ be a $k$-step nilspace and let $n\geq k+2$. A map
$\operatorname{c}:\\{0,1\\}^{n}\to\operatorname{X}$ is in
$\operatorname{C}^{n}(\operatorname{X})$ if and only if, for every
$(k+1)$-dimensional face $F\subset\\{0,1\\}^{n}$ containing some point $v$
with $v\scalebox{0.8}{$(n)$}=0$, the restriction
$\operatorname{c}\operatorname{\circ}\phi_{F}$ is in
$\operatorname{C}^{k+1}(\operatorname{X})$.

###### Proof.

The forward implication is clear, by the composition axiom. For the converse,
let $P=\\{0,1\\}^{n}_{\leq k}$, and note that this set is the union of the
$k$-dimensional lower faces of the $n$-cube. Any such face $F$ can be embedded
in some $(k+1)$-dimensional face, and the latter then contains $0^{n}$, so by
our assumption and composition we have that $\operatorname{c}|_{F}$ is a cube.
Hence $\operatorname{c}|_{P}$ is a morphism and so by Lemma 1.5 there exists
$\operatorname{c}^{\prime}$ in $\operatorname{C}^{n}(\operatorname{X})$ such
that $\operatorname{c}^{\prime}|_{P}=\operatorname{c}|_{P}$. We claim that
$\operatorname{c}=\operatorname{c}^{\prime}$. Let $t$ be the maximal integer
such that $\operatorname{c}=\operatorname{c}^{\prime}$ on $\\{0,1\\}^{n}_{\leq
t}$. Supposing for a contradiction that $t<n$, there is then
$w\in\\{0,1\\}^{n}_{t+1}$ such that
$\operatorname{c}^{\prime}(w)\neq\operatorname{c}(w)$. Since $t\geq k$, it
follows that we can find a $(k+1)$-face $F$ containing $w$, such that every
$v\in F\setminus\\{w\\}$ has $|v|\leq t$, and such that $F$ contains some
point $v$ with $v\scalebox{0.8}{$(n)$}=0$. (We can take $F$ to be the lower
face defined by $v\scalebox{0.8}{$(i)$}=w\scalebox{0.8}{$(i)$}$ for every
$i\in I$, where $I\subset[n]$ is the complement of the set of the last $k+1$
elements from $\operatorname{Supp}(w)$.) Now by our initial assumption we have
that $\operatorname{c}|_{F}\in\operatorname{C}^{k+1}(\operatorname{X})$, so by
the uniqueness of completion from $F\setminus\\{w\\}$ to $F$, we must have
$\operatorname{c}|_{F}=\operatorname{c}^{\prime}|_{F}$, contradicting the
maximality of $t$. ∎

####  2 $k$-fold ergodic nilspaces as degree-$k$ abelian torsors

Recall from Subsection 4 that the degree-$k$ structure
$\operatorname{\mathcal{D}}_{k}(\operatorname{Z})$ on an abelian group
$\operatorname{Z}$ is a $k$-fold ergodic nilspace. An important step towards
the general decomposition theorem is to show that all $k$-fold ergodic
$k$-step nilspaces arise this way. We have already checked the case $k=1$ of
this statement, in Proposition 4.1. Here we shall establish the general case.

######  Proposition 2.14.

Let $\operatorname{X}$ be a $k$-step, $k$-fold ergodic nilspace. Then there is
an abelian group $\operatorname{Z}$ such that $\operatorname{X}$ is isomorphic
to $\operatorname{\mathcal{D}}_{k}(\operatorname{Z})$.

In other words, we have that $\operatorname{X}$ is a principal homogeneous
space of $\operatorname{Z}$ and the cubes on $\operatorname{X}$ are the images
of the degree-$k$ cubes on $\operatorname{Z}$.

Examples of $k$-step $k$-fold ergodic nilspaces arise naturally when we
consider the equivalence classes of the relation $\sim_{k-1}$ on a $k$-step
coset nilspace $(G/\Gamma,G_{\bullet})$. Indeed, as was already mentioned in
Section 4, for such a nilspace the group
$\operatorname{Z}=G_{k}/(G_{k}\cap\Gamma)$ has a free action on $G/\Gamma$,
and combining this with the remarks in Example 2.6 one can see that each class
of $\sim_{k-1}$ is a principal homogeneous space of $\operatorname{Z}$; one
can then see that restricting the cube structure to any such class, one
obtains a $k$-fold ergodic $k$-step nilspace, which is precisely
$\operatorname{\mathcal{D}}_{k}(\operatorname{Z})$. The importance of
Proposition 2.14 lies in that it will enable us to recover a similar picture
concerning the equivalence classes of $\sim_{k-1}$ for a _general_ $k$-step
nilspace.

Note that by Lemma 1.24, if we fix an element $e\in\operatorname{X}$ and apply
$\partial_{e}$ to $\operatorname{X}$ repeatedly $k-1$ times, then the result
is a 1-step nilspace, so it is isomorphic (as a nilspace) to an affine abelian
group with the degree-$1$ structure. The proof of the proposition will
therefore consist in ‘integrating’ back $k-1$ times to obtain the desired
conclusion. To this end, we shall argue by induction on $k$, using the
following key fact.

######  Lemma 2.15.

Let $k\geq 2$ and suppose that Proposition 2.14 holds for $k-1$. Let
$\operatorname{X}$ be a $k$-fold ergodic $k$-nilspace, fix
$e\in\operatorname{X}$ and let $\operatorname{Z}$ be an abelian group such
that $\partial_{e}^{k-1}\operatorname{X}$ is isomorphic to
$\operatorname{\mathcal{D}}_{1}(\operatorname{Z})$. Then two elements
$x=(x_{0},x_{1})$, $y=(y_{0},y_{1})$ of
$\operatorname{X}\Join_{1}\operatorname{X}$ satisfy $x\sim_{k-1}y$ if and only
if $x_{0}-x_{1}=y_{0}-y_{1}$ in $\operatorname{Z}$.

###### Proof.

Let $\operatorname{Y}=\operatorname{X}\Join_{1}\operatorname{X}$. Let
$\operatorname{c}_{0},\operatorname{c}_{1}:\\{0,1\\}\to\operatorname{X}$ be
the maps defined by $\operatorname{c}_{0}(i)=x_{i}$,
$\operatorname{c}_{1}(i)=y_{i}$ for $i=0,1$. By definition of
$\operatorname{\mathcal{D}}_{1}(\operatorname{Z})$, we have
$x_{0}-x_{1}=y_{0}-y_{1}$ in $\operatorname{Z}$ if and only if the 1-arrow
$f_{0}=\langle\operatorname{c}_{0},\operatorname{c}_{1}\rangle_{1}$ is in
$\operatorname{C}^{2}(\operatorname{\mathcal{D}}_{1}(\operatorname{Z}))$. We
know that
$\operatorname{\mathcal{D}}_{1}(\operatorname{Z})\cong\partial_{e}^{k-1}\operatorname{X}$,
and so
$f_{0}\in\operatorname{C}^{2}(\operatorname{\mathcal{D}}_{1}(\operatorname{Z}))$
in turn means that the 2-arrow $\langle e,f_{0}\rangle_{1}$ is in
$\operatorname{C}^{3}(\partial^{k-2}_{e}\operatorname{X})$. This in turn means
that the 3-arrow $\langle e,\langle
e,f_{0}\rangle_{1}\rangle_{1}\in\operatorname{C}^{4}(\partial^{k-3}_{e}\operatorname{X})$,
and so on. Continuing like this, we conclude that $x_{0}-x_{1}=y_{0}-y_{1}$ if
and only if the $k$-arrow $f_{k-1}:=\langle e,\langle e,\ldots,\langle
e,f_{0}\rangle_{1}\rangle_{1}\cdots\rangle_{1}$ is in
$\operatorname{C}^{k+1}(\operatorname{X})$. Note that
$f_{k-1}(v)=f_{0}(v\scalebox{0.8}{$(1)$},v\scalebox{0.8}{$(2)$})$ if
$v\scalebox{0.8}{$(3)$}=\cdots=v\scalebox{0.8}{$(k+1)$}=1$, and $f_{k-1}(v)=e$
otherwise. We now claim that
$f_{k-1}\in\operatorname{C}^{k+1}(\operatorname{X})$ if and only if
$x\sim_{k-1}y$ in $\operatorname{Y}$.
Let $f:\\{0,1\\}^{k}\to\operatorname{X}\times\operatorname{X}$ be defined by
$f(v)=f_{k-1}(0,v\scalebox{0.8}{$(1)$},v\scalebox{0.8}{$(2)$},\dots,v\scalebox{0.8}{$(k)$})\times
f_{k-1}(1,v\scalebox{0.8}{$(1)$},v\scalebox{0.8}{$(2)$},\dots,v\scalebox{0.8}{$(k)$})$,
and note that $f(0,1,\dots,1)=x$, $f(1^{k})=y$, and $f(v)=(e,e)$ otherwise. We
also have $f_{k-1}\in\operatorname{C}^{k+1}(\operatorname{X})$ if and only if
$f\in\operatorname{C}^{k}(\operatorname{Y})$ (using (3) and cube
automorphisms). Since $\operatorname{Y}$ is a $k$-nilspace, by Remark 2.12 we
have $f\in\operatorname{C}^{k}(\operatorname{Y})$ if and only if
$\pi_{k-1}\operatorname{\circ}f\in\operatorname{C}^{k}(\operatorname{\mathcal{F}}_{k-1}(\operatorname{Y}))$.
Now, since $\operatorname{Y}$ is $(k-1)$-fold ergodic, so is the
$(k-1)$-nilspace $\operatorname{\mathcal{F}}_{k-1}(\operatorname{Y})$. Hence,
by our assumption, $\operatorname{\mathcal{F}}_{k-1}(\operatorname{Y})$ is
isomorphic to $\operatorname{\mathcal{D}}_{k-1}(\operatorname{Z}^{\prime})$
for some abelian group $\operatorname{Z}^{\prime}$. Therefore
$\pi_{k-1}\operatorname{\circ}f\in\operatorname{C}^{k}(\operatorname{\mathcal{F}}_{k-1}(\operatorname{Y}))$
if and only if
$\sigma_{k}(\pi_{k-1}\operatorname{\circ}f)=0_{\operatorname{Z}^{\prime}}$.
But given the form of $f$, this is equivalent to $\pi_{k-1}(x)=\pi_{k-1}(y)$,
as required. ∎

###### Proof of Proposition 2.14.

We argue by induction on $k$. The case $k=1$ is given by Proposition 4.1. Fix
$k\geq 2$, assume that the statement holds for $k-1$, fix an element
$e\in\operatorname{X}$, and suppose that $\operatorname{Z}$ is an abelian
group such that
$\partial_{e}^{k-1}\operatorname{X}=\mathcal{D}_{1}(\operatorname{Z})$. Our
aim is to show that for every $n\geq 0$ we have
$\operatorname{C}^{n}(\operatorname{X})=\operatorname{C}^{n}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}))$.
This holds trivially for $n\leq k$ since $\operatorname{X}=\operatorname{Z}$
as a set and $\operatorname{\mathcal{D}}_{k}(\operatorname{Z})$,
$\operatorname{X}$ are both $k$-fold ergodic. To prove the case $n=k+1$, first
we claim that if $\operatorname{c}\in\operatorname{C}^{k+1}(\operatorname{X})$
then adding an element $a\in\operatorname{Z}$ to the values of
$\operatorname{c}$ at two endpoints of an arbitrary 1-face in
$\\{0,1\\}^{k+1}$, we obtain another $(k+1)$-cube $\operatorname{c}^{\prime}$.
To see this, we assume without loss of generality that the values in question
are $\operatorname{c}(0^{k+1})=x_{0}$, $\operatorname{c}(0,\ldots,0,1)=x_{1}$.
Letting $\operatorname{Y}=\operatorname{X}\Join_{1}\operatorname{X}$, the map
$f:=\operatorname{c}(\cdot,0)\times\operatorname{c}(\cdot,1):\\{0,1\\}^{k}\to\operatorname{Y}$
is in $\operatorname{C}^{k}(\operatorname{Y})$, since
$\operatorname{c}\in\operatorname{C}^{k+1}(\operatorname{X})$. Moreover, $f$
takes the value $(x_{0},x_{1})$ at $0^{k}$. On the other hand, by Lemma 2.15
we have $(x_{0},x_{1})\sim_{k-1}(x_{0}+a,x_{1}+a)$. Therefore, letting
$f^{\prime}:\\{0,1\\}^{k}\to\operatorname{Y}$ take value $(x_{0}+a,x_{1}+a)$
at $0^{k}$ and $f(v)$ otherwise, by Corollary 2.8 we have
$f^{\prime}\in\operatorname{C}^{k}(\operatorname{Y})$. Hence the arrow
$\operatorname{c}^{\prime}=\langle
f^{\prime}(\cdot,0),f^{\prime}(\cdot,1)\rangle_{1}$ is in
$\operatorname{C}^{k+1}(\operatorname{X})$, which proves our claim.

Now, given any cube
$\operatorname{c}\in\operatorname{C}^{k+1}(\operatorname{X})$, by adding
appropriate elements of $\operatorname{Z}$ on 1-faces of the cube as above,
along a Hamiltonian path in the hypercube graph222The edges of this graph are
the 1-faces of $\\{0,1\\}^{k+1}$. on $\\{0,1\\}^{k+1}$, we obtain a cube
$\operatorname{c}^{\prime}$ taking value $e$ everywhere except perhaps at
$0^{k+1}$. But since the constant $e$ map is in
$\operatorname{C}^{k+1}(\operatorname{X})$, by uniqueness of completion we
must have in fact $\operatorname{c}^{\prime}(0^{k+1})=e$. Thus we have shown
that every $\operatorname{c}\in\operatorname{C}^{k+1}(\operatorname{X})$ is
reducible to a constant map by these 1-face modifications. Since constant maps
are in
$\operatorname{C}^{k+1}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}))$,
and these modifications conserve this cube set, it follows that
$\operatorname{C}^{k+1}(\operatorname{X})\subset\operatorname{C}^{k+1}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}))$.
Conversely, if
$\operatorname{c}\in\operatorname{C}^{k+1}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}))$,
then restricting $\operatorname{c}$ to any lower $k$-face in $\\{0,1\\}^{k+1}$
we obtain a cube in
$\operatorname{C}^{k}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}))=\operatorname{C}^{k}(\operatorname{X})$.
Therefore $\operatorname{c}$ restricted to
$\\{0,1\\}^{k+1}\setminus\\{1^{k+1}\\}$ gives a $(k+1)$-corner on
$\operatorname{X}$, which then has a completion
$\operatorname{c}^{\prime}\in\operatorname{C}^{k+1}(\operatorname{X})\subset\operatorname{C}^{k+1}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}))$.
Since completions are unique in the latter cube set, we must have
$\operatorname{c}^{\prime}=\operatorname{c}$. Hence
$\operatorname{C}^{k+1}(\operatorname{X})=\operatorname{C}^{k+1}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}))$.
We now deduce that
$\operatorname{C}^{n}(\operatorname{X})=\operatorname{C}^{n}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}))$
for every $n>k+1$, using Lemma 2.13. ∎

We close this section by using Proposition 2.14 to characterize equivalence
classes of $\sim_{k-1}$ in a $k$-step nilspace. It turns out that every such
class is a degree-$k$ abelian group.

######  Corollary 2.16.

Let $\operatorname{X}$ be a $k$-step nilspace and let $F$ be an equivalence
class of $\sim_{k-1}$ in $\operatorname{X}$. Then $F$ with the cubespace
structure restricted from $\operatorname{X}$ is isomorphic to
$\operatorname{\mathcal{D}}_{k}(\operatorname{Z})$ for some abelian group
$\operatorname{Z}$.

###### Proof.

By Proposition 2.14 it is enough to show that $F$ is a $k$-fold ergodic
$k$-nilspace. For every $x\in F$, the constant $x$ function on $\\{0,1\\}^{k}$
is in $\operatorname{C}^{k}(\operatorname{X})$ and so by Corollary 2.8 every
function $\\{0,1\\}^{k}\rightarrow F$ is in
$\operatorname{C}^{k}(\operatorname{X})$. To see that completion holds, let
$\operatorname{c}^{\prime}$ be an $n$-corner on $F$ with $n\geq k+1$. Since
$\operatorname{X}$ is a $k$-step nilspace, $\operatorname{c}^{\prime}$ has a
unique completion $\operatorname{c}\in\operatorname{C}^{n}(\operatorname{X})$.
But then $\pi_{k-1}\operatorname{\circ}\operatorname{c}^{\prime}$ is constant
and so $\pi_{k-1}\operatorname{\circ}\operatorname{c}$ must also be constant,
as this is the only completion of
$\pi_{k-1}\operatorname{\circ}\operatorname{c}^{\prime}$, whence
$\operatorname{c}$ is $F$-valued as required. ∎

####  3 Abelian bundles, and the bundle decomposition

In this section we shall establish a general decomposition theorem for
nilspaces, Theorem 2.19. This important result relies on the following basic
concept.

######  Definition 2.17 (Abelian bundle).

Let $\operatorname{Z}$ be an abelian group. An _abelian bundle_ over a set $S$
with structure group $\operatorname{Z}$ (or $\operatorname{Z}$-_bundle over_
$S$) is a set $\operatorname{B}$ with an action
$\alpha:\operatorname{Z}\times\operatorname{B}\to\operatorname{B}$,
$(z,x)\mapsto z+x$, and a map $\pi:\operatorname{B}\to S$ (called the _bundle
map_ or _projection_) satisfying the following properties:

1\. The action $\alpha$ is free: $\forall\,x\in\operatorname{B}$ we have
$\\{z\in\operatorname{Z}:z+x=x\\}=\\{0_{\operatorname{Z}}\\}$.

2\. The map $s\mapsto\pi^{-1}(s)$ is a bijection from $S$ to the set of orbits
of $\operatorname{Z}$ in $\operatorname{B}$.

A set $\operatorname{B}$ is a $k$-_fold abelian bundle_ with structure groups
$\operatorname{Z}_{1},\operatorname{Z}_{2},\ldots,\operatorname{Z}_{k}$ if
there is a sequence
$\operatorname{B}_{0},\operatorname{B}_{1},\ldots,\operatorname{B}_{k}=\operatorname{B}$
where $\operatorname{B}_{0}$ is a singleton and $\operatorname{B}_{i}$ is a
$\operatorname{Z}_{i}$-bundle over $\operatorname{B}_{i-1}$. We denote by
$\pi_{i+1,i}$ the bundle map $\operatorname{B}_{i+1}\to\operatorname{B}_{i}$.
More generally $\pi_{i,j}$ denotes the map
$\pi_{j+1,j}\operatorname{\circ}\pi_{j+2,j+1}\operatorname{\circ}\cdots\operatorname{\circ}\pi_{i,i-1}:\operatorname{B}_{i}\to\operatorname{B}_{j}$,
$i\geq j$. We write $\pi_{i}$ for $\pi_{k,i}$.

A _relative $k$-fold abelian bundle_ is a generalization of a $k$-fold abelian
bundle in which the ground set $\operatorname{B}_{0}$ can be an arbitrary set.

We shall often call the set $S$ the _base_ of the bundle. Note that it follows
from the second condition above that the action of $\operatorname{Z}$ is
transitive on each fibre of $\pi$, i.e. on each set $\pi^{-1}(s)$, $s\in S$.
Thus, an abelian bundle has the algebraic properties of a principal bundle
with abelian structure group $\operatorname{Z}$, without any topological
assumptions.

######  Definition 2.18.

A _degree- $k$ bundle_ is a cubespace $\operatorname{X}$ that is also a
$k$-fold abelian bundle, with factors
$\operatorname{B}_{0},\operatorname{B}_{1},\ldots,\operatorname{B}_{k}=\operatorname{X}$
and structure groups
$\operatorname{Z}_{1},\operatorname{Z}_{2},\ldots,\operatorname{Z}_{k}$, and
with the following property: for every integer $i\in[0,k-1]$ and every
$n\in\mathbb{N}$, we have
$\operatorname{C}^{n}(\operatorname{B}_{i})=\\{\pi_{i}\operatorname{\circ}\operatorname{c}:\operatorname{c}\in\operatorname{C}^{n}(\operatorname{X})\\}$,
and for every
$\operatorname{c}\in\operatorname{C}^{n}(\operatorname{B}_{i+1})$ we have

$\\{\operatorname{c}_{2}\in\operatorname{C}^{n}(\operatorname{B}_{i+1}):\pi_{i}\operatorname{\circ}\operatorname{c}=\pi_{i}\operatorname{\circ}\operatorname{c}_{2}\\}=\\{\operatorname{c}+\operatorname{c}_{3}:\operatorname{c}_{3}\in\operatorname{C}^{n}(\operatorname{\mathcal{D}}_{i+1}(\operatorname{Z}_{i+1}))\\}.$
(5)

Note that the condition
$\operatorname{c}_{3}\in\operatorname{C}^{n}(\operatorname{\mathcal{D}}_{j}(\operatorname{Z}_{j}))$
is satisfied for all maps
$\operatorname{c}_{3}\in\operatorname{Z}_{j}^{\\{0,1\\}^{n}}$ if $n\leq j$,
since $\operatorname{\mathcal{D}}_{j}(\operatorname{Z}_{j})$ is $j$-fold
ergodic.

We can now state the main result of this section.

######  Theorem 2.19.

Let $\operatorname{X}$ be a cubespace. Then $\operatorname{X}$ is a $k$-step
nilspace if and only if it is a degree-$k$ bundle. Moreover, we then have
$\operatorname{\mathcal{F}}_{i}(\operatorname{X})=\operatorname{B}_{i}$ for
every $i\in[k]$.

We split the proof into several results.

######  Lemma 2.20.

A degree-$k$ bundle $\operatorname{X}=\operatorname{B}_{k}$ is a $k$-nilspace.
Moreover, we have $\mathcal{F}_{i}(\operatorname{X})=\operatorname{B}_{i}$ for
every $i\in[k]$.

###### Proof.

Ergodicity can be shown to hold by induction on $k$. Indeed, a degree-$1$
bundle is an affine abelian group, so clearly ergodic. For $k>1$, given
$f=(x_{0},x_{1})\in\operatorname{X}^{\\{0,1\\}}$, the projection
$\pi_{k-1}\operatorname{\circ}f$ is in
$\operatorname{C}^{1}(\operatorname{B}_{k-1})$ by induction, then by
surjectivity there is
$\operatorname{c}\in\operatorname{C}^{1}(\operatorname{X})$ with
$\pi_{k-1}\operatorname{\circ}f=\pi_{k-1}\operatorname{\circ}\operatorname{c}$,
but then $f=\operatorname{c}+\operatorname{c}_{3}$ where
$\operatorname{c}_{3}\in\operatorname{Z}_{k}^{\\{0,1\\}}=\operatorname{C}^{1}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}_{k}))$,
so by (5) we have $f\in\operatorname{C}^{1}(\operatorname{B}_{k})$.
The completion axiom is also checked by induction. Completion is trivial on
$\operatorname{B}_{0}$ so suppose that $k>0$ and we have completion on any
degree-$(k-1)$ bundle. Let $\operatorname{c}^{\prime}$ be an $n$-corner on
$\operatorname{B}_{k}$. Then
$\pi_{k-1}\operatorname{\circ}\operatorname{c}^{\prime}$ has a completion
$\operatorname{c}_{1}\in\operatorname{C}^{n}(\operatorname{B}_{k-1})$. Since
$\operatorname{C}^{n}(\operatorname{B}_{k-1})=\pi_{k-1}(\operatorname{C}^{n}(\operatorname{X}))$,
there exists $\operatorname{c}_{2}\in\operatorname{C}^{n}(\operatorname{X})$
such that $\operatorname{c}_{1}=\pi\operatorname{\circ}\operatorname{c}_{2}$.
The map
$\operatorname{c}_{3}^{\prime}=\operatorname{c}^{\prime}-\operatorname{c}_{2}$
is an $n$-corner on $\operatorname{\mathcal{D}}_{k}(\operatorname{Z}_{k})$, so
it can be completed to an $n$-cube
$\operatorname{c}_{3}:\\{0,1\\}^{n}\to\operatorname{\mathcal{D}}_{k}(\operatorname{Z}_{k})$.
The cube $\operatorname{c}_{2}+\operatorname{c}_{3}$ completes
$\operatorname{c}^{\prime}$.
To check that
$\operatorname{\mathcal{F}}_{i}(\operatorname{X})=\operatorname{B}_{i}$ for
all $i\in[k]$, we can assume that $\operatorname{X}=\operatorname{B}_{i+1}$
and show that $\pi_{i}$ induces a bijection from the classes of $\sim_{i}$ to
the points of $\operatorname{B}_{i}$. Suppose first that $x\sim_{i}y$, i.e.
there exist
$\operatorname{c}_{0},\operatorname{c}_{1}\in\operatorname{C}^{i+1}(\operatorname{X})$
with $\operatorname{c}_{0}(1^{i+1})=x$, $\operatorname{c}_{1}(1^{i+1})=y$ and
$\operatorname{c}_{0}(v)=\operatorname{c}_{1}(v)$ otherwise. Then
$\pi_{i}\operatorname{\circ}\operatorname{c}_{0}$,
$\pi_{i}\operatorname{\circ}\operatorname{c}_{1}$ are both $(i+1)$-cubes on
the $i$-nilspace $\operatorname{B}_{i}$, and they complete the same
$(i+1)$-corner, whence $\pi_{i}(x)=\pi_{i}(y)$. Next, note that if
$\pi_{i}(x)=\pi_{i}(y)$ then there is $z\in\operatorname{Z}_{i+1}$ such that
$y=x+z$. The map $\operatorname{c}_{0}$ taking value $x$ everywhere on
$\\{0,1\\}^{i+1}$ is in $\operatorname{C}^{i+1}(\operatorname{B}_{i+1})$.
Letting $\operatorname{c}_{1}(v)=\operatorname{c}_{0}(v)$ for $v\neq 1^{i+1}$
and $\operatorname{c}_{1}(1^{i+1})=y$, we have
$\operatorname{c}_{1}=\operatorname{c}_{0}+\operatorname{c}_{3}$ where
$\operatorname{c}_{3}(1^{i+1})=z$ and
$\operatorname{c}_{3}(v)=0_{\operatorname{Z}_{i+1}}$ otherwise. Since
$\operatorname{\mathcal{D}}_{i+1}(\operatorname{Z}_{i+1})$ is $(i+1)$-fold
ergodic, we have
$\operatorname{c}_{3}\in\operatorname{C}^{i+1}(\operatorname{\mathcal{D}}_{i+1}(\operatorname{Z}_{i+1}))$,
whence $\operatorname{c}_{1}\in\operatorname{C}^{i+1}(\operatorname{X})$ by
(5), and so $x\sim_{i}y$. ∎

We now start with a $k$-step nilspace $\operatorname{X}$. By Corollary 2.16,
each equivalence class (or fibre) $F$ of $\sim_{k-1}$ is isomorphic to
$\operatorname{\mathcal{D}}_{k}(\operatorname{Z}_{F})$ for some abelian group
$\operatorname{Z}_{F}$. To complete the proof of Theorem 2.19, our task now is
to relate different fibres to identify a unique group $\operatorname{Z}_{k}$
acting on every fibre. To this end we shall use the following relation.

######  Definition 2.21.

Let $\operatorname{X}$ be a $k$-nilspace. Let
$M=\\{(x,y)\in\operatorname{X}^{2}:x\sim_{k-1}y\\}$. We define a relation
$\sim$ on $M$ by declaring that $(x_{0},y_{0})\sim(x_{1},y_{1})$ if
$(x_{0},x_{1})\sim_{k-1}(y_{0},y_{1})$ in
$\operatorname{Y}=\operatorname{X}\Join_{1}\operatorname{X}$.

Recall that in Lemma 2.15 we used this same relation, but restricted to a
degree-$k$ abelian group, which amounts here to a single fibre $F$. In that
case we could characterize this relation in terms of the group acting on the
fibre. In the present setting, we are working over all of $\operatorname{X}$.

######  Lemma 2.22.

Given $(x_{0},y_{0}),(x_{1},y_{1})\in M$, let
$f:\\{0,1\\}^{k+1}\to\operatorname{X}$ be defined by setting $f(\cdot,0)$
equal to $y_{0}$ at $0^{k}$ and $x_{0}$ elsewhere, and $f(\cdot,1)$ equal to
$y_{1}$ at $0^{k}$ and $x_{1}$ elsewhere. Then
$(x_{0},y_{0})\sim(x_{1},y_{1})$ if and only if
$f\in\operatorname{C}^{k+1}(\operatorname{X})$. The relation $\sim$ is an
equivalence relation on $M$.

###### Proof.

By Lemma 2.4, $(x_{0},x_{1})\sim_{k-1}(y_{0},y_{1})$ if and only if there is
$\operatorname{c}=\operatorname{c}_{0}\times\operatorname{c}_{1}\in\operatorname{C}^{k}(\operatorname{Y})$
such that $\operatorname{c}(0^{k})=(y_{0},y_{1})$ and
$\operatorname{c}(v)=(x_{0},x_{1})$ otherwise. Recall that
$\operatorname{c}\in\operatorname{C}^{k}(\operatorname{Y})$ means that the
arrow $\langle\operatorname{c}_{0},\operatorname{c}_{1}\rangle_{1}$ is in
$\operatorname{C}^{k+1}(\operatorname{X})$. Noting that
$\langle\operatorname{c}_{0},\operatorname{c}_{1}\rangle_{1}$ is the map $f$
in the lemma, the first claim follows. We have that $\sim$ is reflexive since
if $(x,y)$ is in $M$ then letting $\operatorname{c}_{0},\operatorname{c}_{1}$
both be the cube witnessing that $x\sim_{k-1}y$, we have
$f=\langle\operatorname{c}_{0},\operatorname{c}_{1}\rangle_{1}\in\operatorname{C}^{k+1}(\operatorname{X})$.
Symmetry is clear using automorphisms of cubes. Finally, to see transitivity,
note that if $(x_{0},y_{0})\sim(x_{1},y_{1})\sim(x_{2},y_{2})$ then the cube
$f_{1}$ for the first relation can be concatenated with the cube $f_{2}$ for
the second relation, yielding a cube $f$ showing that
$(x_{0},y_{0})\sim(x_{2},y_{2})$. ∎

######  Lemma 2.23.

Let $\operatorname{X}$ be a $k$-nilspace and let $F_{0},F_{1}$ be distinct
equivalence classes of $\sim_{k-1}$ on $\operatorname{X}$. For any
$x_{0},y_{0}\in F_{0}$ and $x_{1}\in F_{1}$, there exists a unique element
$y_{1}\in F_{1}$ such that $(x_{0},y_{0})\sim(x_{1},y_{1})$.

###### Proof.

First let us show that there exists a unique $y_{1}\in\operatorname{X}$ such
that $(x_{0},y_{0})\sim(x_{1},y_{1})$. It suffices to show that the map
$f^{\prime}$, obtained by restricting to
$\\{0,1\\}^{k+1}\setminus\\{(0^{k},1)\\}$ the 1-arrow $f$ from Lemma 2.22, is
a $(k+1)$-corner (modulo an automorphism), for then by completion on
$\operatorname{X}$ there exists a unique such $y_{1}$. To see that
$f^{\prime}$ is a $(k+1)$-corner, note that any of its $k$-face restrictions
is either a map $f_{1}$ equal to $y_{0}$ at $0^{k}$ and $x_{0}$ elsewhere in
$\\{0,1\\}^{k}$, or is a map $f_{2}$ equal to $x_{0}$ on one $(k-1)$-face and
$x_{1}$ on the opposite face. We have
$f_{1}\in\operatorname{C}^{k}(\operatorname{X})$ by Lemma 2.4, since
$x_{0}\sim_{k-1}y_{0}$. We have
$f_{2}\in\operatorname{C}^{k}(\operatorname{X})$ because
$f_{2}=f_{2}^{\prime}\operatorname{\circ}\phi$, where $f_{2}^{\prime}$ is the
1-cube $(x_{0},x_{1})$ and $\phi:\\{0,1\\}^{k}\to\\{0,1\\}$ is the morphism
projecting to some fixed coordinate. Hence there is indeed a unique $y_{1}$
completing $f^{\prime}$ to a cube $f$ of the form given in Lemma 2.22.
To see that $y_{1}\in F_{1}$, note that since
$\pi_{k-1}(x_{0})=\pi_{k-1}(y_{0})$, the $(k+1)$-corner
$\pi_{k-1}\operatorname{\circ}f^{\prime}$ is constant on the $k$-face
involving only $x_{0},y_{0}$. We can complete this to the cube that is the
constant $\pi_{k-1}(x_{1})$ on the opposite face. Since this completion is
unique, it must be the cube $\pi_{k-1}\operatorname{\circ}f$, so we must have
$\pi_{k-1}(y_{1})=\pi_{k-1}(x_{1})$. ∎

Recall that by Lemma 2.15, if $F$ is a fibre of $\sim_{k-1}$ and
$x_{0},x_{1},y_{0},y_{1}\in F$ then $(x_{0},y_{0})\sim(x_{1},y_{1})$ if and
only if $x_{0}-x_{1}=y_{0}-y_{1}$ in $\operatorname{Z}_{F}$. This means that
inside any fibre $F$ the elements of $\operatorname{Z}_{F}$ are in bijection
with the fibres of $\sim$, the bijection being well-defined by
$(x_{0},y_{0})\mapsto a=y_{0}-x_{0}\in\operatorname{Z}_{F}$. We now use this
fact to relate the groups of two distinct fibres of $\sim_{k-1}$.

######  Lemma 2.24.

Let $\operatorname{X}$ be a $k$-nilspace and let $F_{0},F_{1}$ be distinct
fibres of $\sim_{k-1}$. Define
$\vartheta:\operatorname{Z}_{F_{0}}\to\operatorname{Z}_{F_{1}}$ by

$\vartheta(a)=b\;\textrm{ if and only if
}\;(x_{0},x_{0}+a)\sim(x_{1},x_{1}+b)\;\textrm{ for some }\;x_{0}\in
F_{0},\;x_{1}\in F_{1}.$ (6)

Then $\vartheta$ is a group isomorphism.

###### Proof.

The map $\vartheta$ is well-defined, for if
$(x_{1}^{\prime},y_{1}^{\prime})\sim(x_{0},x_{0}+a)$ with $x_{1}^{\prime}\in
F_{1}$, then $y_{1}^{\prime}$ is also in $F_{1}$, and then by transitivity
$(x_{1},x_{1}+b)\sim(x_{1}^{\prime},y_{1}^{\prime})$, so
$y_{1}^{\prime}=x_{1}^{\prime}+b$. Moreover, $\vartheta$ is a bijection
because given $b\in\operatorname{Z}_{F_{1}}$ and any $x_{1}\in F_{1}$, for any
$x_{0}\in F_{0}$ there is a unique $y_{0}\in F_{0}$ such that
$(x_{0},y_{0})\sim(x_{1},x_{1}+b)$, but then $\vartheta(y_{0}-x_{0})=b$.
To see that $\vartheta$ is a homomorphism, let
$a,a^{\prime}\in\operatorname{Z}_{F_{0}}$, fix $x_{0}\in F_{0}$, let
$y_{0}=x_{0}+a$, $z_{0}=y_{0}+a^{\prime}$. Fix any $x_{1}\in F_{1}$ and let
$y_{1},z_{1}\in F_{1}$ be the unique elements given by Lemma 2.23 such that
$(x_{0},y_{0})\sim(x_{1},y_{1})$ and $(y_{0},z_{0})\sim(y_{1},z_{1})$. By
transitivity of $\sim_{k-1}$ we have $(x_{0},z_{0})\sim(x_{1},z_{1})$, and it
follows from the definitions that
$\vartheta(a+a^{\prime})=\vartheta(a)+\vartheta(a^{\prime})$. ∎

Thanks to these isomorphisms, we can now identify all the groups
$\operatorname{Z}_{F}$ and talk about a single abelian group
$\operatorname{Z}$ acting on every fibre $F$, sending $x\in F$ to $x+z\in F$
for each $z\in\operatorname{Z}$. Thus $\operatorname{Z}$ acts on all of
$\operatorname{X}$. The action is also free and transitive on each fibre.

We have thus shown that the given $k$-step nilspace $\operatorname{X}$ is a
$\operatorname{Z}$-bundle over $\mathcal{F}_{k-1}(\operatorname{X})$, with
bundle map the canonical projection $\pi_{k-1}$ for $\sim_{k-1}$. It remains
only to show that $\operatorname{X}$ is a degree-$k$ bundle.

######  Lemma 2.25.

The $\operatorname{Z}$-bundle $\operatorname{X}$ satisfies (5).

###### Proof.

First we claim that if
$\operatorname{c}\in\operatorname{C}^{k+1}(\operatorname{X})$ and we let any
$a\in\operatorname{Z}$ act on the values of $\operatorname{c}$ at the two
points of an arbitrary 1-face in $\\{0,1\\}^{k+1}$, then the resulting map
$\operatorname{c}^{\prime}$ is also in
$\operatorname{C}^{k+1}(\operatorname{X})$. To see this, note that without
loss we can suppose that the given 1-face is $0^{k+1},(1,0,\dots,0)$, and let
us denote the values of $\operatorname{c}$ at these points by $x$, $y$
respectively. We have $(x,x+a)\sim(y,y+a)$, which means that the corresponding
map $f:\\{0,1\\}^{k+1}\to\operatorname{X}$ from Lemma 2.22 is in
$\operatorname{C}^{k+1}(\operatorname{X})$. Let $\phi$ be the map
$T_{k+1}\to\\{0,1\\}^{k+1}$ used in the proof of Lemma 2.7. As noted there,
the morphism
$\operatorname{c}\operatorname{\circ}\phi:T_{k+1}\to\operatorname{X}$ agrees
with $\operatorname{c}$ on the outer points, and we also have that it has
constant value $x$ on the subcube $\\{-1,0\\}^{k+1}$. Note moreover that on
the subcube containing $(1,-1,\dots,-1)$ the map
$\operatorname{c}\operatorname{\circ}\phi$ is constantly $x$ on face
$v\scalebox{0.8}{$(1)$}=0$ and constantly $y$ on face
$v\scalebox{0.8}{$(1)$}=1$. Changing the values
$\operatorname{c}\operatorname{\circ}\phi(-1^{k+1})$ and
$\operatorname{c}\operatorname{\circ}\phi(0,-1,\dots,-1)$ both to $x+a$,
changing $\operatorname{c}\operatorname{\circ}\phi(1,-1,\dots,-1)$ to $y+a$,
and using the fact that $f\in\operatorname{C}^{k+1}(\operatorname{X})$, we see
that the resulting map is still a morphism $T_{k+1}\to\operatorname{X}$ and
that on the outer points it agrees with $\operatorname{c}^{\prime}$. The claim
now follows from Lemma 1.16.

Finally, this last claim enables us to show that (5) holds. For suppose that
$\operatorname{c}_{1},\operatorname{c}_{2}\in\operatorname{C}^{k+1}(\operatorname{X})$
have
$\pi_{k-1}\operatorname{\circ}\operatorname{c}_{1}=\pi_{k-1}\operatorname{\circ}\operatorname{c}_{2}$.
Then starting at any given $1$-face of $\\{0,1\\}^{k+1}$, we can add an
element from $\operatorname{Z}$ to the values of $\operatorname{c}_{2}$ at the
vertices of that face so as to obtain a new cube which agrees with
$\operatorname{c}_{1}$ at one of those vertices. Repeating this along a
Hamiltonian path of 1-faces on $\\{0,1\\}^{k+1}$, we can produce a new
$(k+1)$-cube $\operatorname{c}_{2}^{\prime}$ differing from
$\operatorname{c}_{1}$ at one vertex at most. Note also that we obtain
$\operatorname{c}_{2}^{\prime}$ by adding to $\operatorname{c}_{2}$ only
elements from
$\operatorname{C}^{k+1}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}))$, so
$\operatorname{c}_{2}^{\prime}=\operatorname{c}_{2}+\operatorname{c}_{3}$
where
$\operatorname{c}_{3}\in\operatorname{C}^{k+1}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}))$.
Moreover, we must then have
$\operatorname{c}_{2}^{\prime}=\operatorname{c}_{1}$, by uniqueness of
completion on $\operatorname{X}$. This shows that

$\\{\operatorname{c}_{2}\in\operatorname{C}^{k+1}(\operatorname{X}):\pi_{k-1}\operatorname{\circ}\operatorname{c}_{2}=\pi_{k-1}\operatorname{\circ}\operatorname{c}_{1}\\}\subset\\{\operatorname{c}_{1}+\operatorname{c}_{3}:\operatorname{c}_{3}\in\operatorname{C}^{k+1}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}))\\}.$

The opposite inclusion follows similarly, modifying
$\operatorname{c}_{1}\in\operatorname{C}^{k+1}(\operatorname{X})$ into
$\operatorname{c}_{1}+\operatorname{c}_{3}$ along 1-faces, showing thus that
$\operatorname{c}_{1}+\operatorname{c}_{3}\in\operatorname{C}^{k+1}(\operatorname{X})$.
The resulting equality then extends to all
$\operatorname{C}^{n}(\operatorname{X})$ with $n>k+1$, essentially by Lemma
2.13 (and we had the equality also for $n<k+1$ by induction). ∎

The proof of Theorem 2.19 is now complete.

######  Definition 2.26.

Let $\operatorname{X}$ be a $k$-step nilspace, let $F_{0},F_{1}$ be two fibres
of $\sim_{k-1}$, and let $x_{0}\in F_{0}$, $x_{1}\in F_{1}$. We define the
_local translation_ corresponding to $x_{0},x_{1}$ to be the map
$\phi_{x_{0},x_{1}}$ sending each $y_{0}\in F_{0}$ to the unique $y_{1}\in
F_{1}$ such that $(x_{0},y_{0})\sim(x_{1},y_{1})$, that is the unique $y_{1}$
completing the corner
$\operatorname{c}^{\prime}:\\{0,1\\}^{k+1}\setminus\\{1^{k+1}\\}\to\operatorname{X}$
defined by $\operatorname{c}^{\prime}(v,0)=x_{0}$ for $v\neq 1^{k}$,
$\operatorname{c}^{\prime}(1^{k},0)=y_{0}$ and
$\operatorname{c}^{\prime}(v,1)=x_{1}$ for $v\neq 1^{k}$.

####  4 Translations on a $k$-step nilspace form a filtered group of degree
$k$

Given any subset $F$ of $\\{0,1\\}^{n}$ and any map
$\alpha:\operatorname{X}\to\operatorname{X}$, we define the map

$\alpha^{F}:\operatorname{X}^{\\{0,1\\}^{n}}\to\operatorname{X}^{\\{0,1\\}^{n}},\quad\alpha^{F}(f):v\mapsto\left\\{\begin{array}[]{lr}\alpha(f(v)),&v\in
F\\\ f(v),&v\not\in F\end{array}\right..$

######  Definition 2.27 (Translations).

Let $\operatorname{X}$ be a nilspace and let $i$ be a positive integer. A map
$\alpha:\operatorname{X}\to\operatorname{X}$ is a _translation of height_ $i$
on $\operatorname{X}$ (or _$i$ -translation_) if for every $n\geq i$ and every
face $F\subset\\{0,1\\}^{n}$ of codimension $i$, the map $\alpha^{F}$ is cube-
preserving, that is for every
$\operatorname{c}\in\operatorname{C}^{n}(\operatorname{X})$ we have
$\alpha^{F}(\operatorname{c})\in\operatorname{C}^{n}(\operatorname{X})$. We
denote the set of translations of height $i$ by
$\operatorname{\Theta}_{i}(\operatorname{X})$.

Using discrete-cube automorphisms, we see that in order for $\alpha$ to be an
$i$-translation it suffices to have $\alpha^{F}$ being cube-preserving for
_some_ face $F$ of codimension $i$. Note also that
$\operatorname{\Theta}_{i}(\operatorname{X})\supset\operatorname{\Theta}_{j}(\operatorname{X})$
for any $i\leq j$. We shall often write simply
$\operatorname{\Theta}(\operatorname{X})$ for
$\operatorname{\Theta}_{1}(\operatorname{X})$, and refer to translations of
height 1 simply as translations.

These translations were introduced by Host and Kra in [11, 12], where they
were studied in relation to parallelepiped structures and shown to form a
nilpotent group. Analogously, in this subsection we treat the following main
result.

######  Proposition 2.28.

Let $\operatorname{X}$ be a $k$-step nilspace. Then
$\operatorname{\Theta}(\operatorname{X})$ is a group and
$(\operatorname{\Theta}_{i}(\operatorname{X}))_{i\geq 0}$ is a filtration of
degree at most $k$. (We set
$\operatorname{\Theta}_{0}(\operatorname{X})=\operatorname{\Theta}_{1}(\operatorname{X})=\operatorname{\Theta}(\operatorname{X})$.)

We refer to $\operatorname{\Theta}(\operatorname{X})$ as the _translation
group_ of $\operatorname{X}$. Before we turn to the proof of Proposition 2.28,
let us collect some basic observations about translations, which will also
help to gain intuition about them. We begin with simple examples using the
nilspaces from Chapter 1.

######  Example 2.29.

Let $(G,G_{\bullet})$ be a filtered group of degree $k$, let $\Gamma$ be a
subgroup of $G$, and let $\operatorname{X}$ be the corresponding $k$-step
coset nilspace $G/\Gamma$ with cube sets
$\operatorname{C}^{n}(\operatorname{X})=\\{\pi_{\Gamma}\operatorname{\circ}\operatorname{c}:\operatorname{c}\in\operatorname{C}^{n}(G_{\bullet})\\}$.
Let $i\in[k]$, $g\in G_{i}$, and let
$\alpha:\operatorname{X}\to\operatorname{X}$ be the map
$x\Gamma\mapsto(gx)\Gamma$. Then
$\alpha\in\operatorname{\Theta}_{i}(\operatorname{X})$. To see this, note that
for any $n$-cube $\pi_{\Gamma}\operatorname{\circ}\operatorname{c}$ on
$\operatorname{X}$ and any face $F$ of codimension $i$ in $\\{0,1\\}^{n}$, we
have
$\alpha^{F}(\pi_{\Gamma}\operatorname{\circ}\operatorname{c})=\pi_{\Gamma}\operatorname{\circ}(g^{F}\operatorname{c})$,
where $g^{F}\operatorname{c}$ is the pointwise-multiplication map
$\\{0,1\\}^{n}\to G$, $v\mapsto g^{F}(v)\operatorname{c}(v)$. By the
definition and group property of $\operatorname{C}^{n}(G_{\bullet})$, we have
$g^{F}\operatorname{c}\in\operatorname{C}^{n}(G_{\bullet})$. Hence
$\alpha^{F}(\pi_{\Gamma}\operatorname{\circ}\operatorname{c})\in\operatorname{C}^{n}(\operatorname{X})$,
and so indeed $\alpha\in\operatorname{\Theta}_{i}(\operatorname{X})$.

The following result describes some basic general properties of translations.

######  Lemma 2.30.

Let $\operatorname{X}$ be a nilspace. Then every translation on
$\operatorname{X}$ is a nilspace morphism
$\operatorname{X}\to\operatorname{X}$. Furthermore, for each $i\geq 1$ we have

$\forall\,\alpha\in\operatorname{\Theta}(\operatorname{X}),\;\;\textrm{ if
}\;x,y\in\operatorname{X}\;\textrm{satisfy }\;x\sim_{i}y,\;\textrm{then
}\alpha(x)\sim_{i}\alpha(y),$ (7)

and we also have

$\alpha\in\operatorname{\Theta}_{i}(\operatorname{X})\;\;\Rightarrow\;\;\forall\,x\in\operatorname{X},\;\alpha(x)\sim_{i-1}x.$
(8)

###### Proof.

To see that every $\alpha\in\operatorname{\Theta}(\operatorname{X})$ is a
morphism, note that given any cube
$\operatorname{c}\in\operatorname{C}^{n}(\operatorname{X})$, the map
$\alpha\operatorname{\circ}\operatorname{c}$ can be written as the composition
$\alpha^{F}\operatorname{\circ}\alpha^{F^{\prime}}(\operatorname{c})$ for two
opposite faces $F,F^{\prime}$ of codimension 1, so
$\alpha\operatorname{\circ}\operatorname{c}\in\operatorname{C}^{n}(\operatorname{X})$
as required.

To see (7), recall that by Lemma 2.4 we have $x\sim_{i}y$ if and only if there
is $\operatorname{c}\in\operatorname{C}^{i+1}(\operatorname{X})$ such that
$\operatorname{c}(1^{i+1})=y$ and $\operatorname{c}(v)=x$ otherwise. Now given
$\alpha\in\operatorname{\Theta}(\operatorname{X})$, for this cube
$\operatorname{c}$ we have by the previous paragraph that
$\alpha\operatorname{\circ}\operatorname{c}\in\operatorname{C}^{i+1}(\operatorname{X})$,
and therefore $\alpha(x)\sim_{i}\alpha(y)$.

To see (8), note that letting $\operatorname{c}$ denote the constant
$i$-dimensional cube with value $x$, and letting $\operatorname{c}^{\prime}$
denote the map $\\{0,1\\}^{i}\to\operatorname{X}$ such that
$\operatorname{c}^{\prime}(v)=\operatorname{c}(v)=x$ for $v\neq 0^{i}$ and
$\operatorname{c}^{\prime}(0^{i})=\alpha(x)$, we have by the definition of
$i$-translations that $\operatorname{c}^{\prime}$ is also in
$\operatorname{C}^{i}(\operatorname{X})$, so by the fact recalled above we
have $\alpha(x)\sim_{i-1}x$. ∎

Thus, translations of height $i$ leave the equivalence classes of $\sim_{i-1}$
in $\operatorname{X}$ globally invariant, and, more generally, translations
conserve all the equivalence relations $\sim_{j}$. When $\operatorname{X}$ is
a $k$-step nilspace, we can deduce the following fact, relating translations
to the notion of _local_ translation from Definition 2.26.

######  Lemma 2.31.

Let $\operatorname{X}$ be a $k$-step nilspace. Then for every
$\alpha\in\operatorname{\Theta}(\operatorname{X})$ and $x\in\operatorname{X}$,
the restriction of $\alpha$ to the class of $\sim_{k-1}$ containing $x$ is the
local translation $\phi_{x,\alpha(x)}$.

###### Proof.

Suppose that $y\sim_{k-1}x$, so that there exists
$\operatorname{c}\in\operatorname{C}^{k}(\operatorname{X})$ such that
$\operatorname{c}(1^{k})=y$ and $\operatorname{c}(v)=x$ otherwise. Consider
the corner
$\operatorname{c}^{\prime}:\\{0,1\\}^{k+1}\setminus\\{1^{k+1}\\}\to\operatorname{X}$
defined by letting the restriction of $\operatorname{c}^{\prime}$ to
$\\{v\scalebox{0.8}{$(k)$}=0\\}$ be equal to $\operatorname{c}$ and the
restriction of $\operatorname{c}^{\prime}$ to
$\\{v\scalebox{0.8}{$(k)$}=1\\}\setminus\\{1^{k}\\}$ be equal to
$\alpha(\operatorname{c})$. Then since the arrow
$\langle\operatorname{c},\alpha\operatorname{\circ}\operatorname{c}\rangle_{1}$
is a $(k+1)$-cube, the unique way to complete $\operatorname{c}^{\prime}$ is
to set the value at $1^{k+1}$ equal to $\alpha(y)$. This means that, letting
$\sim$ denote the relation from Definigion 2.21, we have
$(x,y)\sim(\alpha(x),\alpha(y))$. Hence, setting $y=x+a$, we must have
$\alpha(y)=\alpha(x)+a$, and so by Definition 2.26 the result follows. ∎

Let us turn to the proof of Proposition 2.28. Our first step towards this
result is the following lemma relating
$\operatorname{\Theta}_{i}(\operatorname{X})$ to the $i$-th arrow space
$\operatorname{X}\Join_{i}\operatorname{X}$ (recall Definition 1.19). Note
that if $\alpha\in\operatorname{\Theta}(\operatorname{X})$ then for every cube
$\operatorname{c}\in\operatorname{C}^{n}(\operatorname{X})$ the map
$\\{0,1\\}^{n+1}\to\operatorname{X}$ consisting of $\operatorname{c}$ and
$\alpha\operatorname{\circ}\operatorname{c}$ on opposite faces is a cube. The
converse holds as well. The resulting characterization generalizes to
translations of any height, as follows.

######  Lemma 2.32.

For $i\geq 1$, a map $\alpha:\operatorname{X}\to\operatorname{X}$ is in
$\operatorname{\Theta}_{i}(\operatorname{X})$ if and only if the map
$h_{\alpha}:\operatorname{X}\to\operatorname{X}\times\operatorname{X}$ defined
by $h_{\alpha}(x)=(x,\alpha(x))$ is a morphism into
$\operatorname{X}\Join_{i}\operatorname{X}$. In other words, we have
$\alpha\in\operatorname{\Theta}_{i}(\operatorname{X})$ if and only if for
every $\operatorname{c}\in\operatorname{C}^{n}(\operatorname{X})$ the
$i$-arrow
$\langle\operatorname{c},\alpha\operatorname{\circ}\operatorname{c}\rangle_{i}$
is in $\operatorname{C}^{n+i}(\operatorname{X})$.

###### Proof.

If $\alpha\in\operatorname{\Theta}_{i}(\operatorname{X})$, and
$\operatorname{c}\in\operatorname{C}^{n}(\operatorname{X})$, then
$\langle\operatorname{c},\alpha\operatorname{\circ}\operatorname{c}\rangle_{i}(v,w)=\alpha^{F}(\operatorname{c}^{\prime})(v,w)$,
where $F$ is the face of $\\{0,1\\}^{n+i}$ defined by $w=1^{i}$ (so
$\operatorname{codim}(F)=i$) and $\operatorname{c}^{\prime}$ is the
$(n+i)$-cube $\operatorname{c}\operatorname{\circ}\phi$ where
$\phi:\\{0,1\\}^{n+i}\to\\{0,1\\}^{n}$ is the morphism $(v,w)\mapsto v$. Hence
$\langle\operatorname{c},\alpha\operatorname{\circ}\operatorname{c}\rangle_{i}$
is an $(n+i)$-cube on $\operatorname{X}$ as required.
For the converse, suppose that $h_{\alpha}$ is a morphism into
$\operatorname{X}\Join_{i}\operatorname{X}$. Given $n\geq i$, let $F_{0}$
denote the face
$\\{v\in\\{0,1\\}^{n}:v\scalebox{0.8}{$(j)$}=1\;\;\forall\,j\in[n-i+1,n]\\}$
of codimension $i$, and let
$\operatorname{c}\in\operatorname{C}^{n}(\operatorname{X})$. We want to show
that $\alpha^{F_{0}}(\operatorname{c})$ is also in
$\operatorname{C}^{n}(\operatorname{X})$. Let $Q$ be the product cubespace
$\\{0,1\\}^{n-i}\times T_{i}$ where $T_{i}$ is the $i$-dimensional tricube.
Let $f_{1}$ be the identity on $\\{0,1\\}$ and $f_{2}$ be the function with
$f_{2}(-1)=0,f_{2}(0)=1,f_{2}(1)=1$. Let $f=f_{1}^{n-i}\times
f_{2}^{i}:Q\to\\{0,1\\}^{n}$. This is a surjective morphism with two useful
properties: firstly, the $n$-dimensional subcube of $Q$ containing $1^{n}$
(i.e. $\\{0,1\\}^{n}$ viewed as a subcube of $Q$) is mapped by $f$ onto the
face $F_{0}$ (as $f_{2}$ is constantly $1^{i}$ on $\\{0,1\\}^{i}$); secondly,
letting $\mathrm{id}$ denote the identity map on $\\{0,1\\}^{n-i}$ and
$\omega_{i}$ the outer-point map $\\{0,1\\}^{i}\to\\{-1,1\\}^{i}$ (recall
Definition 1.15), we have
$\operatorname{c}\operatorname{\circ}f\operatorname{\circ}\,(\mathrm{id}\times\omega_{i})=\operatorname{c}$.
Now let $g=\operatorname{c}\operatorname{\circ}f$, and let
$g^{\prime}:Q\to\operatorname{X}$ be the map obtained from $g$ by applying
$\alpha$ to the values of $g$ on $\\{0,1\\}^{n-i}\times\\{1^{i}\\}$. Then
$g^{\prime}\operatorname{\circ}\,(\mathrm{id}\times\omega_{i})=\alpha^{F_{0}}(\operatorname{c})$.
Therefore, to show that
$\alpha^{F_{0}}(\operatorname{c})\in\operatorname{C}^{n}(\operatorname{X})$ it
suffices to show that $g^{\prime}$ is a morphism from $Q$ to
$\operatorname{X}$.
To show this, note first that $g:Q\to\operatorname{X}$ is already a morphism
(using Lemma 1.16 and the product structure on $Q$). Given any cube (or
morphism) $\tilde{\operatorname{c}}:\\{0,1\\}^{m}\to Q$, we want to show that
$g^{\prime}\operatorname{\circ}\tilde{\operatorname{c}}\in\operatorname{C}^{m}(\operatorname{X})$.
Now $\tilde{\operatorname{c}}=\operatorname{c}_{0}\times\operatorname{c}_{1}$
where $\operatorname{c}_{0}$ is a cube $\\{0,1\\}^{m}\to\\{0,1\\}^{n-i}$ and
$\operatorname{c}_{1}$ is a cube $\\{0,1\\}^{m}\to T_{i}$. If
$\operatorname{c}_{1}$ is one of the cubes on $T_{i}$ not having $1^{i}$ in
its image, then
$g^{\prime}\operatorname{\circ}\tilde{\operatorname{c}}=g\operatorname{\circ}\tilde{\operatorname{c}}$
is indeed a cube on $\operatorname{X}$ (since $g$ is a morphism). If
$\operatorname{c}_{1}$ is the cube on $T_{i}$ with $1^{i}$ in its image, then
by Definition 1.13 we have
$\tilde{\operatorname{c}}=\operatorname{c}_{0}\times(\operatorname{\Psi}_{1^{i}}\operatorname{\circ}\phi)$
for some morphism $\phi:\\{0,1\\}^{m}\to\\{0,1\\}^{i}$. The preimage under
$\tilde{\operatorname{c}}$ of $\\{0,1\\}^{n-i}\times\\{1^{i}\\}$ is a face
$F\subset\\{0,1\\}^{m}$ of codimension $i$, which we can suppose without loss
of generality to be the face with last $i$ components equal to 1. Moreover, by
definition of $f$ the map $g\operatorname{\circ}\tilde{\operatorname{c}}$
gives the same cube
$\operatorname{c}^{\prime}:\\{0,1\\}^{m-i}\to\operatorname{X}$ when restricted
to each of the other faces
$\tilde{\operatorname{c}}^{-1}(\\{0,1\\}^{n-i}\times\\{w\\})$, for each
$w\in\\{0,1\\}^{i}\setminus\\{1^{i}\\}$. It follows that
$g^{\prime}\operatorname{\circ}\tilde{\operatorname{c}}=\langle\operatorname{c}^{\prime},\alpha\operatorname{\circ}\operatorname{c}^{\prime}\rangle_{i}$,
which is a cube by our assumption on $h_{\alpha}$, so we are done. ∎

Next, we show that if $\operatorname{X}$ is a $k$-step nilspace then the cube-
preserving property for
$h_{\alpha}:\operatorname{X}\to\operatorname{X}\Join_{i}\operatorname{X}$
needs to be checked only for $(k+1)$-cubes.

######  Lemma 2.33.

Let $\operatorname{X}$ be a $k$-step nilspace. A map
$\alpha:\operatorname{X}\to\operatorname{X}$ is in
$\operatorname{\Theta}_{i}(\operatorname{X})$ if and only if for every
$\operatorname{c}\in\operatorname{C}^{k+1}(\operatorname{X})$ we have
$\langle\operatorname{c},\alpha\operatorname{\circ}\operatorname{c}\rangle_{i}\in\operatorname{C}^{k+1+i}(\operatorname{X})$.

###### Proof.

By Lemma 2.32 it suffices to check that given any
$\operatorname{c}\in\operatorname{C}^{n}(\operatorname{X})$ we have
$\operatorname{c}^{\prime}=\operatorname{c}\times(\alpha\operatorname{\circ}\operatorname{c})\in\operatorname{C}^{n}(\operatorname{X}\Join_{i}\operatorname{X})$.
By Lemma 2.13 it suffices to check that any restriction of
$\operatorname{c}^{\prime}$ to a $(k+1)$-dimensional face $F$ containing some
$v$ with $v\scalebox{0.8}{$(k+1)$}=0$ is a $(k+1)$-cube. Now any such
restriction is of the form
$\operatorname{c}_{0}\times(\alpha\operatorname{\circ}\operatorname{c}_{0})$,
where $\operatorname{c}_{0}\in\operatorname{C}^{k+1}(\operatorname{X})$ is the
restriction of $\operatorname{c}$ to $F$. This restriction is in
$\operatorname{C}^{k+1}(\operatorname{X}\Join_{i}\operatorname{X})$ by
definition if
$\langle\operatorname{c}_{0},\alpha\operatorname{\circ}\operatorname{c}_{0}\rangle_{i}\in\operatorname{C}^{k+1+i}(\operatorname{X})$,
which is the case by our assumption. ∎

We can now establish the first main claim of Proposition 2.28.

######  Lemma 2.34.

Let $\operatorname{X}$ be a $k$-step nilspace. Then
$\operatorname{\Theta}_{i}(\operatorname{X})$ is a group for every $i\geq 1$.

Since every translation in $\operatorname{\Theta}(\operatorname{X})$ is a
nilspace morphism from $\operatorname{X}$ to itself, with Lemma 2.34 we then
have that $\operatorname{\Theta}(\operatorname{X})$ is a subgroup of the group
$\operatorname{Aut}(\operatorname{X})$ of nilspace automorphisms of
$\operatorname{X}$.

###### Proof.

It is clear that composition of two elements of
$\operatorname{\Theta}_{i}(\operatorname{X})$ is still in
$\operatorname{\Theta}_{i}(\operatorname{X})$, so we just need to check
invertibility.
First we show, by induction on $k$, that any translation is an invertible map.
For $k=1$ this is clear since in this case a translation is just addition of
some fixed group-element. Now suppose that invertibility holds for $k-1$ and
let $\alpha$ be a translation on $\operatorname{X}$. By Lemma 2.31, $\alpha$
preserves the classes of $\sim_{k-1}$, so $\alpha$ induces a well-defined map
on $\mathcal{F}_{k-1}(\operatorname{X})$, namely
$\pi_{k-1}(x)\mapsto\pi_{k-1}\operatorname{\circ}\alpha(x)$. We denote this
map by $h(\alpha)$. If $\operatorname{c}^{\prime}$ is an $n$-cube on
$\mathcal{F}_{k-1}(\operatorname{X})$ and $F$ is a face of codimension 1, then
letting $\operatorname{c}\in\operatorname{C}^{n}(\operatorname{X})$ satisfy
$\pi_{k-1}\operatorname{\circ}\operatorname{c}=\operatorname{c}^{\prime}$, we
have $\alpha^{F}(\operatorname{c})\in\operatorname{C}^{n}(\operatorname{X})$,
so
$h(\alpha)^{F}(\operatorname{c}^{\prime})=\pi_{k-1}\operatorname{\circ}\alpha^{F}(\operatorname{c})$
is in $\operatorname{C}^{n}(\mathcal{F}_{k-1}(\operatorname{X}))$, hence
$h(\alpha)$ is a translation on $\mathcal{F}_{k-1}(\operatorname{X})$. By
induction, this has an inverse $h(\alpha)^{-1}$. Now fix any
$y\in\operatorname{X}$ and let $F_{2}$ denote the $\sim_{k-1}$ class
containing $y$. Let $F_{1}$ denote the class mapped onto $F_{2}$ by $\alpha$,
namely $F_{1}=\pi_{k-1}^{-1}\big{(}h(\alpha)^{-1}\pi_{k-1}(y)\big{)}$. Since
$h(\alpha)$ is bijective, any $x$ satisfying $\alpha(x)=y$ must lie in
$F_{1}$. Lemma 2.31 implies that $\alpha$ is a bijection from $F_{1}$ to
$F_{2}$, so there must be a unique such $x$ in $F_{1}$.

Finally, note that the inverse of an $i$-translation $\alpha$ is an
$i$-translation. This can be shown by induction on $i$. For $i>1$, let $F$ be
the face
$\\{v\in\\{0,1\\}^{n}:v\scalebox{0.8}{$(j)$}=1,\;\forall\,j\in[n-i+1,n]\\}$.
It suffices to show that ${\alpha^{-1}}^{F}$ is cube-preserving. By inclusion-
exclusion the indicator-function $1_{F}$ on $\\{0,1\\}^{n}$ can be written as
a linear combination $1_{F}=\sum_{j}\lambda_{j}1_{F_{j}}$ where
$\lambda_{j}\in\\{-1,1\\}$ and $F_{j}$ are faces of codimension at most $i-1$.
Each map ${\alpha^{-1}}^{F_{j}}$ is cube-preserving, by induction, and so
their composition ${\alpha^{-1}}^{F}$ is also cube-preserving. ∎

Note that the map $h$ in the above proof is a homomorphism from
$\operatorname{\Theta}(\operatorname{X})$ to
$\operatorname{\Theta}(\operatorname{\mathcal{F}}_{k-1}(\operatorname{X}))$.
We can now establish the filtration property.

######  Lemma 2.35.

For every $i,j\geq 1$ we have
$[\operatorname{\Theta}_{i}(\operatorname{X}),\operatorname{\Theta}_{j}(\operatorname{X})]\subset\operatorname{\Theta}_{i+j}(\operatorname{X})$.

(Note that setting
$\operatorname{\Theta}_{0}(\operatorname{X})=\operatorname{\Theta}_{1}(\operatorname{X})$
the lemma then holds for all $i,j\geq 0$.)

###### Proof.

Let $\alpha_{1}$ be in $\operatorname{\Theta}_{i}(\operatorname{X})$ and
$\alpha_{2}\in\operatorname{\Theta}_{j}(\operatorname{X})$. Let $F$ be a face
in $\\{0,1\\}^{n}$ of codimension $i+j$, thus $F$ is defined by a choice of
$i+j$ coordinates that are each fixed to be 0 or 1. We can write $F=F_{1}\cap
F_{2}$ where $F_{1}$ is a face of codimension $i$ and $F_{2}$ is a face of
codimension $j$. We then have
$[\alpha_{1}^{F_{1}},\alpha_{2}^{F_{2}}]={\alpha_{1}^{F_{1}}}^{-1}{\alpha_{2}^{F_{2}}}^{-1}\alpha_{1}^{F_{1}}\alpha_{2}^{F_{2}}=[\alpha_{1},\alpha_{2}]^{F}$.
Therefore, for every
$\operatorname{c}\in\operatorname{C}^{n}(\operatorname{X})$ we have
$[\alpha_{1},\alpha_{2}]^{F}(\operatorname{c})\in\operatorname{C}^{n}(\operatorname{X})$
and so
$[\alpha_{1},\alpha_{2}]^{F}\in\operatorname{\Theta}_{i+j}(\operatorname{X})$.
∎

######  Corollary 2.36.

If $\operatorname{X}$ is a $k$-step nilspace then
$(\operatorname{\Theta}_{i}(\operatorname{X}))_{i\geq 0}$ is a filtration of
degree $k$.

###### Proof.

The group $\operatorname{\Theta}_{k+1}(\operatorname{X})$ consists of maps
$\alpha:\operatorname{X}\to\operatorname{X}$ such that given
$\operatorname{c}\in\operatorname{C}^{k+1}(\operatorname{X})$ and the
$(k+1)$-codimensional face $F=\\{1^{k+1}\\}$ we have
$\alpha^{F}(\operatorname{c})\in\operatorname{C}^{k+1}(\operatorname{X})$. For
every $x\in\operatorname{X}$, the cube
$\operatorname{c}\in\operatorname{C}^{k+1}(\operatorname{X})$ with constant
value $x$ is the unique completion of the restriction of
$\alpha^{F}(\operatorname{c})$ to $\\{0,1\\}^{k+1}\setminus F$, so we must
have $\alpha(x)=x$. Hence $\alpha$ is the identity. ∎

This completes the proof of Proposition 2.28.

We conclude this subsection with a few additional remarks on translation
groups.

Firstly, one may wonder whether there is a simple relationship between the
groups $\operatorname{\Theta}_{i}(\operatorname{X})$ and the groups
$\operatorname{Z}_{i}$ describing the bundle structure of $\operatorname{X}$.
For general $k$-step nilspaces, it is not hard to establish such a relation in
the case of the group $\operatorname{\Theta}_{k}(\operatorname{X})$.

######  Lemma 2.37.

Let $\operatorname{X}$ be a $k$-step nilspace. Let $\tau$ denote the map
sending $z\in\operatorname{Z}_{k}$ to the map
$\tau_{z}:\operatorname{X}\to\operatorname{X}$, $x\mapsto x+z$. Then we have
$\operatorname{\Theta}_{k}(\operatorname{X})=\tau(\operatorname{Z}_{k})$.

###### Proof.

To see that
$\operatorname{\Theta}_{k}(\operatorname{X})\subset\tau(\operatorname{Z}_{k})$,
note first that if $\alpha\in\operatorname{\Theta}_{k}(\operatorname{X})$ then
by (8) we have $\alpha(x)\sim_{k-1}x$ for all $x\in\operatorname{X}$. Combined
with Lemma 2.31, this implies that for each fibre $\pi_{k-1}^{-1}(y)$,
$y\in\operatorname{X}_{k-1}$, there exists $z_{y}\in\operatorname{Z}_{k}$ such
that on this fibre $\alpha$ is the map $x\mapsto x+z_{y}$ . Now if
$y,y^{\prime}$ are distinct points in $\operatorname{X}_{k-1}$ then for any
$x,x^{\prime}$ in the fibres $\pi_{k-1}^{-1}(y)$, $\pi_{k-1}^{-1}(y^{\prime})$
respectively, note that the map
$\operatorname{c}:\\{0,1\\}^{k+1}\to\operatorname{X}$ with
$\operatorname{c}(\cdot,0)=x$ and $\operatorname{c}(\cdot,1)=x^{\prime}$ is in
$\operatorname{C}^{k+1}(\operatorname{X})$ (by the ergodicity and composition
axioms). The map $\operatorname{c}^{\prime}$ obtained from $\operatorname{c}$
by changing $\operatorname{c}(0^{k+1})$ to $x+z_{y}$ and
$\operatorname{c}(0^{k},1)$ to $x^{\prime}+z_{y^{\prime}}$ is still a cube,
since it is $\alpha^{F}(\operatorname{c})$ for the $k$-codimensional face
$F=\\{0^{k+1},(0^{k},1)\\}$. Then, since
$\pi_{k-1}\operatorname{\circ}\operatorname{c}=\pi_{k-1}\operatorname{\circ}\operatorname{c}^{\prime}$,
we must have $z_{y}=z_{y^{\prime}}$ (since $\operatorname{X}$ is a degree-$k$
bundle and so $\sigma_{k+1}(\operatorname{c}-\operatorname{c}^{\prime})=0$).
Hence $\alpha\in\tau(\operatorname{Z}_{k})$. To see that
$\tau(\operatorname{Z}_{k})\subset\operatorname{\Theta}_{k}(\operatorname{X})$,
note that if $\alpha=\tau(z)$, then for every
$\operatorname{c}\in\operatorname{C}^{k+1}(\operatorname{X})$ we have the
$k$-arrow identity
$\langle\operatorname{c},\alpha\operatorname{\circ}\operatorname{c}\rangle_{k}=\langle\operatorname{c},\operatorname{c}\rangle_{k}+\langle
0,z\rangle_{k}$. This is in $\operatorname{C}^{2k+1}(\operatorname{X})$, by
(5), because
$\langle\operatorname{c},\operatorname{c}\rangle_{k}\in\operatorname{C}^{2k+1}(\operatorname{X})$
and $\langle
0,z\rangle_{k}\in\operatorname{C}^{2k+1}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}_{k}))$.
Hence $\alpha\in\operatorname{\Theta}_{k}(\operatorname{X})$ by Lemma 2.32. ∎

For general nilspaces the relationship between other translation groups and
structure groups is less easy to describe. In the topological part of the
theory, we shall be able to give such a description under some natural
topological assumptions (see [2, Proposition 2.9.20]).

A second remark is that one may distinguish, among all cubes on a nilspace,
those that arise from the action of the translation groups, in the following
sense.

######  Definition 2.38.

Two cubes
$\operatorname{c}_{1},\operatorname{c}_{2}\in\operatorname{C}^{n}(\operatorname{X})$
are _translation equivalent_ if there are translations
$\alpha_{1}\in\operatorname{\Theta}_{i_{1}}(\operatorname{X}),\ldots,\alpha_{\ell}\in\operatorname{\Theta}_{i_{\ell}}(\operatorname{X})$,
and a face $F_{j}$ of codimension $i_{j}$ for each $j\in[\ell]$, such that
$\operatorname{c}_{2}=\alpha_{\ell}^{F_{\ell}}\cdots\alpha_{1}^{F_{1}}(\operatorname{c}_{1})$.
A cube is called a _translation cube_ if it is translation equivalent to a
constant cube.

In other words, letting $G=\operatorname{\Theta}(\operatorname{X})$ and
$G_{\bullet}$ be the filtration with
$G_{i}=\operatorname{\Theta}_{i}(\operatorname{X})$, we have by Definition 2.3
that
$\operatorname{c}_{1},\operatorname{c}_{2}\in\operatorname{C}^{n}(\operatorname{X})$
are translation equivalent if and only if there is
$\operatorname{c}\in\operatorname{C}^{n}(G_{\bullet})$ such that
$\operatorname{c}_{2}(v)=\operatorname{c}(v)(\operatorname{c}_{1}(v))$ for all
$v\in\\{0,1\\}^{n}$.

######  Remark 2.39.

As indicated in Section 4, all the examples of nilspaces $\operatorname{X}$
seen up to that section have the property that all cubes on $\operatorname{X}$
are translation cubes. This is not the case for a general nilspace. Indeed, it
follows from the ergodicity axiom that if every cube on $\operatorname{X}$ is
a translation cube then the action of
$\operatorname{\Theta}(\operatorname{X})$ on $\operatorname{X}$ is transitive.
There are examples of nilspaces for which this transitivity does not hold, see
[12, Example 6].

In the remainder of this chapter we gather additional algebraic tools. Apart
from the valuable information that these tools can provide on a nilspace, they
are also very useful in the topological part of the theory.

###  3 Additional tools

####  1 Nilspace morphisms as bundle morphisms

Theorem 2.19 describes a $k$-step nilspace as a degree-$k$ bundle. In light of
this, it is natural to ask for a description of how a morphism between two
$k$-nilspaces relates the bundle structures. The first result of this section,
Proposition 3.2, provides such a description. To formulate it we need the
following concept.

######  Definition 3.1 (Bundle morphism).

Let $\operatorname{B}$ and $\operatorname{B}^{\prime}$ be two $k$-fold abelian
bundles with factors $\operatorname{B}_{i},\operatorname{B}^{\prime}_{i}$
($i\in[0,k]$), structure groups
$\operatorname{Z}_{i},\operatorname{Z}_{i}^{\prime}$ and projections
$\pi_{i},\pi_{i}^{\prime}$ ($i\in[k]$). A _bundle morphism_ from
$\operatorname{B}$ to $\operatorname{B}^{\prime}$ is a map
$\psi:\operatorname{B}\rightarrow\operatorname{B}^{\prime}$ satisfying the
following properties:

  1. (i)

For every $i\in[k]$, if $\pi_{i}(x)=\pi_{i}(y)$ then
$\pi_{i}(\psi(x))=\pi_{i}(\psi(y))$. Thus $\psi$ induces well defined maps
$\psi_{i}:\operatorname{B}_{i}\rightarrow\operatorname{B}^{\prime}_{i}$.

  2. (ii)

For every $i\in[k]$ there is a map
$\alpha_{i}:\operatorname{Z}_{i}\rightarrow\operatorname{Z}_{i}^{\prime}$ such
that for every $x\in\operatorname{B}_{i}$ and $a\in\operatorname{Z}_{i}$ we
have $\psi_{i}(x+a)=\psi_{i}(x)+\alpha_{i}(a)$.

The maps $\alpha_{i}$ are called the _structure morphisms_ of $\psi$. We say
that $\psi$ is _totally surjective_ if all its structure morphisms are
surjective.

Note that the condition required of the maps $\alpha_{i}$ implies that they
are group homomorphisms.

######  Proposition 3.2.

Let $\operatorname{X},\operatorname{X}^{\prime}$ be $k$-step nilspaces. Then a
nilspace morphism $\operatorname{X}\to\operatorname{X}^{\prime}$ is a bundle
morphism between the corresponding $k$-degree bundles.

###### Proof.

Condition (i) from Definition 3.1 holds, for if $x\sim_{i}y$ then there is an
$(i+1)$-cube $\operatorname{c}$ equal to $x$ everywhere except at one vertex
where it equals $y$, and then $\psi\operatorname{\circ}\operatorname{c}$ is a
cube equal to $\psi(x)$ everywhere except at one vertex where it equals
$\psi(y)$, so $\psi(x)\sim_{i}\psi(y)$.

For condition (ii), we first consider the case where $\operatorname{X}$ and
$\operatorname{X}^{\prime}$ are $i$-fold ergodic and therefore degree-$i$
abelian torsors (by Proposition 2.14). By Lemma 1.24 and Proposition 4.1, if
we fix $x\in\operatorname{X}$ and apply $\partial_{x}^{i-1}$ and
$\partial_{\psi_{i}(x)}^{i-1}$ to $\operatorname{X},\operatorname{X}^{\prime}$
respectively, the resulting nilspaces are isomorphic to
$\operatorname{\mathcal{D}}_{1}(\operatorname{Z}_{i}),\operatorname{\mathcal{D}}_{1}(\operatorname{Z}_{i}^{\prime})$
respectively, for some abelian groups
$\operatorname{Z}_{i},\operatorname{Z}_{i}^{\prime}$. Since $\psi_{i}$
preserves cubes, it follows that it is an affine homomorphism between the
torsors $\operatorname{X},\operatorname{X}^{\prime}$, which means that there
is a homomorphism
$\alpha:\operatorname{Z}_{i}\to\operatorname{Z}^{\prime}_{i}$ such that for
each $x\in\operatorname{X}$ we have $\psi_{i}(x+a)-\psi_{i}(x)=\alpha(a)$.

Now every equivalence class $F$ of $\sim_{i-1}$ in $\operatorname{B}_{i}$ is
isomorphic to such a degree-$i$ abelian torsor
$\operatorname{\mathcal{D}}_{i}(\operatorname{Z}_{i})$ and so $\psi_{i}$
restricted to $F$ satisfies $\psi_{i}(x+a)=\psi_{i}(x)+\alpha_{F}(a)$, for
some homomorphism
$\alpha_{F}:\operatorname{Z}_{i}\to\operatorname{Z}_{i}^{\prime}$ which could
depend on $F$. We claim that $\alpha_{F}$ is in fact independent of $F$,
modulo the isomorphism from Lemma 2.24. Indeed, if $F_{1},F_{2}$ are two
classes in $\operatorname{X}$ and we have $(x,x+a)\sim(y,y+a)$ (where $\sim$
is the relation from Definition 2.21, so $(x,y)\sim_{i-1}(x+a,y+a)$ in
$\operatorname{X}\Join_{1}\operatorname{X}$), then since $\sim$ is defined in
terms of cubes this relation is preserved by $\psi_{i}$, so we have
$(\psi_{i}(x),\psi_{i}(x)+\alpha_{F_{1}}(a))\sim(\psi_{i}(y),\psi_{i}(y)+\alpha_{F_{2}}(a))$,
which implies that $\alpha_{F_{1}}(a)$ and $\alpha_{F_{2}}(a)$ are indeed
identified by the isomorphism from Lemma 2.24. ∎

Recall from Definition 2.17 the notation $\pi_{i,j}$ for the projection
$\operatorname{B}_{i}\to\operatorname{B}_{j}$, $i\geq j$.

######  Definition 3.3 (Sub-bundle).

Let $\operatorname{B}$ be a $k$-fold abelian bundle with factors
$\operatorname{B}_{0},\operatorname{B}_{1},\dots,\operatorname{B}_{k}=\operatorname{B}$,
structure groups
$\operatorname{Z}_{1},\operatorname{Z}_{2},\dots,\operatorname{Z}_{k}$, and
projections $\pi_{1},\pi_{2},\dots,\pi_{k}$. A _sub-bundle_ of
$\operatorname{B}$ is a $k$-fold abelian bundle $\operatorname{B}^{\prime}$
with factors
$\operatorname{B}^{\prime}_{0}=\operatorname{B}_{0},\operatorname{B}^{\prime}_{1}\subseteq\operatorname{B}_{1},\ldots,\operatorname{B}_{k}^{\prime}\subseteq\operatorname{B}_{k}$,
structure groups $\operatorname{Z}_{i}^{\prime}\leq\operatorname{Z}_{i}$,
$i\in[k]$, and with each projection $\pi_{i,i-1}^{\prime}$ being the
restriction of $\pi_{i,i-1}$ to $\operatorname{B}_{i}^{\prime}$ and satisfying
the following condition: for every $x\in\operatorname{B}_{i}^{\prime}$ we have
${\pi^{\prime}}^{\,-1}_{i,i-1}(\pi_{i,i-1}^{\prime}(x))=x+\operatorname{Z}_{i}^{\prime}$,
equivalently
$\\{z\in\operatorname{Z}_{i}:x+z\in\operatorname{B}_{i}^{\prime}\\}=\operatorname{Z}_{i}^{\prime}$.

In particular, if $k=1$ then a sub-bundle is an orbit of
$\operatorname{Z}_{1}^{\prime}$ inside a principal homogeneous space of
$\operatorname{Z}_{1}$.

Given a bundle morphism $\psi:\operatorname{B}\to\operatorname{B}^{\prime}$,
we shall now define a certain relative abelian bundle on
$\operatorname{B}^{\prime}$ that generalizes in a natural way the concept of
the kernel of a homomorphism between abelian groups. Let us first discuss
briefly the intuition that leads to this definition.
Given abelian groups $\operatorname{Z},\operatorname{Z}^{\prime}$ and a
surjective homomorphism $\psi:\operatorname{Z}\to\operatorname{Z}^{\prime}$,
the kernel $\ker\psi$ is the preimage $\psi^{-1}(\\{0\\})$, and
$\operatorname{Z}$ is the disjoint union of cosets of $\ker\psi$, these cosets
being the preimages $\psi^{-1}(t)$, $t\in\operatorname{Z}^{\prime}$. We can
thus view $\operatorname{Z}$ as an abelian bundle over
$\operatorname{Z}^{\prime}$ with structure group $\ker\psi$. When we consider
more generally a bundle morphism
$\psi:\operatorname{B}\to\operatorname{B}^{\prime}$, defining the kernel of
$\psi$ as the preimage of a single point as in the abelian case is not clear
since typically there is no distinguished point on $\operatorname{B}^{\prime}$
playing the role of $0_{\operatorname{Z}^{\prime}}$. However, one can still
view $\operatorname{B}$ as a _relative_ bundle with base
$\operatorname{B}^{\prime}$ (recall Definition 2.17), and then restrict this
bundle structure to each preimage $\psi^{-1}(t)$,
$t\in\operatorname{B}^{\prime}$, to obtain coherent bundle structures on these
preimages. This is what we shall establish formally in the next two lemmas.
(Recall from Definition 3.1 the induced maps $\psi_{i}$ and the structure
morphisms $\alpha_{i}$.)

######  Definition 3.4 (Kernel of a bundle morphism).

Let $\operatorname{B},\operatorname{B}^{\prime}$ be $k$-fold abelian bundles,
and let $\psi:\operatorname{B}\to\operatorname{B}^{\prime}$ be a totally
surjective bundle morphism. The _kernel_ of $\psi$ is the relative $k$-fold
abelian bundle denoted by $K$, with structure groups
$\\{\ker(\alpha_{i})\\}_{i=1}^{k}$, defined as follows. First, for each
$i\in[k]$ we define
$K_{i}=\\{(x,y)\in\operatorname{B}_{i}\times\operatorname{B}^{\prime}:\psi_{i}(x)=\pi_{i}(y)\\}$.
We then define, for each $i\in[k]$, an action of $\ker(\alpha_{i})$ on $K_{i}$
by $(x,y)+a=(x+a,y)$. Finally, the projection $\pi_{i}:K_{j}\to K_{i}$ is
defined by $\pi_{i}(x,y)=(\pi_{i}(x),y)$ for $j\geq i$.

Note that we can identify $K=K_{k}$ with $\operatorname{B}_{k}$ using the
bijection $(x,y)\leftrightarrow x$, and $K_{0}$ can be identified with
$\operatorname{B}^{\prime}$ using the bijection $(x,y)\leftrightarrow y$.
These bijections enable us to identify $\pi_{0}:K\to K_{0}$ with
$\psi:\operatorname{B}\to\operatorname{B}^{\prime}$.
Let us confirm that this definition makes $K$ a relative abelian bundle.

######  Lemma 3.5.

For each $i\in[k]$, $K_{i}$ is a $\ker(\alpha_{i})$-bundle over $K_{i-1}$ with
bundle map $\pi_{i-1}$.

###### Proof.

First we check that $\pi_{i-1}$ is surjective. Let $(x,y)\in K_{i-1}$, so
$\psi_{i-1}(x)=\pi_{i-1}(y)$. Let $z\in\operatorname{B}_{i}$ be such that
$\pi_{i-1}(z)=x$. We have
$\pi_{i-1}(\psi_{i}(z))=\psi_{i-1}(\pi_{i-1}(z))=\psi_{i-1}(x)=\pi_{i-1}(y)$,
so there exists $a^{\prime}\in\operatorname{Z}_{i}^{\prime}$ such that
$\psi_{i}(z)+a^{\prime}=\pi_{i}(y)$. Since $\alpha_{i}$ is surjective by
assumption, there is $a\in\operatorname{Z}_{i}$ with
$\alpha_{i}(a)=a^{\prime}$. Then the pair $(z+a,y)$ is in $K_{i}$ and maps to
$(x,y)$ under $\pi_{i-1}$.

Clearly $\ker(\alpha_{i})\subset\operatorname{Z}_{i}$ acts freely on $K_{i}$,
so it remains to check that it acts transitively on the fibres of $\pi_{i-1}$.
Let $(x_{1},y)$ and $(x_{2},y)$ be any elements in the same fibre of
$\pi_{i-1}:K_{i}\to K_{i-1}$. Since $\pi_{i-1}(x_{1})=\pi_{i-1}(x_{2})$ there
is $a\in\operatorname{Z}_{i}$ with $x_{1}=x_{2}+a$. Then
$\pi_{i}(y)=\psi_{i}(x_{1})=\psi_{i}(x_{2}+a)=\psi_{i}(x_{2})+\alpha_{i}(a)=\pi_{i}(y)+\alpha_{i}(a)$,
whence $a\in\ker(\alpha_{i})$. ∎

With the bijections $K\leftrightarrow\operatorname{B}$ and
$K_{0}\leftrightarrow\operatorname{B}^{\prime}$ described above, we can thus
view $\operatorname{B}$ as a bundle over $\operatorname{B}^{\prime}$. Note
that no set $K_{i}$ is contained in $\operatorname{B}_{i}$, we just have a map
$(x,y)\mapsto x$ from $K_{i}$ to $\operatorname{B}_{i}$. Now a key fact is
that, while this map is not a bijection, if we fix a single
$t\in\operatorname{B}^{\prime}$ then the map restricts to a bijection
identifying the set $\\{(x,y)\in K_{i}:y=t\\}$ with
$\psi_{i}^{-1}(\pi_{i}(t))$. From this it follows promptly that $\psi^{-1}(t)$
has a $k$-fold abelian-bundle structure, inherited from $K$ via these
bijections (thus with structure groups $\ker\alpha_{i}$), and this makes
$\psi^{-1}(t)$ a sub-bundle of $\operatorname{B}$. This gives a useful
description of a preimage $\psi^{-1}(t)$, which we record as follows.

######  Lemma 3.6.

Let $\operatorname{B},\operatorname{B}^{\prime}$ be $k$-fold abelian bundles
and let $\psi:\operatorname{B}\to\operatorname{B}^{\prime}$ be a totally
surjective bundle morphism. Then for any $t\in\operatorname{B}^{\prime}$ the
preimage $\psi^{-1}(t)$ is a sub-bundle of $\operatorname{B}$, with factors
$\psi_{i}^{-1}(\pi_{i}(t))$ and structure groups $\ker(\alpha_{i})$,
$i\in[k]$.

###### Proof.

One way to prove this was described above, namely by restricting the bundle
structure from $K$ to $\psi^{-1}(t)$ via the bijections $(x,y)\mapsto x$. This
way has the advantage of showing how all these preimages live inside the
bundle $K$.

Alternatively, one may check directly that the stated factors and structure
groups do indeed make $\psi^{-1}(t)$ a sub-bundle of $\operatorname{B}$,
essentially by repeating the arguments in the previous proof. ∎

####  2 Fibre-surjective morphisms and restricted morphisms

This section describes specific kinds of morphisms between nilspaces. This
material is useful mainly in the topological part of the theory, but since the
material itself is purely algebraic we include it here.

To begin with, recall that on one hand, by Proposition 3.2, a morphism of
nilspaces is a bundle morphism of the corresponding abelian bundles, and on
the other hand, for abelian bundles we have a notion of totally-surjective
bundle morphisms (recall Definition 3.1). The following definition gives a
counterpart of this notion for nilspaces, as shown in Lemma 3.8.

######  Definition 3.7 (Fibre-surjective morphism).

Let $\operatorname{X},\operatorname{X}^{\prime}$ be nilspaces. A morphism
$\psi:\operatorname{X}\to\operatorname{X}^{\prime}$ is said to be _fibre
surjective_ if for every $n\in\mathbb{N}$ the image of an equivalence class of
$\sim_{n}$ in $\operatorname{X}$ is a full equivalence class of $\sim_{n}$ in
$\operatorname{X}^{\prime}$.

Note that if $\operatorname{X}$ is $k$-step then $\operatorname{X}^{\prime}$
must also be $k$-step. Indeed, if $\operatorname{c}^{\prime}$ is a
$(k+1)$-corner on $\operatorname{X}^{\prime}$, then any two completions
$\operatorname{c}_{1},\operatorname{c}_{2}$ of $\operatorname{c}^{\prime}$
satisfy $\operatorname{c}_{1}(1^{k+1})\sim_{k}\operatorname{c}_{2}(1^{k+1})$,
so by surjectivity there must be a class of $\sim_{k}$ in $\operatorname{X}$
in which some element is sent to $\operatorname{c}_{1}(1^{k+1})$ and another
is sent to $\operatorname{c}_{2}(1^{k+1})$ by $\psi$. Since $\operatorname{X}$
is $k$-step this class is a singleton, so
$\operatorname{c}_{1}(1^{k+1})=\operatorname{c}_{2}(1^{k+1})$.

######  Lemma 3.8.

Let $\operatorname{X},\operatorname{X}^{\prime}$ be $k$-step nilspaces. A map
$\psi:\operatorname{X}\to\operatorname{X}^{\prime}$ is a fibre-surjective
morphism if and only if it is a totally surjective morphism between the
corresponding $k$-fold abelian bundles.

###### Proof.

A totally surjective bundle morphism between $k$-step nilspaces is fibre-
surjective by definition. To see the converse, note first that by Proposition
3.2 we know that $\psi$ is a bundle morphism. Then, since the orbits of the
groups $\operatorname{Z}_{i},\operatorname{Z}_{i}^{\prime}$ are equivalence
classes of $\sim_{i}$, the condition for fibre-surjectivity implies that all
the structure morphisms from Definition 3.1 are surjective. ∎

The main result concerning fibre-surjective morphisms here is the following
lemma stating that they are actually factor maps. More precisely, letting
$\sim$ denote the equivalence relation on $\operatorname{X}$ defined by $x\sim
y$ if and only if $\psi(x)=\psi(y)$, then $\operatorname{X}/\sim$ with the
quotient cubespace structure is isomorphic to $\operatorname{X}^{\prime}$.
Thus $\operatorname{X}^{\prime}$ can be viewed as a factor of
$\operatorname{X}$ in the sense of Definition 2.2.

######  Lemma 3.9.

Let $\operatorname{X},\operatorname{X}^{\prime}$ be $k$-step nilspaces and let
$\psi:\operatorname{X}\to\operatorname{X}^{\prime}$ be a fibre-surjective
morphism. Then every cube
$\operatorname{c}^{\prime}\in\operatorname{C}^{n}(\operatorname{X}^{\prime})$
can be lifted to a cube
$\operatorname{c}\in\operatorname{C}^{n}(\operatorname{X})$ such that
$\psi\operatorname{\circ}\operatorname{c}=\operatorname{c}^{\prime}$. In other
words, $\operatorname{X}^{\prime}$ is a factor nilspace of $\operatorname{X}$.

###### Proof.

We argue by induction on $k$. For $k=0$ the claim is clear (a $0$-step non-
empty nilspace is a 1-point space). Let $k>0$ and suppose that the claim holds
for $k-1$. Viewing $\psi$ as a bundle morphism, we see that it induces a
fibre-surjective map $\psi^{\prime}$ from
$\operatorname{\mathcal{F}}_{k-1}(\operatorname{X})$ to
$\operatorname{\mathcal{F}}_{k-1}(\operatorname{X}^{\prime})$. By induction,
there exists
$\operatorname{c}_{1}\in\operatorname{C}^{n}(\operatorname{\mathcal{F}}_{k-1}(\operatorname{X}))$
such that
$\psi^{\prime}\operatorname{\circ}\operatorname{c}_{1}=\pi_{k-1}\operatorname{\circ}\operatorname{c}^{\prime}$.
Lifting $\operatorname{c}_{1}$ to a cube
$\operatorname{c}_{2}\in\operatorname{C}^{n}(\operatorname{X})$ (using Lemma
2.11), the fact that $\psi$ preserves the fibres of $\sim_{k-1}$ implies that
$\pi_{k-1}\operatorname{\circ}\psi\operatorname{\circ}\operatorname{c}_{2}=\operatorname{c}^{\prime}$.
Hence, the map
$\operatorname{c}_{3}=\psi\operatorname{\circ}\operatorname{c}_{2}-\operatorname{c}^{\prime}$
is in
$\operatorname{C}^{n}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}_{k}^{\prime}))$.
Now, letting $\alpha_{k}:\operatorname{Z}_{k}\to\operatorname{Z}_{k}^{\prime}$
be the surjective homomorphism, note that if there was a cube
$\operatorname{c}_{4}\in\operatorname{C}^{n}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}_{k}))$
such that of
$\alpha_{k}\operatorname{\circ}\operatorname{c}_{4}=\operatorname{c}_{3}$,
then we would have
$\psi\operatorname{\circ}(\operatorname{c}_{2}-\operatorname{c}_{4})=\psi\operatorname{\circ}\operatorname{c}_{2}-\alpha_{k}\operatorname{\circ}\operatorname{c}_{4}=\operatorname{c}^{\prime}+\operatorname{c}_{3}-\alpha_{k}\operatorname{\circ}\operatorname{c}_{4}=\operatorname{c}$,
and so we would have a lift
$\operatorname{c}=\operatorname{c}_{2}-\operatorname{c}_{4}$ as desired. To
see that $\operatorname{c}_{4}$ exists, note that this is trivial for $n\leq
k$ (by $k$-ergodicity of degree-$k$ abelian groups), and for $n\geq k+1$ note
that we can take an $n$-corner of $\operatorname{c}_{3}$, lift this under
$\alpha_{k}$ to an $n$-corner on
$\operatorname{\mathcal{D}}_{k}(\operatorname{Z}_{k})$ (by induction on $n$),
and then complete it (uniquely) to an $n$-cube $\operatorname{c}_{4}$, which
then has to satisfy
$\alpha_{k}\operatorname{\circ}\operatorname{c}_{4}=\operatorname{c}_{3}$. ∎

We now move on to another specific type of morphism.

######  Definition 3.10 (Restricted morphism).

Let $P$ and $\operatorname{X}$ be cubespaces, let $S$ be a subcubespace of
$P$, and let $f:S\to\operatorname{X}$ be an arbitrary function. We define the
_restricted morphism set_ $\hom_{f}(P,\operatorname{X})$ to be the set of
morphisms $P\to\operatorname{X}$ whose restriction to $S$ equals $f$.

For instance, given an abelian group $\operatorname{Z}$, the set $\hom_{S\to
0}(P,\operatorname{\mathcal{D}}_{k}(\operatorname{Z}))$ (used below) is the
set of morphisms $\phi$ from $P$ to
$\operatorname{\mathcal{D}}_{k}(\operatorname{Z})$ such that
$\phi(S)=0_{\operatorname{Z}}$. Note that this set is itself an abelian group
under pointwise addition in $\operatorname{Z}$.

We shall now describe $\hom_{f}(P,\operatorname{X})$ as a bundle.

######  Lemma 3.11.

Let $P$ be a subcubespace of $\\{0,1\\}^{n}$ with the extension property, let
$S$ be a subcubespace of $P$ with the extension property in $P$, let
$\operatorname{X}$ be a $k$-step nilspace and $f:S\to\operatorname{X}$ be a
morphism. Then $\hom_{f}(P,\operatorname{X})$ is a $k$-fold abelian bundle
that is a sub-bundle of $\operatorname{X}^{P}$ with factors
$\hom_{\pi_{i}\operatorname{\circ}f}(P,\operatorname{X}_{i})$ and structure
groups $\hom_{S\to
0}(P,\operatorname{\mathcal{D}}_{i}(\operatorname{Z}_{i}))$, where
$\operatorname{Z}_{i}$ is the $i$-th structure group of $\operatorname{X}$.

###### Proof.

We argue by induction on $k$ to check the condition in Definition 3.3. For
$k=1$ we know that $\operatorname{X}$ is the principal homogeneous space of an
abelian group $\operatorname{Z}$, and then $\hom_{f}(P,\operatorname{X})$ is a
principal homogeneous space of $\hom_{S\to
0}(P,\operatorname{\mathcal{D}}_{1}(\operatorname{Z}))$ in
$\operatorname{X}^{P}$.
For $k>1$ suppose that $\operatorname{X}$ is a $k$-step nilspace and the
result is already established for
$\operatorname{X}_{k-1}=\operatorname{\mathcal{F}}_{k-1}(\operatorname{X})$.
Let $f_{2}:P\to\operatorname{X}_{k-1}$ be a morphism with restriction
$f_{2}|_{S}=\pi_{k-1}\operatorname{\circ}f$. We claim that $f_{2}$ can be
lifted to an element $f_{3}\in\hom_{f}(P,\operatorname{X})$.
Indeed, by Lemma 2.11, there is a lift $g:P\to\operatorname{X}$ of $f_{2}$.
Then the function $g_{2}=f-g|_{S}$ is a morphism from $S$ to
$\operatorname{\mathcal{D}}_{k}(\operatorname{Z}_{k})$. By the extension
property there is a morphism
$g_{3}:P\to\operatorname{\mathcal{D}}_{k}(\operatorname{Z}_{k})$ extending
$g_{2}$. Then $f_{3}=g+g_{3}$ is in $\hom_{f}(P,\operatorname{X})$ and is a
lift of $f_{2}$, as claimed.
Note that any other lift $f_{3}^{\prime}$ must satisfy
$f_{3}-f_{3}^{\prime}\in\hom_{S\to
0}(P,\operatorname{\mathcal{D}}_{k}(\operatorname{Z}_{k}))$, and it follows
that the set of possible lifts of $f_{2}$ is exactly $f_{3}+\hom_{S\to
0}(P,\operatorname{\mathcal{D}}_{k}(\operatorname{Z}_{k}))$, as required. ∎

We end this section with a result relating various fibre-surjective morphisms.

######  Lemma 3.12.

Let $P\subset\\{0,1\\}^{n}$ be a subcubespace with the extension property in
$\\{0,1\\}^{n}$ and $S\subset P$ be a subcubespace with the extension property
in $P$. Let $\operatorname{X},\operatorname{X}^{\prime}$ be $k$-step nilspaces
and let $\psi:\operatorname{X}\rightarrow\operatorname{X}^{\prime}$ be a
fibre-surjective morphism with structure morphisms
$\alpha_{i}:\operatorname{Z}_{i}\to\operatorname{Z}_{i}^{\prime}$ (recall
Definition 3.1). Then we have

  1. (i)

$\hom(P,\operatorname{X})$ is a sub-bundle of $\operatorname{X}^{P}$ with
structure groups
$\hom(P,\operatorname{\mathcal{D}}_{i}(\operatorname{Z}_{i}))\leq\operatorname{Z}_{i}^{P}$.

  2. (ii)

$\psi^{P}:\hom(P,\operatorname{X})\to\hom(P,\operatorname{X}^{\prime})$ is a
totally surjective bundle morphism with structure morphisms
$\alpha_{i}^{P}:\hom(P,\operatorname{\mathcal{D}}_{i}(\operatorname{Z}_{i}))\to\hom(P,\operatorname{\mathcal{D}}_{i}(\operatorname{Z}_{i}^{\prime}))$.

  3. (iii)

The preimage of $t\in\hom(P,\operatorname{X}^{\prime})$ under $\psi^{P}$ is a
bundle with structure groups $\hom(P,\operatorname{\mathcal{D}}_{i}({\rm
ker}(\alpha_{i})))$.

  4. (iv)

Let $t\in\hom(P,\operatorname{X}^{\prime})$ and let
$s\in\hom(S,\operatorname{X}^{\prime})$ be its restriction to $S$. Then the
projection $\pi_{S}$ from $(\psi^{P})^{-1}(t)$ to $(\psi^{S})^{-1}(s)$ is a
totally-surjective bundle morphism.

###### Proof.

Statement $(i)$ is just the special case of Lemma 3.11 with $S=\emptyset$
(note that by Definition 1.3 and the fact that there is always a morphism from
$P$ to a non-empty nilspace, we have that $\emptyset$ has the extension
property in $P$).

For statement $(ii)$ let us check that $\psi^{P}$ satisfies the two properties
from Definition 3.1. For property $(i)$ it suffices to show that the map
$\psi^{P}$ preserves the relation $\sim_{i}$ from Definition 2.3 for each $i$.
This is seen by a straightforward argument using Lemma 2.4 (using that $\psi$
preserves cubes). For property $(ii)$, note that we have
$\psi_{i}^{P}(x+a)=\psi_{i}^{P}(x)+\alpha_{i}^{P}(a)$ (since $\psi_{i}$
satisfies this on each component of $X^{P}$), so the structure morphisms of
$\psi^{P}$ are indeed the maps $\alpha_{i}^{P}$ on
$\hom(P,\operatorname{\mathcal{D}}_{i}(\operatorname{Z}_{i}))$. To see that
each map $\alpha_{i}^{P}$ is onto
$\hom(P,\operatorname{\mathcal{D}}_{i}(\operatorname{Z}_{i}^{\prime}))$, we
use Lemma 3.9.

For statement $(iii)$, note that by Lemma 3.6 we have that
$(\psi^{P})^{-1}(t)$ is a sub-bundle of $\hom(P,\operatorname{X})$ with
structure groups
$\ker(\alpha_{i}^{P})\cap\hom(P,\operatorname{\mathcal{D}}_{i}(\operatorname{Z}_{i}))=\hom(P,\operatorname{\mathcal{D}}_{i}(\ker(\alpha_{i})))$.

Finally, to see statement $(iv)$, we first check from Definition 3.1 that
$\pi_{S}$ is indeed a bundle morphism. By statement $(iii)$, the structure
morphisms of $\pi_{S}$ are seem to be the restriction maps
$\hom(P,\operatorname{\mathcal{D}}_{i}({\rm
ker}(\alpha_{i})))\to\hom(S,\operatorname{\mathcal{D}}_{i}({\rm
ker}(\alpha_{i})))$. Since $S$ has the extension property in $P$, these
restriction maps are surjective. ∎

####  3 Extensions and cocycles

This subsection treats an important method of building a new nilspace from an
old one. The resulting new nilspace is called an extension, and consists in an
abelian bundle over the old nilspace, equipped with a cube structure
adequately related to the one on the old nilspace. The formal definition is
the following.

######  Definition 3.13.

Let $\operatorname{X}$ be a nilspace. A _degree- $k$ extension_ of
$\operatorname{X}$ is an abelian bundle $\operatorname{Y}$ over
$\operatorname{X}$, with structure group $\operatorname{Z}$ and bundle map
$\pi:\operatorname{Y}\to\operatorname{X}$, such that $\operatorname{Y}$ is a
cubespace with the following properties:

  1. (i)

For every $n\in\mathbb{N}$ the map
$\operatorname{c}\mapsto\pi\operatorname{\circ}\operatorname{c}$ is a
surjection
$\operatorname{C}^{n}(\operatorname{Y})\to\operatorname{C}^{n}(\operatorname{X})$.

  2. (ii)

For every $\operatorname{c}_{1}\in\operatorname{C}^{n}(\operatorname{Y})$ we
have

$\\{\operatorname{c}_{2}\in\operatorname{C}^{n}(\operatorname{Y}):\pi\operatorname{\circ}\operatorname{c}_{2}=\pi\operatorname{\circ}\operatorname{c}_{1}\\}=\\{\operatorname{c}_{1}+\operatorname{c}_{3}:\operatorname{c}_{3}\in\operatorname{C}^{n}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}))\\}.$
(9)

The extension $\operatorname{Y}$ is called a _split extension_ if there is a
(cube-preserving) morphism $m:\operatorname{X}\to\operatorname{Y}$ such that
$\pi\operatorname{\circ}m$ is the identity map on $\operatorname{X}$.

This notion is motivated by the fact that, by the bundle-decomposition result
(Theorem 2.19), any $k$-step nilspace can be built up from the one-point space
by $k$ consecutive extensions of increasing degree.
With each extension one can associate a certain function called a cocycle,
which encodes algebraic information about the extension. These cocycles can
then be used to parametrize the different extensions of a nilspace. This is
very useful in particular in the topological part of the theory, to classify
compact nilspaces.
To define cocycles we use the following notation. Recall that
$\operatorname{Aut}(\\{0,1\\}^{k})$ is generated by permutations of $[k]$ and
coordinate-reflections. For $\theta\in\operatorname{Aut}(\\{0,1\\}^{k})$ we
write $r(\theta)$ for the number of reflections involved in $\theta$.
Equivalently, $r(\theta)$ is the number of coordinates equal to 1 in
$\theta(0^{k})$.

######  Definition 3.14 (Cocycle).

Let $\operatorname{X}$ be a nilspace, let $\operatorname{Z}$ be an abelian
group, and let $k\geq-1$ be an integer. A _cocycle of degree_ $k$ is a
function $\rho:\operatorname{C}^{k+1}(\operatorname{X})\to\operatorname{Z}$
with the following two properties:

  1. (i)

If $\operatorname{c}\in\operatorname{C}^{k+1}(\operatorname{X})$ and
$\theta\in\operatorname{Aut}(\\{0,1\\}^{k+1})$ then
$\rho(\operatorname{c}\operatorname{\circ}\theta)=(-1)^{r(\theta)}\rho(\operatorname{c})$.

  2. (ii)

If $\operatorname{c}_{3}$ is the concatenation of adjacent cubes
$\operatorname{c}_{1},\operatorname{c}_{2}\in\operatorname{C}^{k+1}(\operatorname{X})$
then
$\rho(\operatorname{c}_{3})=\rho(\operatorname{c}_{1})+\rho(\operatorname{c}_{2})$.

The set of $\operatorname{Z}$-valued cocycles of degree $k$ is an abelian
group under pointwise addition, denoted by
$Y_{k}(\operatorname{X},\operatorname{Z})$. Note that
$Y_{-1}(\operatorname{X},\operatorname{Z})$ is just
$\operatorname{Z}^{\operatorname{X}}$.

In going through the results below on extensions and cocycles, it can be
useful to have a concrete case in mind as a source of intuition.

######  Example 3.15.

Consider the Heisenberg nilmanifold
$H/\Gamma=\begin{pmatrix}1&\mathbb{R}&\mathbb{R}\\\\[1.00006pt]
&1&\mathbb{R}\\\\[1.00006pt]
&&1\end{pmatrix}/\begin{pmatrix}1&\mathbb{Z}&\mathbb{Z}\\\\[1.00006pt]
&1&\mathbb{Z}\\\\[1.00006pt] &&1\end{pmatrix}$ from Example 3.2. As mentioned
there, one can identify $H/\Gamma$ with $[0,1)^{3}$. Let us write this as
$H/\Gamma\cong\begin{pmatrix}1&[0,1)&[0,1)\\\\[1.00006pt]
&1&[0,1)\\\\[1.00006pt] &&1\end{pmatrix}$. Now, identifying the circle group
$\mathbb{T}$ with $[0,1)$, we have that the map

$\pi:H/\Gamma\to\mathbb{T}^{2},\;\;\begin{pmatrix}1&x_{1}&x_{3}\\\\[1.00006pt]
&1&x_{2}\\\\[1.00006pt] &&1\end{pmatrix}\mapsto(x_{1},x_{2})$

is a bundle map showing that $H/\Gamma$ is an abelian bundle with fibre
$\mathbb{T}$ over $\mathbb{T}^{2}$. Moreover, since $H/\Gamma$ is a 2-step
nilspace, by the bundle characterization we have that it is a degree-2
extension of $\mathbb{T}^{2}$ by $\mathbb{T}$ (recall the proof of Lemma
2.25). We can then find a cocycle of degree 2 associated with this extension,
with the following procedure (which will be treated more formally and
generally below). Consider the map $\operatorname{s}:\mathbb{T}^{2}\to
H/\Gamma$, $(x_{1},x_{2})\mapsto\begin{pmatrix}1&x_{1}&0\\\\[1.00006pt]
&1&x_{2}\\\\[1.00006pt] &&1\end{pmatrix}$. This is a cross section for this
extension, i.e. it satisfies $\pi\operatorname{\circ}\operatorname{s}(x)=x$ on
$\mathbb{T}^{2}$ (see Definition 3.20). We then have that for every $x\in
H/\Gamma$, the points $x$ and $\operatorname{s}\operatorname{\circ}\pi(x)$ are
in the same fibre of the map $\pi$. This fibre is an affine version of
$\mathbb{T}$, so we can take the difference
$\operatorname{s}\operatorname{\circ}\pi(x)-x\in\mathbb{T}$. We have thus
defined a function $f:H/\Gamma\to\mathbb{T}$,
$x\mapsto\operatorname{s}\operatorname{\circ}\pi(x)-x$. Now consider the
function $\rho$ on $\operatorname{C}^{3}(H/\Gamma)$ sending a cube
$\operatorname{c}$ to
$\sigma_{3}(f\operatorname{\circ}\operatorname{c})=\sum_{v\in\\{0,1\\}^{3}}(-1)^{|v|}f(\operatorname{c}(v))$.
Using the defining property (9) of the extension, it can be checked that
$\rho(\operatorname{c})$ is unchanged if we vary the values
$\operatorname{c}(v)$ within their $\mathbb{T}$-fibres in $H/\Gamma$. More
precisely, for every other cube $\operatorname{c}^{\prime}$ such that
$\pi\operatorname{\circ}\operatorname{c}^{\prime}=\pi\operatorname{\circ}\operatorname{c}$,
we have $\rho(\operatorname{c}^{\prime})=\rho(\operatorname{c})$. (We shall
prove this more generally in Lemma 3.21.) Thus $\rho$ can be viewed as a
function on $\operatorname{C}^{3}(\mathbb{T}^{2})$, and one can check that it
is a cocycle (see Lemma 3.21). Note that, while $\rho$ was defined using the
structure of $H/\Gamma$, we end up with a function of cubes on
$\mathbb{T}^{2}$. This observation is important because it suggests that we
may be able to go in the opposite direction, that is, that given a cocycle on
the cubes of a given nilspace $\operatorname{X}$ (here
$\operatorname{X}=\mathbb{T}^{2}$), it may be possible to construct an
extension of $\operatorname{X}$ that has some cross section with associated
cocycle equal to $\rho$. This will be confirmed in Proposition 3.26 and
subsequent results.

Before we go into the details indicated by the above example, let us describe
how, given a cocycle $\rho$ of degree $k$, we can define a new cocycle of
degree $k+1$ by taking the difference of $\rho$ on opposite faces of
$(k+2)$-cubes. This will lead to the notion of a coboundary.

######  Definition 3.16.

Let $k\in\mathbb{N}$ and let
$\rho:\operatorname{C}^{k}(\operatorname{X})\to\operatorname{Z}$ be a cocycle.
We define
$\partial\rho:\operatorname{C}^{k+1}(\operatorname{X})\to\operatorname{Z}$ by
$\partial\rho(\operatorname{c})=\rho(\operatorname{c}(\cdot,0))-\rho(\operatorname{c}(\cdot,1))$.

######  Lemma 3.17.

Let $k\geq 0$ and let $\rho$ be a cocycle of degree $k-1$. Then $\partial\rho$
is a cocycle of degree $k$.

###### Proof.

We check that properties (i) and (ii) from Definition 3.14 hold.

Let $\theta$ be an automorphism of $\\{0,1\\}^{k+1}$ and note that there is a
unique $j\in[k+1]$ such that
$\theta(v)\scalebox{0.8}{$(j)$}=v\scalebox{0.8}{$(k+1)$}$ or
$1-v\scalebox{0.8}{$(k+1)$}$. Suppose first that
$\theta(v)\scalebox{0.8}{$(j)$}=v\scalebox{0.8}{$(k+1)$}$. Let
$\theta^{\prime}$ be the restriction of $\theta$ to $\\{0,1\\}^{k}$, with the
image of $\theta^{\prime}$ being the cube obtained from $\\{0,1\\}^{k+1}$ by
omitting the $j$-th coordinate. For $i=0,1$ let $\operatorname{c}_{j,i}$
denote the restriction of $\operatorname{c}$ to the face
$v\scalebox{0.8}{$(j)$}=i$. We then have

$\displaystyle\partial\rho(\operatorname{c}\operatorname{\circ}\theta)$
$\displaystyle=$
$\displaystyle\rho(\operatorname{c}\operatorname{\circ}\theta(\cdot,0))-\rho(\operatorname{c}\operatorname{\circ}\theta(\cdot,1))\hskip
56.9055pt=\;\;\rho(\operatorname{c}_{j,0}\operatorname{\circ}\theta^{\prime})-\rho(\operatorname{c}_{j,1}\operatorname{\circ}\theta^{\prime})$
$\displaystyle=$
$\displaystyle(-1)^{|\theta^{\prime}(0^{k})|}\rho(\operatorname{c}_{j,0})-(-1)^{|\theta^{\prime}(0^{k})|}\rho(\operatorname{c}_{j,1})\;\hskip
5.69046pt=\;\;(-1)^{|\theta(0^{k+1})|}(\rho(\operatorname{c}_{j,0})-\rho(\operatorname{c}_{j,1}))$
$\displaystyle=$
$\displaystyle(-1)^{|\theta(0^{k+1})|}\partial\rho(\operatorname{c}).$

If $\theta(v)\scalebox{0.8}{$(j)$}$ was $1-v\scalebox{0.8}{$(k+1)$}$, then
instead of the expression after the second equality above, we would have
$\rho(\operatorname{c}_{j,1}\operatorname{\circ}\theta^{\prime})-\rho(\operatorname{c}_{j,0}\operatorname{\circ}\theta^{\prime})=-(-1)^{|\theta^{\prime}(0^{k})|}(\rho(\operatorname{c}_{j,0})-\rho(\operatorname{c}_{j,1}))=(-1)^{|\theta(0^{k+1})|}\partial\rho(\operatorname{c})$.
This proves (i).
For property (ii), suppose that $\operatorname{c}^{\prime\prime}$ is the
concatenation of
$\operatorname{c},\operatorname{c}^{\prime}\in\operatorname{C}^{k+1}(\operatorname{X})$.
Then we have

$\partial\rho(\operatorname{c}^{\prime\prime})=\rho(\operatorname{c}(\cdot,0))-\rho(\operatorname{c}^{\prime}(\cdot,1))=\rho(\operatorname{c}(\cdot,0))-\rho(\operatorname{c}(\cdot,1))+\rho(\operatorname{c}^{\prime}(\cdot,0))-\rho(\operatorname{c}^{\prime}(\cdot,1))=\partial\rho(\operatorname{c})+\partial\rho(\operatorname{c}^{\prime}).\qed$

Note also that if $\rho_{1},\rho_{2}$ are two cocycles of degree $k-1$, then
$\partial(\rho_{1}+\rho_{2})=\partial\rho_{1}+\partial\rho_{2}$. Thus, for
every $k\geq 0$ the map $\partial$ is a homomorphism from
$Y_{k-1}(\operatorname{X},\operatorname{Z})$ to
$Y_{k}(\operatorname{X},\operatorname{Z})$.

Recall from Definition 2.22 that given an abelian group $\operatorname{Z}$ and
a function $f:\\{0,1\\}^{n}\to\operatorname{Z}$, we write $\sigma_{n}(f)$ for
$\sum_{v\in\\{0,1\\}^{n}}(-1)^{|v|}f(v)$.

######  Definition 3.18.

A _coboundary_ of degree $k$ is an element of the abelian group
$\partial^{k+1}Y_{-1}(\operatorname{X},\operatorname{Z})$. Equivalently, a
coboundary of degree $k$ is an element of
$Y_{k}(\operatorname{X},\operatorname{Z})$ of the form
$\operatorname{c}\mapsto\sigma_{k+1}(f\operatorname{\circ}\operatorname{c})$
for some function $f:\operatorname{X}\to\operatorname{Z}$. We then define the
abelian group

$H_{k}(\operatorname{X},\operatorname{Z})=Y_{k}(\operatorname{X},\operatorname{Z})\;/\;\partial^{k+1}Y_{-1}(\operatorname{X},\operatorname{Z}).$
(10)

######  Example 3.19.

In the case of degree-2 cocycles
$\operatorname{C}^{3}(\mathbb{T}^{2})\to\mathbb{T}$, such as those constructed
using the Heisenberg nilmanifold in Example 3.15, we have that two such
cocycles $\rho_{1},\rho_{2}$ represent the same element of
$H_{2}(\mathbb{T}^{2},\mathbb{T})$ if and only if the difference map
$\rho_{1}-\rho_{2}$ is of the form
$\operatorname{c}\to\sum_{v\in\\{0,1\\}^{3}}(-1)^{|v|}f\operatorname{\circ}\operatorname{c}(v)$
for some function $f:\mathbb{T}^{2}\to\mathbb{T}$.

Our aim now is to show that every degree-$k$ extension of $\operatorname{X}$
can be represented by an element of
$H_{k}(\operatorname{X},\operatorname{Z})$. This will eventually be achieved
in Corollary 3.29. Our first step in this direction is the following.

##### Associating an element of $H_{k}(\operatorname{X},\operatorname{Z})$
with a given degree-$k$ extension

######  Definition 3.20.

Let $\operatorname{Y}$ be a degree-$k$ extension of $\operatorname{X}$ with
structure group $\operatorname{Z}$ and projection
$\pi:\operatorname{Y}\to\operatorname{X}$. A _cross section_ for this
extension is a map $\operatorname{s}:\operatorname{X}\to\operatorname{Y}$ such
that $\pi\operatorname{\circ}\operatorname{s}$ is the identity on
$\operatorname{X}$.

######  Lemma 3.21.

Let $\operatorname{Y}$ be a degree-$k$ extension of $\operatorname{X}$ with
structure group $\operatorname{Z}$ and projection
$\pi:\operatorname{Y}\to\operatorname{X}$, let $\operatorname{s}$ be a cross
section, and define $f:\operatorname{Y}\to\operatorname{Z}$ by
$f(y)=\operatorname{s}\operatorname{\circ}\pi(y)-y$. Define
$\rho:\operatorname{C}^{k+1}(\operatorname{X})\to\operatorname{Z}$ by
$\rho(\operatorname{c})=\sigma_{k+1}(f\operatorname{\circ}\operatorname{c}^{\prime})$
for some
$\operatorname{c}^{\prime}\in\operatorname{C}^{k+1}(\operatorname{Y})$ such
that $\pi\operatorname{\circ}\operatorname{c}^{\prime}=\operatorname{c}$. Then
$\rho$ is a cocycle of degree $k$. We shall refer to $\rho$ as the _cocycle
generated by the cross section_ $\operatorname{s}$, and denote it
$\rho_{\operatorname{s}}$.

###### Proof.

We first check that $\rho$ is well-defined. Suppose that
$\operatorname{c}^{\prime\prime}$ is another $(k+1)$-cube on
$\operatorname{Y}$ such that
$\pi\operatorname{\circ}\operatorname{c}^{\prime\prime}=\pi\operatorname{\circ}\operatorname{c}^{\prime}=\operatorname{c}$.
Then by definition of the extension we have
$\operatorname{c}^{\prime\prime}-\operatorname{c}^{\prime}=\operatorname{c}_{2}\in\operatorname{C}^{k+1}(\mathcal{D}_{k}(\operatorname{Z}))$.
Then

$\displaystyle\sigma_{k+1}(f\operatorname{\circ}\operatorname{c}^{\prime\prime})$
$\displaystyle=$
$\displaystyle\sum_{v\in\\{0,1\\}^{k+1}}(-1)^{|v|}f\operatorname{\circ}(\operatorname{c}^{\prime}+\operatorname{c}_{2})(v)\;\;\;=\;\sum_{v\in\\{0,1\\}^{k+1}}(-1)^{|v|}\big{(}\;\operatorname{s}\operatorname{\circ}\pi(\operatorname{c}^{\prime}(v))-(\operatorname{c}^{\prime}(v)+\operatorname{c}_{2}(v))\;\big{)}$
$\displaystyle=$
$\displaystyle\sigma_{k+1}(f\operatorname{\circ}\operatorname{c}^{\prime})-\sigma_{k+1}(\operatorname{c}_{2})\;\;\;=\;\;\;\sigma_{k+1}(f\operatorname{\circ}\operatorname{c}^{\prime}).$

Let us now check that the cocycle properties hold.

Let $\theta\in\operatorname{Aut}(\\{0,1\\}^{k+1})$. Then

$\displaystyle\rho(\operatorname{c}\operatorname{\circ}\theta)\;=\;\sigma_{k+1}(f\operatorname{\circ}\,(\operatorname{c}\operatorname{\circ}\theta))$
$\displaystyle=$
$\displaystyle\sum_{v\in\\{0,1\\}^{k+1}}(-1)^{|v|-|\theta(v)|}(-1)^{|\theta(v)|}f(\operatorname{c}\operatorname{\circ}\theta(v))$
$\displaystyle=$
$\displaystyle(-1)^{r(\theta)}\sum_{v\in\\{0,1\\}^{k+1}}(-1)^{|\theta(v)|}f(\operatorname{c}\operatorname{\circ}\theta(v))\;=\;(-1)^{r(\theta)}\rho(\operatorname{c}),$

where we have used that $|\,|\theta(v)|-|v|\,|$ is exactly the number of
coordinates that $\theta$ switches, which is precisely the number of
coordinates equal to 1 in $\theta(0^{k+1})$.
The second property follows from the basic property of $\sigma_{k+1}$ observed
in (1). ∎

Let us now examine how the cocycle $\rho_{\operatorname{s}}$ varies when we
change the cross section $\operatorname{s}$.

######  Lemma 3.22.

Let $\operatorname{Y}$ be a degree-$k$ extension of $\operatorname{X}$ with
structure group $\operatorname{Z}$ and projection
$\pi:\operatorname{Y}\to\operatorname{X}$, and let
$\operatorname{s}:\operatorname{X}\to\operatorname{Y}$ be a cross section.
Then for every other cross section $\operatorname{s}^{\prime}$, we have
$\rho_{\operatorname{s}^{\prime}}\in\rho_{\operatorname{s}}+\partial^{k+1}Y_{-1}(\operatorname{X},\operatorname{Z})$.
Conversely, every element of
$\rho_{\operatorname{s}}+\partial^{k+1}Y_{-1}(\operatorname{X},\operatorname{Z})$
is a cocycle $\rho_{\operatorname{s}^{\prime}}$ for some cross section
$\operatorname{s}^{\prime}$.

Thus the coset
$\rho_{\operatorname{s}}+\partial^{k+1}Y_{-1}(\operatorname{X},\operatorname{Z})$
is the set of all cocycles generated by cross sections for the extension
$\operatorname{Y}$. This coset is the element of
$H_{k}(\operatorname{X},\operatorname{Z})$ that we associate with the
extension $\operatorname{Y}$.

###### Proof.

Letting $\operatorname{c}^{\prime}$ be any lift of $\operatorname{c}$, we have

$\displaystyle\rho_{\operatorname{s}^{\prime}}(\operatorname{c})$
$\displaystyle=$
$\displaystyle\sigma_{k+1}(\operatorname{s}^{\prime}\operatorname{\circ}\pi(\operatorname{c}^{\prime})-\operatorname{c}^{\prime})=\sum_{v\in\\{0,1\\}^{k+1}}(-1)^{|v|}\big{(}\,\operatorname{s}^{\prime}\operatorname{\circ}\pi(\operatorname{c}^{\prime}(v))-\operatorname{c}^{\prime}(v)\,\big{)}$
$\displaystyle=$
$\displaystyle\sum_{v\in\\{0,1\\}^{k+1}}(-1)^{|v|}[\,\operatorname{s}^{\prime}\operatorname{\circ}\pi(\operatorname{c}^{\prime}(v))-\operatorname{s}\operatorname{\circ}\pi(\operatorname{c}^{\prime}(v))+\operatorname{s}\operatorname{\circ}\pi(\operatorname{c}^{\prime}(v))-\operatorname{c}^{\prime}(v)\,]$
$\displaystyle=$
$\displaystyle\sigma_{k+1}(\operatorname{s}\operatorname{\circ}\pi(\operatorname{c}^{\prime})-\operatorname{c}^{\prime})+\sigma_{k+1}(\operatorname{s}^{\prime}\operatorname{\circ}\operatorname{c}-\operatorname{s}\operatorname{\circ}\operatorname{c})=\rho_{\operatorname{s}}(\operatorname{c})+\sigma_{k+1}((\operatorname{s}^{\prime}-\operatorname{s})\operatorname{\circ}\operatorname{c}).$

Since $\operatorname{s}^{\prime}-\operatorname{s}$ is in
$Y_{-1}(\operatorname{X},\operatorname{Z})$, the function
$\operatorname{c}\mapsto\sigma_{k+1}((\operatorname{s}^{\prime}-\operatorname{s})\operatorname{\circ}\operatorname{c})$
is a coboundary of degree $k$ as claimed.

Conversely, given any coboundary
$\operatorname{c}\mapsto\sigma_{k+1}(f\operatorname{\circ}\operatorname{c})$
for some $f:\operatorname{X}\to\operatorname{Z}$, and a cocycle
$\rho_{\operatorname{s}}$, we have
$\rho_{\operatorname{s}}(\operatorname{c})+\sigma_{k+1}(f\operatorname{\circ}\operatorname{c})=\sigma_{k+1}((\operatorname{s}+f)\operatorname{\circ}\pi(\operatorname{c}^{\prime})-\operatorname{c}^{\prime})=\rho_{\operatorname{s}+f}$,
where $\operatorname{s}+f:x\mapsto\operatorname{s}(x)+f(x)$ is indeed a cross-
section (where $+$ denotes the action of $\operatorname{Z}$ on
$\operatorname{Y}$). ∎

Thus, every degree-$k$ extension $\operatorname{Y}$ of $\operatorname{X}$ with
structure group $\operatorname{Z}$ has an associated element
$\rho_{\operatorname{s}}+\partial^{k+1}Y_{-1}(\operatorname{X},\operatorname{Z})$
of $H_{k}(\operatorname{X},\operatorname{Z})$, which is the same well-defined
element for any choice of cross section $\operatorname{s}$.

######  Definition 3.23.

We say that two degree-$k$ extensions of $\operatorname{X}$ with structure
group $\operatorname{Z}$ are _equivalent_ if they correspond to the same
element of $H_{k}(\operatorname{X},\operatorname{Z})$.

Note that if $\operatorname{Y}$ is a split extension, with cube-preserving
cross section $\operatorname{s}$, then
$\rho(\operatorname{c})=\sigma_{k+1}(\operatorname{s}\operatorname{\circ}\operatorname{c}-\operatorname{c}^{\prime})=0$
since $\operatorname{s}\operatorname{\circ}\operatorname{c}$ is a $(k+1)$-cube
on $\operatorname{Y}$ with image $\operatorname{c}$ under $\pi$, so
$\operatorname{s}\operatorname{\circ}\operatorname{c}-\operatorname{c}^{\prime}$
must be in
$\operatorname{C}^{k+1}(\operatorname{\mathcal{D}}_{k}(\operatorname{Z}))$.
Thus the element of $H_{k}(\operatorname{X},\operatorname{Z})$ corresponding
to $\operatorname{Y}$ is the identity, as expected.

We shall now go in the opposite direction, to show that given any element of
$H_{k}(\operatorname{X},\operatorname{Z})$, there is a unique class of
equivalent extensions of degree $k$ over $\operatorname{X}$ with group
$\operatorname{Z}$ corresponding to this element. In [1], Camarena and Szegedy
leave this task for the topological part of the paper, to avoid repetition,
and in that part they combine the purely algebraic construction with
topological tools to obtain, given a measurable cocycle, an extension which is
also a _compact_ nilspace (see [1, Section 3.5]). In the following subsection
we shall isolate the purely algebraic part of this construction.

##### Obtaining an extension from a cocycle

Let $\operatorname{X}$ be a nilspace and let $\operatorname{Z}$ be an abelian
group. Our aim here is to show that any $\operatorname{Z}$-valued cocycle
$\rho$ on $\operatorname{C}^{k}(\operatorname{X})$ yields a
$\operatorname{Z}$-bundle over $\operatorname{X}$ which admits a compatible
nilspace structure.
For each $x\in\operatorname{X}$ we denote by
$\operatorname{C}^{k}_{x}(\operatorname{X})$ the set of $k$-cubes
$\operatorname{c}$ satisfying
$\pi(\operatorname{c}):=\operatorname{c}(0^{k})=x$. We consider the
restrictions of the cocycle $\rho$ to each such set
$\operatorname{C}^{k}_{x}(\operatorname{X})$, denoting such a restriction by
$\rho_{x}$. The extension that we shall construct consists essentially of the
functions $\rho_{x}$, but we need to define an action of $\operatorname{Z}$ on
these functions such that there is a natural projection from this space to
$\operatorname{X}$ that respects the orbits of the action. This leads to the
following natural definition of the extension.

######  Definition 3.24.

Let $\rho:\operatorname{C}^{k}(\operatorname{X})\to\operatorname{Z}$ be a
cocycle of degree $k-1$. We then define the set $M=M(\rho)$ as follows.

$M=\bigcup_{x\in\operatorname{X}}\\{\rho_{x}+z\,:\,z\in\operatorname{Z}\\}.$
(11)

We define the map $\tilde{\pi}:M\to\operatorname{X}$ by $\rho_{x}+z\mapsto x$,
for every $x\in\operatorname{X}$ and $z\in\operatorname{Z}$. We also define an
action of $\operatorname{Z}$ on $M$ by
$(\rho_{x}+z,z^{\prime})\mapsto\rho_{x}+z+z^{\prime}$.

One checks easily that $M$ is a $\operatorname{Z}$-bundle over
$\operatorname{X}$ with projection $\tilde{\pi}$.

Now we shall define cubes on $M$. Given any function $f:\\{0,1\\}^{k}\to M$,
we denote by $a=a_{f}$ the function $\\{0,1\\}^{k}\to\operatorname{Z}$,
$v\mapsto\rho_{x}(v)-f(v)$, where $x=\tilde{\pi}(f(v))\in\operatorname{X}$.

######  Definition 3.25.

We define $\operatorname{C}^{k}(M)$ to be the set of functions
$f:\\{0,1\\}^{k}\to M$ such that
$\tilde{\pi}\operatorname{\circ}f\in\operatorname{C}^{k}(\operatorname{X})$
and

$\rho(\tilde{\pi}\operatorname{\circ}f)=\sigma_{k}(a).$ (12)

For $n\neq k$, a function $f:\\{0,1\\}^{n}\to M$ is declared to be in
$\operatorname{C}^{n}(M)$ if
$\tilde{\pi}\operatorname{\circ}f\in\operatorname{C}^{n}(\operatorname{X})$
and every $k$-dimensional face-restriction of $f$ is in
$\operatorname{C}^{k}(M)$. 333If $n<k$ then there are no $k$-dimensional face
restrictions and so the condition is just that
$\tilde{\pi}\operatorname{\circ}f\in\operatorname{C}^{n}(\operatorname{X})$.

We can now complete the main task of this subsection.

######  Proposition 3.26.

The set $M$ together with the cube sets $\operatorname{C}^{n}(M)$, $n\geq 0$,
is a nilspace.

###### Proof.

To see the composition axiom, suppose that $f:\\{0,1\\}^{n}\to M$ is a cube
and that $\phi:\\{0,1\\}^{m}\to\\{0,1\\}^{n}$ is a morphism. If $m<k$ then
$f\operatorname{\circ}\phi\in\operatorname{C}^{m}(M)$ just by Definition 3.25
and the composition axiom for $\operatorname{X}$. Supposing then that $m\geq
k$, it suffices to check that for every face map
$\phi^{\prime}:\\{0,1\\}^{k}\to\\{0,1\\}^{m}$ we have that
$f\operatorname{\circ}\phi\operatorname{\circ}\phi^{\prime}\in\operatorname{C}^{k}(M)$.
Now $\phi\operatorname{\circ}\phi^{\prime}$ is a morphism
$\\{0,1\\}^{k}\to\\{0,1\\}^{n}$. If $\phi\operatorname{\circ}\phi^{\prime}$ is
not injective then we are done because $\phi\operatorname{\circ}\phi^{\prime}$
factors through a lower-dimensional morphism
$\psi:\\{0,1\\}^{\ell}\to\\{0,1\\}^{n}$, $\ell<k$ and we have that
$f\operatorname{\circ}\psi$ is in $\operatorname{C}^{\ell}(M)$ as in the case
$m<k$ above. If $\phi\operatorname{\circ}\phi^{\prime}$ is injective, then
using Lemma 1.9 repeatedly we see that it is a concatenation of face maps
$\phi_{j}:\\{0,1\\}^{k}\to\\{0,1\\}^{n}$ (modulo automorphisms of
$\\{0,1\\}^{k}$). For each of these face maps, we have that
$f\operatorname{\circ}\phi_{j}$ satisfies (12) by assumption. It follows that
$f\operatorname{\circ}\phi\operatorname{\circ}\phi^{\prime}$ also satisfies
(12), since both functions involved in this equation are additive on adjacent
cubes (for the cocycle this holds by definition, and for $\sigma_{k}$ it
follows from (1)).

To see the completion axiom, note that, since the axiom holds for
$\operatorname{X}$, by the argument establishing completion in the proof of
Lemma 2.20, it suffices to check that for every $n\in\mathbb{N}$ we have
$\operatorname{C}^{n}(\operatorname{X})=\\{\tilde{\pi}\operatorname{\circ}\operatorname{c}:\operatorname{c}\in\operatorname{C}^{n}(M)\\}$
and for every $\operatorname{c}\in\operatorname{C}^{n}(M)$ we have

$\\{\operatorname{c}_{2}\in\operatorname{C}^{n}(M):\tilde{\pi}\operatorname{\circ}\operatorname{c}=\tilde{\pi}\operatorname{\circ}\operatorname{c}_{2}\\}=\\{\operatorname{c}+\operatorname{c}_{3}:\operatorname{c}_{3}\in\operatorname{C}^{n}(\operatorname{\mathcal{D}}_{k-1}(\operatorname{Z}))\\}.$
(13)

For $n<k$ this equation follows from the definition of
$\operatorname{C}^{n}(M)$ and the fact that
$\operatorname{\mathcal{D}}_{k-1}(\operatorname{Z})$ is $(k-1)$-fold ergodic.
To see the case $n\geq k$, recall that
$\operatorname{c}_{3}\in\operatorname{C}^{n}(\operatorname{\mathcal{D}}_{k-1}(\operatorname{Z}))$
if and only if $\sigma_{k}(\operatorname{c}_{3}\operatorname{\circ}\phi)=0$
for every $k$-face map $\phi$ into $\\{0,1\\}^{n}$. ∎

Note that if $\operatorname{X}$ is of step $s$, then $M(\rho)$ is of step
$\max(s+1,k-1)$, as can be seen by checking the uniqueness of completion in
the proof of Lemma 2.20. The typical examples of extensions involve extending
a $(k-1)$-step nilspace by a cocycle of degree $k$ to obtain a $k$-step
nilspace (as in Example 3.15), but it can be useful to consider a degree-$k$
extension of an $s$-step nilspace with $k<s$ (see for instance Lemma 3.38).

Recall from Lemma 3.21 that given a degree-$k$ extension of a nilspace, every
cross section $\operatorname{s}$ for this extension generates a cocycle
$\rho_{\operatorname{s}}$. As our last main goal in this subsection, we want
to show that, up to isomorphisms of nilspaces, every extension of
$\operatorname{X}$ by $\operatorname{Z}$ is of the form $M(\rho)$ above for
some cocycle $\rho$. The formal statement will be given as Corollary 3.29. The
main idea is that we can just take $\rho$ to be the cocycle generated by some
cross section for the extension.
First let us confirm a fact that ought to be true, namely that for $M(\rho)$
itself, the obvious cross-section does indeed generate $\rho$.

######  Lemma 3.27.

Let $\operatorname{X}$ be a nilspace, let $\operatorname{Z}$ be an abelian
group, and let
$\rho:\operatorname{C}^{k}(\operatorname{X})\to\operatorname{Z}$ be a cocycle.
Let $\operatorname{s}:\operatorname{X}\to M(\rho)$ be the cross section
$x\mapsto\rho_{x}$. Then $\rho_{\operatorname{s}}=\rho$.

(In particular, every cocycle can be viewed as a cocycle generated by a cross
section of some extension.)

###### Proof.

Let $\operatorname{c}\in\operatorname{C}^{k}(\operatorname{X})$ and let
$\operatorname{c}^{\prime}$ be a cube in $\operatorname{C}^{k}(M)$ with
$\tilde{\pi}\operatorname{\circ}\operatorname{c}^{\prime}=\operatorname{c}$.
We thus have
$\operatorname{c}^{\prime}(v)=\rho_{\tilde{\pi}(\operatorname{c}^{\prime}(v))}-a(v)=\rho_{\operatorname{c}(v)}-a(v)$
for a $\operatorname{Z}$-valued function $a$ satisfying
$\sigma_{k}(a)=\rho(\operatorname{c})$. Then by definition of
$\rho_{\operatorname{s}}$, we have

$\rho_{\operatorname{s}}(\operatorname{c})=\sigma_{k}\big{(}\operatorname{s}\operatorname{\circ}\tilde{\pi}(\operatorname{c}^{\prime})-\operatorname{c}^{\prime}\big{)}=\sum_{v\in\\{0,1\\}^{k}}(-1)^{|v|}\big{(}\operatorname{s}\operatorname{\circ}\operatorname{c}(v)-(\rho_{\operatorname{c}(v)}-a(v))\big{)}=\sum_{v}(-1)^{|v|}a(v)=\rho(\operatorname{c}).\qed$

######  Lemma 3.28.

Let $\operatorname{X}$ be a nilspace. Let $\operatorname{Y}$ be a degree-$k$
extension of $\operatorname{X}$ by an abelian group $\operatorname{Z}$. Let
$\operatorname{s}:\operatorname{X}\to\operatorname{Y}$ be a cross-section and
let $\rho=\rho_{\operatorname{s}}$ be the associated cocycle. Then
$\operatorname{Y}$ is isomorphic as a nilspace to the extension $M=M(\rho)$ in
(11).

###### Proof.

Let $\pi:\operatorname{Y}\to\operatorname{X}$ be the projection for the
extension. The isomorphism is given by the following map:

$\theta:\operatorname{Y}\to
M,\;\;x\mapsto\rho_{\pi(x)}+(x-\operatorname{s}\operatorname{\circ}\pi(x)).$
(14)

It is easily checked that $\theta$ is a bijection. We claim that for every
$\operatorname{c}\in\operatorname{C}^{n}(\operatorname{Y})$, the map
$\theta\operatorname{\circ}\operatorname{c}$ satisfies the conditions in
Definition 3.25. We check this for $n=k$. The first condition is that
$\tilde{\pi}\operatorname{\circ}\theta\operatorname{\circ}\operatorname{c}\in\operatorname{C}^{k}(\operatorname{X})$.
But
$\tilde{\pi}\operatorname{\circ}\theta\operatorname{\circ}\operatorname{c}=\pi\operatorname{\circ}\operatorname{c}$,
so the condition holds. Next, consider the function
$a(v)=\rho_{\tilde{\pi}\operatorname{\circ}\theta\operatorname{\circ}\operatorname{c}}(v)-\theta\operatorname{\circ}\operatorname{c}(v)=\operatorname{s}\operatorname{\circ}\pi(\operatorname{c}(v))-\operatorname{c}(v)$.
The second condition is that $a$ satisfies (12), that is
$\rho(\tilde{\pi}\operatorname{\circ}\theta\operatorname{\circ}\operatorname{c})=\sigma_{k}(a)$.
But this holds indeed, since
$\rho(\tilde{\pi}\operatorname{\circ}\theta\operatorname{\circ}\operatorname{c})=\rho(\pi\operatorname{\circ}\operatorname{c})=\sigma_{k}(a)$,
by definition of $\rho_{\operatorname{s}}$ (recall Lemma 3.21). The cases
$n\neq k$ follow similarly. ∎

Recall from Subsection 3 that $H_{k}(\operatorname{X},\operatorname{Z})$
denotes the quotient of the abelian group of degree-$k$ cocycles by the
subgroup of coboundaries. Combining the results from this section, we now
deduce the following correspondence between
$H_{k}(\operatorname{X},\operatorname{Z})$ and the degree-$k$ extensions of
$\operatorname{X}$ up to isomorphisms of nilspaces.

######  Corollary 3.29.

Let $\Phi$ denote the map which sends each class $C\in
H_{k}(\operatorname{X},\operatorname{Z})$ to the isomorphism class of
$M(\rho)$, for any choice of $\rho\in C$. Then $\Phi$ is a surjection from
$H_{k}(\operatorname{X},\operatorname{Z})$ to the set of isomorphism classes
of degree-$k$ extensions of $\operatorname{X}$ by $\operatorname{Z}$.

###### Proof.

We first check that $\Phi(C)$ is well-defined. If $\rho^{\prime}$ is another
element of the class $C$ of $\rho$ then, as seen in Lemma 3.22, there is
another cross section $\operatorname{s}^{\prime}$ of $\operatorname{Y}$ such
that $\rho^{\prime}=\rho_{\operatorname{s}^{\prime}}$. Then, by Lemma 3.28 we
have $M(\rho)\cong\operatorname{Y}\cong M(\rho^{\prime})$. To see that $\Phi$
is surjective, note that given a degree-$k$ extension $\operatorname{Y}$ of
$\operatorname{X}$, there is a cross section
$\operatorname{s}:\operatorname{X}\to\operatorname{Y}$ and corresponding
cocycle $\rho=\rho_{\operatorname{s}}$, and so the isomorphism class of
$\operatorname{Y}$ is $\Phi(C)$ where $C$ is the class of $\rho$. ∎

######  Remark 3.30.

Note that $\Phi$ need not be injective. This is a counterpart for nilspaces of
known facts concerning group extensions, for instance that the abelian group
of classes of extensions $1\to A\to E\to G\to 1$ of a group $G$ by an abelian
group $A$ can be larger than the set of extensions $E$ themselves up to group
isomorphism.

We end this subsection with an alternative formulation of condition (12)
defining cubes on the extension $M(\rho)$. This formulation uses tricubes and
is very useful in particular in the topological part of the theory.
Recall from Definition 1.13 and Lemma 1.16 the concept of a morphism from a
tricube $T_{k}$ into a nilspace $\operatorname{X}$, and the tricube
composition $t\operatorname{\circ}\omega_{k}$ (where $\omega_{k}$ is the
outer-point map from Definition 1.15). Let $\operatorname{Z}$ be an abelian
group, and let $\xi:\operatorname{C}^{k}(\operatorname{X})\to\operatorname{Z}$
be an arbitrary function. We then define the alternating sum

$\beta(t,\xi)=\sum_{v\in\\{0,1\\}^{k}}(-1)^{|v|}\,\xi(t\operatorname{\circ}\operatorname{\Psi}_{v}).$
(15)

For a cocycle $\rho$, the following result reduces $\beta(t,\rho)$ to the
value of $\rho$ on the outer-point set of $T_{k}$.

######  Lemma 3.31.

Let $t:T_{k}\to\operatorname{X}$ be a morphism into a nilspace
$\operatorname{X}$, and let $\rho$ be a cocycle of degree $k-1$ on
$\operatorname{X}$. Then

$\beta(t,\rho)=\rho(t\operatorname{\circ}\omega_{k}).$

###### Proof.

This follows from the fact that the outer-point map $\omega_{k}$ can be
expressed as a sequence of concatenations of cubes of the form
$\operatorname{\Psi}_{v}$ composed with automorphisms of $\\{0,1\\}^{k}$. ∎

Given a cube $\operatorname{c}\in\operatorname{C}^{k}(\operatorname{X})$, let
us denote by
$\hom_{\operatorname{c}\operatorname{\circ}\omega_{k}^{-1}}(T_{k},\operatorname{X})$
the set of morphisms $t:T_{k}\to\operatorname{X}$ that agree with
$\operatorname{c}$ on the subset $\\{-1,1\\}^{k}$. We can now give the
alternative form of (12).

######  Lemma 3.32.

Condition (12) is equivalent to the following equation holding for some (and
therefore every)
$t\in\hom_{(\tilde{\pi}\operatorname{\circ}f)\operatorname{\circ}\omega_{k}^{-1}}(T_{k},\operatorname{X})\colon$

$\sum_{v\in\\{0,1\\}^{k}}(-1)^{|v|}\,f(v)(t\operatorname{\circ}\operatorname{\Psi}_{v})=0.$
(16)

###### Proof.

Given such a morphism $t$, note that for each $v\in\\{0,1\\}^{k}$, the map
$t\operatorname{\circ}\operatorname{\Psi}_{v}$ is a cube in
$\operatorname{C}^{k}(\operatorname{X})$ with base-point
$t\operatorname{\circ}\psi_{v}(0^{k})=t\operatorname{\circ}\omega_{k}(v)=\tilde{\pi}\operatorname{\circ}f(v)$.
Therefore, we have trivially that
$\rho_{\tilde{\pi}\operatorname{\circ}f(v)}(t\operatorname{\circ}\operatorname{\Psi}_{v})=\rho(t\operatorname{\circ}\operatorname{\Psi}_{v})$.
By Lemma 3.31, we then have

$\displaystyle\sum_{v\in\\{0,1\\}^{k}}(-1)^{|v|}\,f(v)(t\operatorname{\circ}\operatorname{\Psi}_{v})$
$\displaystyle=$
$\displaystyle\sum_{v\in\\{0,1\\}^{k}}(-1)^{|v|}\,\rho_{\tilde{\pi}\operatorname{\circ}f(v)}(t\operatorname{\circ}\operatorname{\Psi}_{v})\;-\;(-1)^{|v|}\,a(v)$
$\displaystyle=$
$\displaystyle\beta(t,\rho)-\sum_{v\in\\{0,1\\}^{k}}(-1)^{|v|}\,a(v)\;=\;\rho(\tilde{\pi}\operatorname{\circ}f)-\sigma_{k}(a),$

and the result follows. ∎

####  4 Translation bundles

Given a nilspace $\operatorname{X}$, recall that $\pi_{k-1}$ denotes the
projection to the factor $\operatorname{\mathcal{F}}_{k-1}(\operatorname{X})$.

######  Definition 3.33 (Translation lift).

Let $\operatorname{X}$ be a $k$-step nilspace and let
$\alpha\in\operatorname{\Theta}_{i}(\operatorname{\mathcal{F}}_{k-1}(\operatorname{X}))$.
We say that $\alpha^{\prime}\in\operatorname{\Theta}_{i}(\operatorname{X})$ is
a _lift of $\alpha$ to_ $\operatorname{\Theta}_{i}(\operatorname{X})$ if for
every $x\in\operatorname{X}$ we have
$\pi_{k-1}(\alpha^{\prime}(x))=\alpha(\pi_{k-1}(x))$.

The main result below, Proposition 3.39, gives a useful criterion for whether
a translation on $\operatorname{\mathcal{F}}_{k-1}(\operatorname{X})$ can be
lifted to a translation on $\operatorname{X}$. The result involves the
following construction.

######  Definition 3.34.

Given a translation