Solution (source code)

= Solution

Use the <Fourier basis>
$$
e_k(x)=e^{ikx},\qquad k\in\mathbb Z,
$$
of $L^2([-\pi,\pi]_{\rm per})$. For the rotation $F(x)=x+a$,
$$
K_Fe_k=e^{ika}e_k.
$$
If $a/\pi$ is irrational, $e^{ika}=1$ implies $k=0$. Hence every fixed $L^2$ function has only its constant Fourier coefficient, and part (i) proves ergodicity.

If $a/\pi=p/q$ is rational, then
$$
e_{2q}(x)=e^{i2qx}
$$
is a nonconstant fixed function because $e^{i2qa}=e^{i2\pi p}=1$. Part (i) now shows that the system is not ergodic. Therefore the <ergodicity criterion for a circle rotation> is
$$
\boxed{F\text{ is ergodic}\iff a/\pi\notin\mathbb Q.}
$$