I have been studying this criterion that tell us that if $f:[a,b]\to \mathbb{R}$ is bounded and almost everywhere continuous respect to $\lambda$ (the Lebesgue measure) iff $f$ is Riemann integrable.
My problem is that I had this example let $f:[0,1]\to \mathbb{R}$
$$f(x)=\left\{\begin{array}{cc} 0& x\in [0,1]\setminus \mathbb{Q}\\ 1/q &\text{ if }p/q \text{ is the lowest expresion for }x\in \mathbb{Q}\cap [0,1] \end{array}\right.$$
So I know this functions is almost everywhere continuous and bounded. So by the criterion is Riemann integrable.
But I wanted to prove that this Riemann integrable with out the criterion, as my intuition tells me that it shouldn't be Riemann integrable but the theorem say it is.
Any help would be greatly apreciated.