Characteristic is positive and exist polynomial with $g(X^p)=f$ 
$F$ is a field. A polynomial $f \in F[X]$ is inseparable and irreducible. Show that the characteristic $p$ of $F$ is positive and there exists $g \in F[X]$ with $g(X^p)=f$.

We know that $f$ is inseparable, so $\gcd(f,f')\neq 1$, so have to exist $g|f$ and $g|f'$, but is $g(X^p)=f$?
 A: $\gcd(f,f')$ is not the polynomial $g$ that you are looking for. In fact, since $f$ is irreducible, $\gcd(f,f')$ must be $f$ and hence, since $\deg f'<\deg f$, we have $f'=0$.
Now, let $f(X)=a_0+a_1X+a_2X^2+\cdots+a_nX^n$. Then,
$$f'(X)=a_1+2a_2X+3a_3X^2+\cdots+na_nX^{n-1}$$
but since $f'=0$, $ka_k=0$ for every $k\in\{1,\ldots,n\}$, that is, $a_k\neq 0$ implies $p\mid k$ for every $k\in\{1,\ldots,n\}$; this gives
$$f(X)=a_0+a_pX^p+a_{2p}X^{2p}+\cdots+a_{rp}X^{rp}$$
Can you figure out now what is $g$?
A: If $\gcd(f,f')\neq 1$, $f$ is not irreducible, unless $\gcd(f,f')=f$. As $\deg f'<\deg f$ if $f'\neq 0$, this means $f'=0$. If $f(X)=\sum_{k=0}^n a_kX^k$, then $f'(X)=\sum_{k=1}^n ka_kX^{k-1}$. In particular $f'=0$ implies $na_n=(n\cdot 1)a_n=0$, whence $n\cdot 1=0$ (if $a_n \neq 0$). The smallest $n\in\mathbf N$ such that $n\cdot 1=0$  in $F$ is a prime $p$.
Furthermore, we see that for any $k>0$ such that $a_k\neq 0$, we must have $k\cdot 1=0$, hence $k=lp$, so that
\begin{align*}
f(X)&=a_0+a_pX^p+a_{2p}X^{2p}+\dots+a_{mp}X^{mp}=g(X^p)\\\text{where}\quad g(X)&=a_0+a_p X+a_{2p}X^2+\dots+a_{mp}X^m
\end{align*}
