Help to understand the ring of polynomials terminology in $n$ indeterminates In Hungerford's Algebra, page 150, the author defines a ring of polynomials in "$n$" indeterminates in the following manner:


After the author defines the operations in this ring with a theorem:

saying that the author defines another definition to a ring of polynomials with $n$ indeterminates:

My problem is with the terminology in this theorem which comes after:

If I understood well, the author defines a function $x_i$ which when we applies to $\epsilon_i$, we have the identity in $R$. following this reasoning what is $x_i^k(k\epsilon_i)?$ is this the composition of $x_i$?
I'm very confused with these terminologies, I need help.
Thanks a lot!
 A: It's not the composition, but just the multiplication of $x_i$ with itself $k$ times (as usual). Note that Theorem 5.3 defines a multiplication operation on $R[x_1,\ldots,x_n]$, via
$$(fg)(u)=\sum_{\large\substack{v+w=u\\ v,w\in\mathbb{N}^n}}f(v)g(w).$$ 
So for example, writing $x_i^2$ for the product $x_ix_i$,
$$(x_i^2)(2\epsilon_i)=\sum_{\substack{v+w=2\epsilon_i\\ v,w\in\mathbb{N}^n}}x_i(v)x_i(w)=\bigg[x_i(0)x_i(2\epsilon_i)\bigg]+\bigg[x_i(\epsilon_i)x_i(\epsilon_i)\bigg]+\bigg[x_i(2\epsilon_i)x_i(0)\bigg]$$
$$=[0\cdot 0]+[1\cdot 1]+[0\cdot 0]=1$$
(where we have used the defining property $x_i(\epsilon_i)=1$ and $x_i(u)=0$ for any other $u$).
The correspondence with our usual conception of polynomials is as follows: for any  polynomial $F\in R[x_1,\ldots,x_n]$, the corresponding function $\mathbf{F}:\mathbb{N}^n\to R$ is defined by
$$\mathbf{F}(k_1\epsilon_1+\cdots+k_n\epsilon_n)=\text{the coefficient of }x_1^{k_1}\cdots x_n^{k_n}\text{ in the polynomial }F.$$
Let's do an example in $\mathbb{Z}[s,t]$ (I'm using $s$ and $t$ to avoid confusion with the functions $x_1,x_2$):
$$F=2+t+5s^2$$
corresponds to the function $\mathbf{F}:\mathbb{N}^2\to \mathbb{Z}$ defined by
$$\mathbf{F}(u)=\begin{cases}
2 & \text{if }u=(0,0)\\
1 & \text{if }u=(0,1),\\
5 & \text{if }u=(2,0),\\
0 & \text{otherwise},
\end{cases}$$
and we can see that (as functions from $\mathbb{N}^2$ to $\mathbb{Z}$),
$$\mathbf{F}=2+x_1+5x_2^2.$$
A: First, you shouldn't be frightened by all this; although I haven't read this book I'm pretty sure the author is going to drop all these notations very soon. In fact the theorem 5.4 prepares that dropping.
We are used to writing polynomials as sums of terms, and the author is soon going to do that as well. However he did not define them like that, because expressions are not easy to describe mathematically; one needs to cater for such things as that $x_1+3x_1^2x_2$, $x_1^2x_2+x_1+2x_1^2x_2$ and $x_1(1+3x_1x_2)$ (and many more) are all different expressions but the same polynomial. So instead the mathematical object that represents the polynomial will be the function (not to be confused with a polynomial function) that sends each monomial to its coefficient, which here satisfies $(1,0)\mapsto1$, $(2,1)\mapsto3$, and $(k,l)\mapsto0$ for all other pairs $(k,l)\in\mathbf N^2$.
Once you've understood this, you'll see that the expression $x_i$ stands for the function that maps $\varepsilon_i=(0,\ldots,0,1,0,\ldots,0)$ to $1$ (more precisely to the multiplicative unit $1_R$ of $R$) and everything else to$~0_R$. That's the first part of theorem 5.4. He could then just have said that things like sums, products, and powers are computed using the operations in the polynomial ring he just defined (theorem 5.3(i)), but (maybe since he did not explicitly define powers) he makes explicit what powers (i) and monomials(ii) are, that powers of indeterminates commute among each other (iii) and with coefficients (iv),  and that every polynomial $f$ can be written as $R$-linear combination of distinct monomials (v) (the coefficient $a_{k_1,k_2,\ldots,k_n}$ is going to be nothing else than the value $f(k_1,\ldots,k_n)$ at the tuple labelling the monomial this coefficient is attached to). For point (i), the power $x_i^k$ should map the tuple $(0,\ldots,0,k,0,\ldots,0)\mapsto1_R$ and evertything else to $0_R$; the author writes that tuple as $k\varepsilon_i$, where the multiplication is just the scaling operation in $\mathbf N^n$.
