3 Birkhoff’s Ergodic Theorem 467Putf ̄(x)= lim
n→∞
n−^1n∑− 1k= 0f(Tkx), f(x)= lim
n→∞n−^1n∑− 1k= 0f(Tkx).Thenf ̄andfareμ-measurable functions since, for any sequence(gn),
lim
n→∞
gn(x)=inf
m
(sup
n≥mgn(x)), lim
n→∞gn(x)=sup
m(inf
n≥m
gn(x)).Moreoverf ̄(x)=f ̄(Tx),f(x)=f(Tx)for everyx∈X,since
(n+ 1 )−^1∑nk= 0f(Tkx)=(n+ 1 )−^1 f(x)+( 1 + 1 /n)−^1 n−^1n∑− 1k= 0f(Tk+^1 x).It is sufficient to show that
∫
Xf ̄dμ≤∫
Xfdμ≤∫
Xfdμ.For then, sincef≤f ̄, it follows thatf ̄(x)= f(x)=f∗(x)forμ-almost allx∈X
and
∫
Xf∗dμ=∫
Xfdμ.Fix someM>0 and define the ‘cut-off’ functionf ̄Mbyf ̄M(x)=min{M,f ̄(x)}.Thenf ̄Mis bounded andf ̄M(Tx)=f ̄M(x)for everyx∈X. Fix also anyε>0. By
the definition off ̄(x), for eachx∈Xthere exists a positive integernsuch that
f ̄M(x)≤n−^1∑n−^1k= 0f(Tkx)+ε. (∗)Thus ifFnis the set of allx ∈Xfor which (∗) holds and ifEn=
⋃n
k= 1 Fk,then
E 1 ⊆E 2 ⊆ ···andX=
⋃
n≥ 1 En. Since the setsEnareμ-measurable, we can
chooseNso large thatμ(EN)> 1 −ε/M.
Put
f ̃(x)=f(x) ifx∈EN,
=max{f(x),M} ifx∈/EN.Also, letτ(x)be the least positive integern≤Nfor which (∗) holds ifx∈EN,and
letτ(x)=1ifx∈/EN.Sincef ̄MisT-invariant, (∗) implies
n∑− 1k= 0f ̄M(Tkx)≤n∑− 1k= 0f(Tkx)+nε