> [!NOTE] Lemma > Let $f$ denote [[Thomae's function|Thomae's function]]: that is, $f: (0,1) \to \mathbb{R}$ such that $f(x) = \begin{cases} > \frac{1}{q} & x=\frac{p}{q} \text{ with } p\perp q \\ > 0 & x \not\in \mathbb{Q}. > \end{cases}$Then $f$ is [[Riemann integration|Darboux integrable]]. **Proof**: For every [[Finite Partition of Closed Real Interval|finite partition]] of $[0,1],$ $P,$ the [[Riemann integration|lower sum]] of $f$ with respect to $P$ is given by $L(f,P)=0$ since by [[Between two Different Real Numbers exists an Irrational Number]], every part of $P$ contains an irrational point. Thus the [[Riemann integration|lower integral]] is given by $\underline{\int}f=0.$ Let $\varepsilon>0.$ Let $R=\left\{ x\in [0,1]: f(x)\geq \frac{\varepsilon}{2} \right\}$ then $R$ is [[Finite Set|finite]] since... Let $|R|$ denotes its [[Cardinality|cardinality]]. Let $P=\{ x_{0},x_{1},\dots,x_{n} \}$ be a partition of $[0,1]$ which includes intervals of length at most $\varepsilon/2|R|$ around these points. Let $B=\{ 0 \leq i\leq n: [x_{i-1},x_{i}] \cap R \neq \emptyset \}.$ Then $\begin{align} U(f,P)&=\sum_{i\in B} M_{i} (x_{i}-x_{i-1}) + \sum_{i\not \in B} M_{i} (x_{i}-x_{i-1}) \\ &< \sum_{i\in B} \frac{\varepsilon}{2} \cdot (x_{i}-x_{i-1}) + \sum_{i\not\in B} 1 \cdot (x_{i}-x_{i-1}) \\ &< \frac{\varepsilon}{2} + \frac{\varepsilon}{2|R|}\cdot |R| = \varepsilon \end{align}$ By [[Characteristic Property of Supremum of Subset of Real Numbers]], the [[Riemann integration|upper integral]] of $f$ is given by $\overline{\int} f =0.$