I have been working through Terry Tao's Introduction to measure theory. A draft can be found here.
In section 6, The one sided Hardy-Littlewood maximal inequality is proved. It stated that if $f : \mathbb{R} \to \mathbb{C}$ is an absolutly integrable function and $\lambda > 0$ then $ m ( \{ x \in \mathbb{R} : {\rm sup}_{h > 0} \frac{1}{h} \int_{[x,x+h]} \lvert f(t) \lvert dt \geq \lambda \} ) \leq \frac{1}{\lambda} \int _{\mathbb{R}} \lvert f(t) \lvert dt.$
In exercise 1.6.13 of the same section, it is claimed that this inequality is actually an equality. But if we let $\lambda = 1$ and $f = \frac{1}{2} \chi_{[0,1]}$ then the LHS = $0$ and the RHS = $\frac{1}{2}$.
I don't think I am missing anything and I know that Terry is not missing anything so what is the deal?