Solution (source code)

= Solution

A measurable set is invariant when $\theta^{-1}A=A$, or modulo a null set in the measure-theoretic version. A measurable function is invariant when $f\circ\theta=f$, similarly almost everywhere if appropriate. The map is a <measure-preserving transformation> when $\mu(\theta^{-1}A)=\mu(A)$ for every measurable set. A measure-preserving map is <ergodic> when every invariant measurable set has measure zero or has null complement. On a finite positive measure space, normalize the measure to obtain the equivalent probability-space definition.