For example on the set $ \mathcal A^{\mathbb Z} = \{x = (x_i)_{i\in \mathbb Z}|\ x_i\in \mathcal A,\ \forall i\in \mathbb Z\}.$ Let $\mathcal A$ be a finite set of states. An infinite word $\mathcal A$ over  is a sequence $x = (x_i)_{i\in \mathbb Z},$ where $x_i$ is in $\mathcal A$ for any $i\in \mathbb Z.$ That means, we have set $$ \mathcal A^{\mathbb Z} = \{x = (x_i)_{i\in \mathbb Z}\mid \ x_i\in \mathcal A,\ \forall i\in \mathbb Z\}.$$
My question is 
If $\mathcal A = \{1,2,3,4,5\}$ then $\mathcal A^{\mathbb Z} = ?$
Thanks!
 A: The set $\mathcal{A}^\mathbb{Z}$ is the set of all "two-sided sequences" $(x_i)_{i\in\mathbb{Z}}$ such that each $x_i\in\mathcal{A}$. Some example elements for $\mathcal{A}=\{1,2,3,4,5\}$ include:
$$
(\ldots,1,1,1,\ldots), (\ldots,4,5,1,2,3,4,5,1,2,3,4,5,1,2,\ldots), (\ldots,2,2,1,1,2,2,1,1,\ldots).
$$
Alternatively, you can define $\mathcal{A}^\mathbb{Z}$ as the set of all functions $f:\mathbb{Z}\to\mathcal{A}$. This interpretation can be identified with the "two-sided sequences" interpretation by setting $x_i:=f(i)$.

It's perhaps useful to note that this construction can be done more generally. If $A$ and $B$ are sets, then the set $A^B$ is defined by
$$
A^B :=\{f:B\to A \mid f\ \text{is a function}\}.
$$
Some prefer the form that is more analogous to sequences:
$$A^B :=\{(a_b)_{b\in B} \mid a_b\in A\ \text{for each}\ b\in B\}.$$
Under this notation, the familiar $\mathbb{R}^n$ can be seen as nothing more than just $\mathbb{R}^{\{1,2,\ldots,n\}}$; that is, ordered $n$-tuples or real-valued functions on $\{1,2,\ldots,n\}$.
