What is polynomial $p = (X-X_{1})(X-X_{2}) \cdots (X-X_{m})$ in $R[X_{1}, \ldots, X_{m}][X]$? 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 \tag1$$
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 \tag2$$
We write $X$ for the power series $$X_{n} :=\begin{cases}{1} & \text{if }{n=1} \\ {0} & \text {otherwise }\end{cases} \tag3$$
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} \tag4$$
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} \tag5$$
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} \tag6$$


*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} \tag7$$
$$(p q)_{\alpha} :=\sum_{\beta \leq \alpha} p_{\beta} q_{\alpha-\beta}, \quad \alpha \in \mathbb{N}^{m} \tag8$$
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 $\color{blue}{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} \tag9$$
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} \tag{10}$$

Then there is an exercise:

Show that the polynomial $$(X-X_{1})(X-X_{2}) \cdots (X-X_{m}) \in R[X_{1}, \ldots, X_{m}][X]$$ in one indeterminate $X$ over the ring $R[X_{1}, \ldots, X_{m}]$ satisfies $$(X-X_{1})(X-X_{2}) \cdots (X-X_{m})=\sum_{k=0}^{m}(-1)^{k} s_{k} X^{m-k}$$ where
$$\begin{align*} s_{0} &:=1 \in R \\ s_{1} & :=\sum_{1 \leq j \leq m} X_{j} \\ s_{2} & :=\sum_{1 \leq j<k \leq m} X_{j} \cdot X_{k} \\ & \mathrel{\vdots} \\ s_{k} & :=\sum_{1 \leq j_{1}<j_{2}<\cdots<j_{k} \leq m} X_{j_{1}} \cdot X_{j_{2}} \cdot \cdots \cdot X_{j_{k}} \\ & \mathrel{\vdots} \\ s_{m} & :=X_{1} X_{2} \cdots X_{m} \end{align*}$$
Notice that $s_k \in R[X_{1}, \ldots, X_{m}]$ is a elementary symmetric polynomial for all $1 \le k \le m$.

I have re-read the definitions several times but to no avail in understanding how the notation $(X-X_{1})(X-X_{2}) \cdots (X-X_{m})$ makes sense.
My question:

What is polynomial $p = (X-X_{1})(X-X_{2}) \cdots (X-X_{m})$ in $R[X_{1}, \ldots, X_{m}][X]$?

 A: As a simple, but representative example, I'll consider the case $m=2$:
$$(X-X_1)(X-X_2)=X^2 -(X_1+X_2)X+X_1X_2 ,$$
so, as you can see, it's just a polynomial in $X$, with coefficients in the polynomial ring $R[X_1,X_2]$.
Similarly, expanding the case $m=3$ by distributivity would yield
\begin{multline}
(X-X_1)(X-X_2)(X-X_3)=X^3-(X_1+X_2+X_3)X^2\\+(X_1X_2 +X_2X_3+X_3X_1)X-X_1X_2X_3,
\end{multline}
a polynomial in $X$ with coefficients in $R[X_1,X_2,X_3]$.
A: I seem to got what's going on behind the scene.



*

*In $(X-X_1)$, $X$ denotes the polynomial in $R[X_{1}, \ldots, X_{m}][X]$ such that $$X (n) :=\begin{cases} \overline{1} & \text{if } n=1 \\ \overline{0} & \text {otherwise }\end{cases}$$ where $\overline{1}$ is the multiplicative identity of $R[X_{1}, \ldots, X_{m}]$ and $\overline{0}$ the additive identity of $R[X_{1}, \ldots, X_{m}]$.

*$X_1 = X_1^1 X_2^0 X_3^0 \ldots X_m^0$ is the polynomial in $R[X_{1}, \ldots, X_{m}]$ such that
$$X_1 (n_1, \ldots, n_m) = \begin{cases}
1 & \text{if $(n_1, \ldots, n_m)=(1, 0, \ldots, 0)$} \\
0 & \text{otherwise}
\end{cases}$$
where $1$ is the multiplicative identity of $R$ and $0$ the additive identity of $R$.


*$X_2 = X_1^0 X_2^1 X_3^0 \ldots X_m^0$ is the polynomial in $R[X_{1}, \ldots, X_{m}]$ such that


$$X_2 (n_1, \ldots, n_m) = \begin{cases}
1 & \text{if $(n_1, \ldots, n_m)=(0, 1, 0, \ldots, 0)$} \\
0 & \text{otherwise}
\end{cases}$$
where $1$ is the multiplicative identity of $R$ and $0$ the additive identity of $R$.


*In $(X-X_1)$, $X_1$ denotes the polynomial $X_1 X^0 \in R[X_{1}, \ldots, X_{m}][X]$.


To be more specific, $X_1 X^0$ is the polynomial such that
$$X_1 X^0 (n) = \begin{cases}
X_1 & \text{if } n = 0 \\
\overline{0} & \text{otherwise}
\end{cases}$$
where $\overline{0}$ is the additive identity of $R[X_{1}, \ldots, X_{m}]$.


*In $(X-X_1)$, $-X_1$ denotes the additive inverse of $X_1 X^0$ in $R[X_{1}, \ldots, X_{m}][X]$.

*$(X-X_1)$ denotes the sum of two polynomials $X$ and $-X_1$ in $R[X_{1}, \ldots, X_{m}][X]$.

*$(X-X_1)(X-X_2)$ denotes the product of two polynomials $(X-X_1)$ and $(X-X_2)$ in $R[X_{1}, \ldots, X_{m}][X]$.
