the invariant sigma-algebra
When a measure-preserving system runs forever, some events are unchanged by the dynamics — the orbit either always lands in them or always avoids them. Collecting all such events gives the invariant sigma-algebra, the precise carrier of the system's conserved information and the object onto which Birkhoff's theorem projects.
A set A in F is (strictly) invariant if T^(-1) A = A, and almost-invariant if P(T^(-1) A triangle A) = 0 (the symmetric difference is null). The almost-invariant sets form a sigma-algebra, written I (or J), called the invariant sigma-algebra; up to null sets the two notions coincide. A function f is invariant if f compose T = f a.e., and the invariant functions are exactly the I-measurable ones. The conditional expectation E[ f given I ] is the orthogonal projection (in L^2) of f onto invariant functions; Birkhoff's theorem identifies this projection as the almost-sure limit of the time averages (1/n) sum_(k=0)^(n-1) f compose T^k.
Ergodicity is the statement that I is trivial: every invariant set has probability 0 or 1, so the only invariant functions are constants. In that case E[ f given I ] = E[f], and time averages converge to a single number, the space average. The size of I therefore measures how far a system is from ergodic: a non-ergodic system splits into pieces (its ergodic components), and I is generated by the indicators of those pieces. A subtle point: invariance under T^(-1) and a separate notion using the forward map can differ for non-invertible T, and "invariant mod 0" is the version that interacts correctly with P.
For an iid sequence under the shift, the Kolmogorov 0-1 law says the tail sigma-algebra is trivial, and so is the invariant sigma-algebra: the shift is ergodic. Hence E[ X_0 given I ] = E[X_0], and the time average (1/n) sum X_k converges to the constant E[X_0] — the strong law.
Triviality of I is ergodicity, and it is what collapses the Birkhoff limit from a random variable to a constant.
Do not confuse the invariant sigma-algebra with the tail sigma-algebra. They coincide for iid sequences but differ in general; for example a system can be non-ergodic (non-trivial I) yet still have a trivial tail under other dynamics.