Solution (source code)

= Solution

Seek $F=L+F_2+F_3+\cdots$, with each $F_d$ homogeneous of degree $d$. Suppose the terms below degree $d$ have been chosen. Comparing degree $d$ in
$$
f(F(X_1,\ldots,X_n))=F(g(X_1),\ldots,g(X_n))
$$
gives a linear equation for $F_d$ whose coefficient is $\pi-\pi^d=\pi(1-\pi^{d-1})$. The already known term is divisible by $\pi$ because $f(X),g(X)\equiv X^q\pmod\pi$ and every residue $\bar a_i\in\mathbb F_q$ satisfies $\bar a_i^q=\bar a_i$. Since $1-\pi^{d-1}$ is a unit, this determines a unique integral $F_d$. Induction constructs a unique $F\in\mathcal O_K[[X_1,\ldots,X_n]]$. This is the <Lubin–Tate functional equation lemma>.