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 $\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}$$
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}$$
In an exercise from this textbook, they ask
c. Determine the orbits $\mathrm{S}_{3} \cdot p$ of $p \in R[X_{1}, X_{2}, X_{3}]$ in the following cases:
(i) $p :=X_{1}$.
(ii) $p :=X_{1}^{2}$.
(iii) $p :=X_{1}^{2} X_{2} X_{3}^{3}$.
Here $(\mathrm{S}_3, \circ)$ is the permutation group of $\{1,2,3\}$, $\circ$ is function composition, and $p \in R[X_{1}, X_{2}, X_{3}]$.
From authors' definition, I could not figure out what $X_{1}$ and $X_{1}^{2}$ and $X_{1}^{2} X_{2} X_{3}^{3}$ really are.
Please help me figure out what are they in $R[X_{1}, X_{2}, X_{3}]$!
Formally, the polynomial ring $R[X_1,X_2,X_3]$ consists of maps $\mathbb N^3\to R$ with finite support. In this setting, the polynomials you list correspond to the following maps: \begin{align} X_1(n_1, n_2, n_3) &= \begin{cases} 1 & \text{if $(n_1, n_2, n_3)=(1,0,0)$,} \\ 0 & \text{otherwise.} \end{cases} \\ X_1^2(n_1, n_2, n_3) &= \begin{cases} 1 & \text{if $(n_1, n_2, n_3)=(2,0,0)$,} \\ 0 & \text{otherwise.} \end{cases} \\ (X_1^2 X_2 X_3^3)(n_1, n_2, n_3) &= \begin{cases} 1 & \text{if $(n_1, n_2, n_3)=(2,1,3)$,} \\ 0 & \text{otherwise.} \end{cases} \end{align} In general, a monomial $X_1^a X_2^b X_3^c$ corresponds to the map $\mathbb N^3\to R$ that sends $(a,b,c)$ to $1$ and all other triples to zero. Addition and multiplication of polynomials is then defined in a way that the indeterminates $X_i$ behave just like elements $R$, so that distributivity etc. hold.
The correspondence of multivariate polynomials to maps $\mathbb N^m\to R$ with finite support is really only needed to get a proper definition. After having that, you usually just think of the $X_i$ as indeterminates that follow the same rules as elements of $R$ would.
Here's an analogy: you can define the euclidean space $\mathbb R^3$ as the set of all maps $\{1,2,3\}\to\mathbb R$. The triple $(x,y,z)$ is then just defined to be the map given by $1\mapsto x$, $2\mapsto y$ and $3\mapsto z$. However, once you have internalized that triplets of real numbers are just three numbers in a given order, you will no longer think of them as maps $\{1,2,3\}\to\mathbb R$.
For polynomial rings this internalization is that $R[X_1,\dots,X_m]$ is a vector space with basis the monomials $X_1^{\alpha_1} X_2^{\alpha_2}\cdots X_m^{\alpha_m}$ and multiplication defined as the bilinear extension of $$ (X_1^{\alpha_1} X_2^{\alpha_2}\cdots X_m^{\alpha_m}) \cdot (X_1^{\beta_1} X_2^{\beta_2}\cdots X_m^{\beta_m}) = X_1^{\alpha_1+\beta_1} X_2^{\alpha_2+\beta_2}\cdots X_m^{\alpha_m+\beta_m}. $$ Using this point of view, you don't need to think about polynomials as map $\mathbb N^m\to R$ anymore.