Polynomial rings
Let $R$ be a ring.
The polynomial ring $R[X]$ is the set of all polynomials in $X$ with coefficients in $R$ $$ \begin{align*} R[X] = \sb{\sum_{i=0}^{n} a_i X^i}{n\geq 0, \, a_i\in R} \end{align*} $$ where $X^i$ are formal symbols, with $0_{R[X]} = 0_R$, $1_{R[X]} = 1_R$ and the usual operations $$ \begin{align*} \sum_{i=0}^{n} a_i X^i + \sum_{i=0}^{m} b_i X^i ={}& \sum_{i=0}^{\max\set{n,m}} (a_i + b_i )X^i, \\ \left(\sum_{i=0}^{n} a_i X^i\right) \cdot \left(\sum_{i=0}^{m} b_i X^i\right) ={}& \sum_{i=0}^{n+m} \left(\sum_{j=0}^{i} a_j b_{i-j}\right) X^i. \\ \end{align*} $$
The polynomial ring of two variables $R[X,Y] \isom (R[X])[Y]$ is constructed similarly, etc.
The ring of formal power series in $X$ with coefficients in $R$ is $$ \begin{align*} R[[X]] = \sb{\sum_{i=0}^{\infty} r_i X^i}{r\in R} \end{align*} $$ with the usual operations.
Let $K$ be a field. The polynomial ring $K[X]$ is a Euclidean domain, with Euclidean function $ϕ = \deg$.
Keep in mind $K[X]$ has all the nice properties you get in a Euclidean domain.
Let $R$ be a unique factorisation domain.
The content of $f = a_0 + a_1 X + \ldots + a_n X^n \in$ $R[X]$ is $$ \begin{align*} c(f) = \op{gcd}(a_0, a_1, \ldots, a_n) \in R, \end{align*} $$ defined up to associates.
We say $f$ is primitive if $c(f)$ is a unit.
Let $R$ be a unique factorisation domain and $F$ be its field of fractions.
For a primitive polynomial $f\in R[X]$, $f$ is irreducible in $R[X]$ iff $f$ is irreducible in $F[X]$.
Let $R$ be a unique factorisation domain and $F$ be its field of fractions.
For a primitive polynomial $g\in R[X]$, a polynomial $f\in R[X]$ is divisible by $g$ in $R[X]$ iff it is divisible by $g$ in $F[X]$.
Equivalently, if $J=(g)\lhd R[X]$ and $I=(g)\lhd F[X]$, then $J = I \cap R[X]$.
If $R$ is a unique factorisation domain, then so is $R[X]$.
-
We can repeat to show $R[X_1, \ldots X_n]$ is a unique factorisation domain.