Proof of $g$ is integrable on $[a,b]$ and $\int_a^c g=0~~\implies g(x) = 0$ a.e I have a proof of a Lemma I don't quite understand and I was wondering if someone would be kind enough to explain it to me.  
Lemma. 
If $g$ is integrable on $[a,b]$ and $\int_{a}^{c} g=0~~\forall~c\in [a,b]$, then $g(x) = 0$ almost everywhere on $[a,b]$.   
Proof: 
Let $\mathcal{C}$ be the collection of all sets over which $\int g =0$. Then $\mathcal{C}$ contains all the intervals in $[a,b]$. Thus, it contains all closed sets in $[a,b]
$. Now, suppose to the contrary the $g\neq 0$. Then either $\{g>0\}$ or $\{g<0\}$ contains a closed set, say, $F$ of positive measure. Then $\int_{F}~ g \neq 0$, which is a contradiction. Hence $\int_{a}^{c} g=0$.
 A: Your $f$ should be $g$.  $\cal C$ is the collection of all measurable subsets $S$ of $[a,b]$ such that $\int_S g = 0$.  The assumption $\int_a^c g = 0$ says that the interval $(a,c)$ (or equivalently $[a,c]$) is in $S$, but it's easy to see that every interval $(c,d) \subseteq [a,b]$ is in $\cal C$ because $\int_c^d g = \int_a^d g - \int_a^c g$.  If $F$ is any closed subset of $[a,b]$, the complement $[a,b] \backslash F$ is an open set, which is the union of at most countably many disjoint intervals $I_n$.  Now $\int_{\bigcup_n I_n}\, g = \sum_n \int_{I_n} g = 0$, and $\int_F\, g = \int_a^b g - \int_{[a,b] \backslash F}\, g = 0$. Thus $\cal C$ contains all closed subsets of $[a,b]$. 
The next ingredient in the proof is the inner regularity of Lebesgue measure, which implies that any measurable subset $E$ of $[a,b]$ contains a closed set $F$ whose measure $m(F)$ is arbitrarily close to the measure $m(E)$ of $E$: in particular, if $E$ has positive measure, so does $F$.  Now, the union of the measurable sets  $\{x: g(x) > 1/n \}$ and $\{x: g(x) < -1/n\}$ is $\{x: g(x) \ne 0\}$.  If $g$ is not almost everywhere 0, then some of those, say $E = \{x: g(x) > 1/n\}$, has positive measure.  So inner regularity says there is a closed subset $F$ of $E$ that has positive measure.  But then $\int_F g \ge (1/n) m(F) > 0$, contradicting the fact that $F \in \cal C$.
