Let $f:\mathbb R\to[0,\infty)$ be a non-negative, Borel-measurable, and integrable function (with respect to the Lebesgue measure). Suppose that $-\infty<a<b<\infty$ implies that $$\int_a^b f(x)\,\mathrm d x>0.$$ Does it necessarily follow that $f$ is positive almost everywhere?
I conjecture the answer is pretty straightforward (I know the converse is true) but it is eluding me right now for some reason. Any hints would be greatly appreciated.
Let $C$ be a Cantor set of positive measure and $f=\chi_{\mathbb R \setminus C}$. Then $f=0$ on $C$ which has positive measure. If $\int_a^{b} f =0$ then $f=0$ a.e. on $(a,b)$ which means almost all points of $(a,b)$ are in $C$. Since $C$ is closed this implies $[a,b] \subseteq C$. But $C$ contains no non-degenerate interval.