In my textbook Analysis I by by Amann/Escher, there are definitions as follows
Let $R$ be a nontrivial (not necessarily commutative) ring with unity.
- The formal power series ring over $R$ is the set $R[\![X]\!] = (R^\Bbb N,+,\cdot)$ where addition $(+)$ is defined as
$$(p+q)_{n} :=p_{n}+q_{n}, \quad n \in \mathbb{N}, \quad p,q \in R^\Bbb N$$
and multiplication $(\cdot)$
$$(p q)_{n} :=(p \cdot q)_{n} :=\sum_{j=0}^{n} p_{j} q_{n-j}=p_{0} q_{n}+p_{1} q_{n-1}+\cdots+p_{n} q_{0}, \quad n \in \mathbb{N}, \quad p,q \in R^\Bbb N$$
We write $X$ for the power series $$X_{n} :=\begin{cases}{1} & \text{if }{n=1} \\ {0} & \text {otherwise }\end{cases}$$
Then it follows that $X^m := \underbrace{X \cdots X}_{m \text{ times}}$ is $$X_{n}^{m} =\begin{cases}{1,} & {n=m} \\ {0,} & {n \neq m}\end{cases} \quad m, n \in \mathbb{N}$$
For $a \in R$, we denote by $a X^{m}$ the power series, $$a X_{n}^{m} :=\begin{cases}{a} & \text{if } {m=n} \\ {0} & \text{otherwise}\end{cases} \quad m, n \in \mathbb{N}$$
If the context is clear, we write $a$ for $a X^{0}$.
- A polynomial over $R$ is a formal power series $p \in R[\![X]\!]$ such that $\left\{n \in \mathbb{N} \mid p_{n} \neq 0\right\}$ is finite. The set of all polynomials over $R$ is denoted by $R[X]$.
If $p \in R[X]$, then there is some $n \in \mathbb{N}$ such that $p_{k}=0$ for $k>n$. Thus $p \in R[X]$ can be written in the form $$p=\sum_{k=0}^{n} p_{k} X^{k}=p_{0}+p_{1} X+p_{2} X^{2}+\cdots+p_{n} X^{n}$$
- The authors go on to extend the above results to the case of formal power series and polynomials in $m$ indeterminates. In analogy to the $m=1$ cases, namely $R[X]$ and $R[\![X]\!]$ for $m \in \mathbb{N}^{+},$ we define addition and multiplication on the set $R^{\left(\mathrm{N}^{m}\right)}=\operatorname{Funct}\left(\mathbb{N}^{m}, R\right)$ by $$(p+q)_{\alpha} :=p_{\alpha}+q_{\alpha}, \quad \alpha \in \mathbb{N}^{m}$$ $$(p q)_{\alpha} :=\sum_{\beta \leq \alpha} p_{\beta} q_{\alpha-\beta}, \quad \alpha \in \mathbb{N}^{m}$$
In this situation, $p \in R^{\left(\mathrm{N}^{m}\right)}$ is called a formal power series in $m$ indeterminates over $R$. We set $R\left[\![X_{1}, \ldots, X_{m}\right]\!] :=\left(R^{\left(\mathbb{N}^{m}\right)},+, \cdot\right)$.
A formal power series $p \in R\left[\![X_{1}, \ldots, X_{m}\right]\!]$ is called a polynomial in $m$ indeterminates over $R$ if $\left\{\alpha \in \mathbb{N}^m \mid p_{\alpha} \neq 0\right\}$ is finite. The set of all such polynomials is written $R\left[X_{1}, \ldots, X_{m}\right]$.
Set $X :=\left(X_{1}, \ldots, X_{m}\right)$ and, for $\alpha \in \mathbb{N}^{m},$ denote by $X^{\alpha}$ the formal power series (that is, the function $\mathbb{N}^{m} \rightarrow R )$ such that $$X_{\beta}^{\alpha} :=\left\{\begin{array}{ll}{1,} & {\beta=\alpha,} \\ {0,} & {\beta \neq \alpha}\end{array}\right. \quad \beta \in \mathbb{N}^{m}$$
Then each $p \in R\left[X_{1}, \ldots, X_{m}\right]$ can be written uniquely in the form $$p=\sum_{\alpha \in \mathbb{N}^{m}} p_{\alpha} X^{\alpha}$$
The authors then state a lemma:
Let $K$ be an infinite field. Then $p=\sum_{\alpha} p_{\alpha} X^{\alpha} \in K\left[X_{1}, \ldots, X_{m}\right]$ can be written in the form $p=\sum_{j=0}^{n} q_{j} X_{m}^{j}$ for suitable $n \in \mathbb{N}$ and $q_{j} \in K\left[X_{1}, \ldots, X_{m-1}\right]$
From this answer, I am assured that $\sum_{j=0}^{n} q_{j} X_{m}^{j} \in K[X_1, \ldots, X_{m - 1}][X_{m}]$. From this answer, I am assured that $X_{m}^{j}$ is the $j$th power of $X_m$ and that $X_m$ is the element $X^\alpha \in K\left[X_{1}, \ldots, X_{m}\right]$ for $\alpha=(0,\dots,0,1)$.
My question:
In the notation $K[X_1, \ldots, X_{m - 1}]\color{blue}{[X_{m}]}$, I understand that the underlying set is $K[X_1, \ldots, X_{m - 1}]$, which is a ring of polynomials.
What makes me confusing is the part $\color{blue}{[X_{m}]}$. A ring of polynomials in $1$ indeterminate is denoted by $R[X]$ and of course $K[X_1, \ldots, X_{m - 1}]\color{blue}{[X_{m}]}$ is a ring of polynomials in $1$ indeterminate too.
It is perfectly fine for me to write $K[X_1, \ldots, X_{m - 1}]\color{blue}{[X]}$ and, from authors' definition, I got that $K[X_1, \ldots, X_{m - 1}]\color{blue}{[X]}$ is the set of all functions from $\Bbb N$ to $K[X_1, \ldots, X_{m - 1}]$.
What is the difference between $K[X_1, \ldots, X_{m - 1}]\color{blue}{[X]}$ and $K[X_1, \ldots, X_{m - 1}]\color{blue}{[X_{m}]}$ from the authors' definition?
Thank you so much for your time reading my long question and help me get over it!