Subrings generated by a set I have a misunderstanding with subrings generated by a set. (The intersection of all subrings of R containing a set X and a subring R0 of R is the subring generated by X over R0 in the ring R). Firstly, this definition seems not intuitive. Also I have a more specific issue: on the one hand, for the definition to work the generating set must be contained in the ring $R$. On the other hand, when talking about polynomials there is a statement asserting that $$R[x]= \{ \text{formal } a_0 + \ldots + a_n x^n \text{ where } a_0, \ldots, a_n \in R\}$$ is the ring generated over $R$ by $x$. The problem I have with the definition is that $x$ isn't in $R$. (Moreover, what is $a_n x^n$ formally if $x$ isn't in $R$?)
 A: This introduction to polynomial rings is very brief, but it does make the important points. Here’s a slightly different way to think about it that may help to clear up some of the confusion.
Given a ring $R$, we can form a new ring, which for a moment I’ll call $R^*$, whose elements are infinite sequences of elements of $R$ that are have only finitely many non-zero terms:
$$R^*=\left\{\langle r_k:k\in\Bbb N\rangle\in{^{\Bbb N}R}:\exists m\in\Bbb N~\forall k\ge m(r_k=0_R)\right\}\;.$$
Addition in $R^*$ is component-wise: $$\langle r_k:k\in\Bbb N\rangle+\langle s_k:k\in\Bbb N\rangle=\langle r_k+s_k:k\in\Bbb N\rangle\;.$$
Multiplication is the Cauchy product: if $\bar r=\langle r_k:k\in\Bbb N\rangle$ and $\bar s=\langle s_k:k\in\Bbb N\rangle$, then $$\bar r\bar s=\langle t_k:k\in\Bbb N\rangle\;,\text{ where }t_k=\sum_{i=0}^kr_is_{k-i}\;.$$
It’s not hard to verify that these really are operations on $R^*$. In particular, if $r_k=0_R$ for $k\ge m$, and $s_k=0_R$ for $k\ge n$, then $t_k=0_R$ for $k\ge m+n-1$.
$R^*$ also contains a nice embedded copy of $R$:
$$R\hookrightarrow R^*:r\mapsto\langle r,0_R,0_R,0_R,\dots\rangle\;.$$
The polynomial ring $R[x]$ is just this $R^*$ in disguise. For $\bar r=\langle r_k:k\in\Bbb N\rangle$ define $\deg\bar r$, the degree of $\bar r$, to be $-1$ if $\bar r=0_{R^*}=\langle 0_R,0_R,0_R,\dots\rangle$, and otherwise to be the least $m\in\Bbb N$ such that $a_k=0_R$ for all $k>m$. If $0_{R^*}\ne\bar r\in R^*$, and $\deg\bar r=m$, then all of the information about $\bar r$ is contained in the finite sequence $\langle r_0,r_1,\dots,r_m\rangle$. We can just as well present this information in the form $$r_0+r_1x+r_2x^2+\ldots+r_mx^m\;,\tag{1}$$ where $x$ is a new symbol not in $R$ whose rôle is to carry the exponent that tells which term of the sequence $\bar r$ is which. Instead of writing $r_0,\dots,r_m$ as a sequence, and using the position in the sequence to keep the terms straight, we write the polynomial $(1)$ and use the symbols $x^k$ to keep the terms straight. 
It’s routine to check that if you endow this family $R[x]$ of polynomials with the usual operations of polynomial addition and multiplication, the map that sends $\bar r\in R^*$ of degree $m\ge 0$ to $r_0+r_1x+r_2x^2+\ldots+r_mx^m\in R[x]$ and $0_{R^*}$ to the zero polynomial is an isomorphism of $R^*$ and $R[x]$.
The thing to remember is that these polynomials in $R[x]$ are just a way to line up finite sequences of elements of $R$; they should not be thought of as functions. This is made very clear by the $R^*$ representation of them, but the $R[x]$ representation has the great advantage that the manipulations, including multiplication, are already familiar.
A: Let $S$ be a subset of a commutative ring $R$. By the universal property of polynomial rings, there exists a (unique) morphism of $\mathbb{Z}-$algebras $\phi:\mathbb{Z}[x_{s}: s\in S]\rightarrow R$ such that $\phi(x_{s})=s$ for all $s\in S$. Then $\mathbb{Z}[S]$, the image of this morphism, is the subring of $R$ which is generated by $S$. In fact, it is easy to see that $\mathbb{Z}[S]$ is the intersection of all subrings of $R$ that are contain $S$. One can observe that $a\in\mathbb{Z}[S]$ if and only if $a=f(s_{1},...,s_{n})$ where $f(x_{s_{1}},...,x_{s_{n}})\in\mathbb{Z}[x_{s}: s\in S]$ and $s_{i}\in S$ for all $i$.
