$f$ has a zero integral on every measurable set. Prove $f$ is zero almost everywhere

Indeed, your proof shows that $\{f > 0\}$ has measure zero. Similarly, you show $\{f < 0\}$ has measure zero, and hence $f=0$ a.s. Yes it really is this easy.


It remains to show that the set $\{w\mid f(w)\ne0\}$ has measure $0$. Consider the nonzero rational $a$'s to complete the proof.