Functions in Group Theory I am reading a math book and in it, it says, "Let $V$ be the set of all functions $f: \mathbb{Z^n_2} \rightarrow \mathbb{R}.$ I know that $\mathbb{Z^n_2}$ is just the cyclic group of order $2$ taken to the $n$th power, but I don't get what the actual function means.
How would such a function, $f$, work? Could someone please give an example?
 A: A function is by definition a mapping between sets. So we have to look at the underlying sets. For simplicity, we write $\Bbb Z_2=\{0,1\}$. Then $\Bbb Z_2^n=\{0,1\}^n$. A map $f\colon\{0,1\}^n\to\Bbb R$ now is an assigment which takes an element of the form $(a_1,\dots,a_n)$ and maps it to some real number $r$ depending on all $a_i\in\{0,1\}$. For example, we can trivially define $f(a_1,\dots,a_n)=\pi$ for all $n$-tupel $(a_1,\dots,a_n)\in\Bbb Z_2^n$. Formally, we write
$$\Bbb R^{\Bbb Z_2^n}=\{f\colon\{0,1\}^n\to\Bbb R\}$$
where we do not enforce any further conditions on $f\in\Bbb R^{\Bbb Z_2^n}$ (like, being a group homomorphism, being linear, etc. which we could ask for; but then we would get a notably different result).

Naturally, this set is equipped with a $\Bbb R$-vector space structure.
Indeed, define the pointwise sum of two elements $f,g\in\Bbb R^{\Bbb Z_2^n}$ by
$$(f+g)(x):=f(x)+g(x)\quad\text{where}\quad x\in\Bbb Z_2^n\,.$$
This is again just a function with domain $\Bbb Z_2^n$ taking values in $\Bbb R$ , hence an element of $\Bbb R^{\Bbb Z_2^n}$. We can define a trivial function sending everything to $0\in\Bbb R$ as neutral element and $g(x)=-f(x)$ is an additive inverse. Thus, this set has an (abelian) group structure inherited from $\Bbb R$ as one can check.
Also, as the functions are valued in $\Bbb R$, we can define a new function $(\lambda\cdot f)(x)=\lambda\cdot f(x)$ for every $\lambda\in\Bbb R$. One can check that the usual compability axioms hold making this set into a $\Bbb R$-vector space.

The functions $f_u(v)=\delta_{uv}$ (where $u,v\in\Bbb Z_2^n$) form a basis for $V=\Bbb R^{\Bbb Z_2^n}$ as $\Bbb R$-vector space as a function is uniquely and completely determined on its values at any point in its domain. The domain happens to be $\Bbb Z_2^n=\{0,1\}^n$ which has $2^n$ elements $u$. Every one of them gives us a unique function $f_u$ as defined earlier and we can decompose a function $f\in\Bbb R^{\Bbb Z_2^n}$ into how it acts on every element, giving us the needed linear combination of the form
$$f=\sum_{u\in\Bbb Z_2^n} a_uf_u,\quad a_u\in\Bbb R$$
A: The fact that $\mathbb{Z}_2^n$ is a group is completely irrelevant here. It is being used simply as a set. So let us discuss this construction without any reference to $\mathbb{Z}_2^n$.
Let $X$ be your favorite set. Define
$$\mathbb{R}^X=\{f\colon X\to \mathbb{R}\mid f\text{ is a function}\}.$$
No other conditions on $f$: just a function from the set $X$ to the real numbers.
We define addition of elements of $\mathbb{R}^X$ as follows: given $f,g\in\mathbb{R}^X$, I want to define a function from $X$ to $\mathbb{R}$ called “$f+g$”. To do so, I need to tell you how to evaluate this function “$f+g$” at each $x\in X$. The rule is:
$$(f+g)(x) = f(x) + g(x),$$
where the addition on the right hand side is the addition of real numbers. Note that since $f(x)$ and $g(x)$ are real numbers, this makes sense.
Now, the set $\mathbb{R}^X$ together with this operation $+$ on functions is a commutative group: verify that $+$ is associative, for example, by showing that the functions $(f+g)+h$ and $f+(g+h)$ take the same value at each $x\in X$. The identity of the operation $+$ on functions is the function $\mathbf{z}\colon X\to \mathbb{R}$ defined by $\mathbf{z}(x) = 0$ for all $x\in X$. And the additive inverse of a function $f\colon X\to \mathbb{R}$ is the function $(-f)\colon X\to \mathbb{R}$ defined by
$$(-f)(x) = -(f(x)),$$
where $-$ on the right hand side is the usual negative symbol of the real numbers.
We define a scalar multiplication on $\mathbb{R}^X$ as follows: given $\alpha\in\mathbb{R}$ and $f\in\mathbb{R}^X$, we define the function $(\alpha f)$ to be
$$(\alpha f)(x) = \alpha\cdot f(x)\text{ for all }x\in X,$$
where $\alpha\cdot f(x)$ means the product in $\mathbb{R}$ of $\alpha$ and $f(x)$, both real numbers.
These two operations, $+$ and the scalar multiplication, turn $\mathbb{R}^X$ into a vector space over $\mathbb{R}$.
Now, we define a distinguished set of elements of $\mathbb{R}^X$: for each $y\in X$, define $f_y\colon X\to\mathbb{R}$ by
$$f_y(x) = \delta_{yx} = \left\{\begin{array}{ll}
0 & \text{if }y\neq x,\\
1 & \text{if }y=x.
\end{array}\right.$$
So $f_y$ takes the value $1$ at $y$, and the value zero everywhere else.
If $X$ is finite, verify that the set $\{f_y\}_{y\in X}$ is a basis for the vector space $\mathbb{R}^X$.
This is the construction you are being presented with, except that the set $X$ is taken to be the underlying set of the group $\mathbb{Z}_2^n$. But the fact that it is a group doesn’t matter at all; what is being used is the fact that it is a (finite) set.
A: 
[...] I don't get what the actual function means.

$f:\bf{Z}_2^n \to R$ simply assigns to each element of $\bf{Z}_2^n$ an element of $\bf{R}$.

How would such a function, f , work?

Each element of $\bf{Z}_2^n$ is assigned an element of $\bf{R}$.

Could someone please give an example?

Say $n=2$. Define $f:\bf{Z}_2^n \to R$ such that
$$f((0, 0)) = 1$$
$$f((0, 1)) = 2$$
$$f((1, 0)) = 3.14159$$
$$f((1, 1)) = 1738$$
That's all a function does - it assigns elements of one set to elements of another. That's it.
