In order to work with functions defined on $\mathbb{Q} \cap [0,1]$ I would like to define an adapted "integration" formula on this set. I though that following definition could be interesting:


$$ \int\limits\_{\mathbb{Q}\cap [0,1]} f(x) dx = \lim\_{Q \to \infty} \frac{2}{(Q+1)Q} \sum\limits\_{q =1}^{Q} \sum\limits\_{a =0}^{q-1} f(\frac{a}{q})$$


This formula has the advantage of a clear sum indexation.
But I am sure this option and other options exist in literature ? Any reference on the subject ?


With above formula it is intuitive (I think!) that for a bounded, continuous and differentiable function defined on $[0,1]$, we have:


$$ \int\limits\_{\mathbb{Q}\cap [0,1]} f(x) dx = \int\limits\_{0}^{1} f(x) dx$$


but it is not obvious to prove it. Any idea of a demonstration or reference with similar "sum - integral" equivalences is welcome.


(This post is linked to this post :
 [On construction of a $\mathbb{Q}$ periodic function with Fourier series](https://mathoverflow.net/questions/238320/on-construction-of-a-mathbbq-periodic-function-with-fourier-series), in the way that I would like to use this integration for the type of functions defined in it.)



Formula for an integration on $\mathbb{Q} \cap [0,1]$
All you need is that $f$ is continuous on $[0,1]$.


Letting $$S(q) = \dfrac{1}{q} \sum\_{a=0}^{q-1} f(a/q)$$
(which is a Riemann sum for $J = \int\_0^1 f(x)\; dx$) and
$$ R(Q) = \sum\_{q=1}^Q \dfrac{2q}{Q(Q+1)} S(q)$$ you are defining
$$ \int\_{\mathbb Q \cap [0,1]} f(x)\; dx = \lim\_{Q \to \infty} R(Q)$$


For any $\epsilon > 0$ there is $N$ such that $|S(q) - J| < \epsilon$ for $q \ge N$, and then for $Q > N$
$$ \eqalign{|R(Q) - J| &\le \sum\_{q< N} \dfrac{2q}{Q(Q+1)} |S(q)-J| + \epsilon \sum\_{q=N}^Q \dfrac{2q}{Q(Q+1)}\cr
&\le \dfrac{N(N+1)}{Q(Q+1)}(\|f\|\_\infty + |J|) + \epsilon } $$
which is less than $2\epsilon$ if $Q$ is sufficiently large. Thus indeed $\lim\_{Q \to \infty} R(Q) = J$.


