If $p\in R[X_1,\dots,X_n]$ is irreducible, is it still irreducible in $R[X_1,\dots,X_n,\dots,X_N]$? It is a known fact that if $R$ is a UFD, then $R[X_1,X_2,\dots]$ is also a UFD, but there is a subtlety that is making me uncomfortable.
The standard approach essentially goes something along the lines of...let $f$ be a polynomial, so it only involves finitely many variables, say up to $X_1,\dots,X_n$. Then since $R[X_1,\dots,X_n]$ is a UFD, $f$ has a factorization into irreducibles. Then $f$ cannot have a factorization involving indeterminates $X_N$ not in $R[X_1,\dots,X_n]$. If it did, then $f$ would have two factorizations in the UFD $R[X_1,\dots,X_n,\dots, X_N]$, a contradiction.
This seems to assume that the prime factorization in $R[X_1,\dots,X_n]$ is still a prime factorization in $R[X_1,\dots,X_n,\dots,X_N]$. But how can you see that irreducibles in $R[X_1,\dots,X_n]$ are still irreducibles in $R[X_1,\dots,X_m]$ for $m>n$? This does not seem obvious.
Let $R_k=R[X_1,\dots,X_k]$. The explanantion I found is this: Suppose $p\in R[X_1,\dots,X_n]$ is irreducible in $R_n$. Suppose $p=ab$ for $a,b\in R_m$. Evaluating $X_1,\dots,X_n$ at $1$, you get 
$$
\bar{p}=\overline{ab}\in R[X_{n+1},\dots,X_m]
$$
But $\bar{p}\in R$, which implies that $a$ and $b$ do not involve any variables $X_{n+1},\dots,X_m$. So $a,b\in R_n$, and thus one is a unit, hence a unit in $R_m$. 
The part I don't follow is how evaluation at $1$, implies $a$ and $b$ do not have indeterminates other than $X_1,\dots,X_n$. Isn't it possible that some of the higher indexed indeterminates disappear when you evaluate? Suppose for instance $p\in R_1$, and $a\in R_2$ is $a=-X_1X_2+X_2$. Then evaluting at $1$ gives $\bar{a}=0$ so we may not get the desired contradiction since $\overline{ab}=0\in R$?
 A: Let $A = R[X_1,\ldots, X_n]$ and $B = R[X_1,\ldots, X_n, \ldots ,X_N]$. Write $B = A[Y_1,\ldots,Y_k]$ to ease notation.
Now $B / pB \cong (A/pA)[Y_1,\ldots, Y_k]$. Since $p$ is irreducible in the UFD $A$, $pA$ is a prime ideal. So $A/ pA$ is an integral domain. So $B / pB$ is also an integral domain. So $p$ is irreducible in $B$.
A: They key idea is that each successive polynomial ring extension $\,D\subset D[x]\,$ is factorization inert, i.e. the ring extension introduces no new factorizations, i.e. if $\, 0\ne d\ \in D\,$ factors in $\,D[x]\,$ as $\,d = ab\,$ for $\, a,b\in D[x]\,$ then $\,a,b\in D.\,$ From this one easily deduces that the requisite factorization properties extend to  $\,R[x_1,x_2,\cdots\,].\,$ The same ideas work for arbitrary inert extensions.
Remark $\ $ Paul Cohn introduced the idea of inert extensions when studying Bezout rings. Cohn proved that every gcd domain can be inertly embedded in a Bezout domain, and every UFD can be inertly embedded in a PID. There are a few variations on the notion of  inertness that prove useful when studying the relationship between factorizations in base and extension rings, e.g. a weaker form where $\, d = ab\,\Rightarrow\, au, b/u\in D,\,$ for some unit $\,u\,$ in the extension ring.
