TITLE: "Binomial coefficients" generalized via polynomial iteration
QUESTION [5 upvotes]: This is a question I will answer myself immediately by repeating one of my old AoPS posts, since the latter post no longer renders on AoPS.

Convention. In the following, whenever $A$ is a commutative ring with $1$, and $f$ and $g$ are two polynomials over $A$ in the variable $x$, then we denote by $f\left[g\right]$ the evaluation of the polynomial $f$ at $g$. This evaluation is defined as the image of $f$ under the $A$-algebra homomorphism $A\left[x\right] \to A\left[x\right]$ which maps $x$ to $g$ (this homomorphism is unique, due to the universal property of the polynomial ring). Equivalently, this evaluation is $\sum_{i\geq 0} f_i g^i$, where $f_0, f_1, f_2, \ldots$ are the coefficients of the polynomial $f$ before $x^0, x^1, x^2, \ldots$, respectively.
Note that the evaluation $f\left[g\right]$ is frequently denoted by $f\left(g\right)$ in literature, but this $f\left(g\right)$ notation is slightly ambiguous, because $f\left(g\right)$ can also mean the product of the polynomials $f$ and $g$ (in particular, this often happens when $g$ is a complicated sum, so that the parentheses around $g$ are required), and this is an entirely different thing. Thus we are always going to denote the evaluation by $f\left[g\right]$, and never by $f\left(g\right)$.
Also note that every polynomial $f\in A\left[x\right]$ satisfies $f\left[x\right]=f$ and $x\left[f\right]=f$.
Also, I let $\mathbb{N} = \left\{0,1,2,\ldots\right\}$.
Theorem 1. Let $A$ be a commutative ring with $1$, and let $f\in A\left[x\right]$ be a polynomial over $A$ in the variable $x$. Let us define a polynomial $f_n\in A\left[x\right]$ for every $n\in\mathbb{N}$. Namely, we define $f_n$ by induction over $n$: We start with $f_0=x$, and continue with the recursive equation $f_{n+1}=f\left[f_n\right]$ for every $n\in\mathbb N$. [Note that I hesitate to denote $f_n$ by $f^n$ since $f^n$ already stands for "$n$-th power of $f$ with respect to multiplication of polynomials", and that's something different from $f_n$.] Then, for any nonnegative integers $n$ and $k$, we have 
  \begin{equation}
\prod_{i=1}^n\left(f_i-x\right) \mid \prod_{i=k+1}^{k+n}\left(f_i-x\right)
\end{equation}
  in the ring $A\left[x\right]$.
Theorem 2. Let $A$, $f$ and $f_n$ be as in Theorem 1. Then, for any two coprime positive integers $m$ and $n$, we have
  \begin{equation}
\left(f_m - x\right) \left(f_n - x\right) \mid \left(f_{mn} - x\right) \left(f - x\right)
\end{equation}
  in the ring $A\left[x\right]$.

The question is to prove these two theorems.
Theorem 1 has been posted by gammaduc at https://artofproblemsolving.com/community/c7h412796 ; Theorem 2 has been posted by gammaduc at https://artofproblemsolving.com/community/c7h412797 .

REPLY [2 votes]: Notation and Lemmas
I will let
$$\def\c[#1]{^{\circ #1}}f\c[n]:= f_n$$ 
Letting $f\circ g=f[g]$, I claim $\circ$ is associative. This follows because any polynomial defines a map $f:A\to A$, and the polynomial corresponding the composition of the maps $f,g:A\to A$ can be shown to be $f\circ g$. This immediately implies that 

Lemma 1:  $
f\c[(a+b)] = f\c[a][f\c[b]]
$

We also have

Lemma 2: For all $n,k\ge 0$, $f\c[k]-x$ divides $f\c[(n+k)]-f\c[n]$

Proof: Writing $f\c[n]=\sum_{h=0}^d a_h x^h$, then
$$
f\c[(n+k)]-f\c[n]=f\c[n][f\c[k]] - f\c[n]=\sum_{h=0}^d a_h((f\c[k])^h-x^h)
$$
Since $f\c[k]-x$ divides $(f\c[k])^h-x^h$ for all $h\ge 0$, it follows $f\c[k]-x$ divides $f\c[(n+k)]-f\c[n]$.

Lemma 3:  $f\c[n]-x$ divides $f\c[mn]-x$ 

Proof: Apply Lemma 2 to each summand in 
$$
(f\c[mn]-f\c[(m-1)n])+(f\c[(m-1)n]-f\c[(m-2)n])+\dots+(f\c[n]-x).
$$
Theorem 1
First, I deal with the trivial case where $f\c[i]=x$ for some $1\le i \le n$. This implies by induction on $m$ that $f\c[mi]=x$ for all $m\ge 0$, since $f\c[mi]=f\c[(m-1)i]\circ f\c[i]=f\c[(m-1)i]\circ x=f\c[(m-1)i]=x.$ Since there exists an $m$ for which $k+1\le mi\le k+n$, it follows that the product
$$
\prod_{i=k+1}^{k+n} (f\c[i]-x)
$$
contains a zero, so we are done. 
Therefore, we can assume $f\c[i]\neq x$ for all $i\le n$. This means
$$
\binom{n+k}n_f:=\frac{\prod_{i=k+1}^{k+n}(f\c[i]-x)}{\prod_{i=1}^n (f\c[i]-x)}
$$
is a well defined element of the fraction field $A(x)$ of $A[x]$. We prove this is actually a polynomial by induction on $\min(n,k)$. The base case $\min(n,k)=0$ follows because when $n=0$, both products are empty so the ratio is $\frac11=1$, and when $n=k$, both products are equal so the ratio is again $1$. By straightforward algebraic manipulations, you can show when $\min(n,k)\ge 1$, then
$$
\binom{n+k}n_f = \frac{f\c[(n+k)]-f\c[n]}{f\c[k]-x}\binom{n+k-1}n_f+\binom{n+k-1}{n-1}_f,
$$
so by the induction hypothesis and Lemma 2, this is a polynomial.
Theorem 2
First, I claim that for any coprime integers $m,n$, we have the following equality of ideals:
$$
\def\<{\langle}\def\>{\rangle}\<f\c[n]-x\> + \<f\c[m]-x\>=\<f-x\>
$$
The proof is by induction on $\max(n,m)$, the base case where $\max(n,m)=1$ being obvious. 
By Lemma 3, we have $f-x$ divides both $f\c[n]-x$ and $f\c[m]-x$, proving the inclusion $\<f\c[n]-x\> + \<f\c[m]-x\>\subseteq \<f-x\>$. For the other inclusion, assume that $n>m$, note that by induction we have
$$
\<f-x\>
=\<f\c[(n-m)]-x\>+\<f\c[m]-x\>
\subseteq\<f\c[n]-f\c[(n-m)]\>+\<f\c[n]-x\>+\<f\c[m]-x\>
$$
Since Lemma 2 impies $\<f\c[n]-f\c[(n-m)]\>\subset \<f\c[m]-x\>$, the claim follows.
The claim implies that 
$$
(f\c[n]-x)p(x)+(f\c[m]-x)q(x)=f-x
$$
for some polynomials $p$ and $q$. Multiplying both sides by $(f\c[mn]-x)$, we get
$$
(f\c[mn]-x)(f\c[n]-x)p(x)+(f\c[mn]-x)(f\c[m]-x)q(x)=(f-x)(f\c[mn]-x)
$$
Since Lemma 3 implies $f\c[m]-x$ divides $f\c[mn]-x$, we have $(f\c[m]-x)(f\c[n]-x)$ divides $(f\c[mn]-x)(f\c[n]-x)p(x)$. Similarly, $(f\c[m]-x)(f\c[n]-x)$ divides $(f\c[mn]-x)(f\c[m]-x)q(x)$. Since $(f\c[m]-x)(f\c[n]-x)$ divides both summands on the LHS of the above equation, it divides the RHS, as desired.