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]$?
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]$.