[This question is an extension of my question [Does a positive-measure subset of the unit interval almost surely intersect a random translation of some countable subgroup of $\mathbb{R}$?](https://mathoverflow.net/questions/210316/does-a-positive-measure-subset-of-the-unit-interval-almost-surely-intersect-a-ra). I'm asking it to help me solve my question [Do the Birkhoff averages of a measurable stationary homogeneous Markov process in continuous time "converge to the right limit"?](https://mathoverflow.net/questions/199540/do-the-birkhoff-averages-of-a-measurable-stationary-homogeneous-markov-process-i). ]



> 
> 
> > 
> > Does there exist a measurable function $F\colon [0,1]^{\mathbb{Q}\cap [0,1]} \to [0,1]$ with the property that for every measurable $f\colon [0,\infty) \to [0,1]$, for Lebesgue-almost all $\tau \geq 0$ we have
> >  $$ \int\_\tau^{\tau+1} f(t) \, dt \ = \ F\left( \, (f(\tau+q))\_{q \in \mathbb{Q}\cap [0,1]} \, \right) \ ? $$
> > 
> > 
> > 
> 
> 
> 


Given all the results to the effect that "measurable objects are approximately topological objects", it seems highly intuitive that the answer should be *yes*. In fact, it even seems intuitive to me that the function
$$ F\left( \, (r\_q)\_{q \in \mathbb{Q}\cap [0,1]} \, \right) \ := \ \limsup\_{n \to \infty} \, \frac{1}{2^n} \sum\_{k=0}^{2^n-1} r\_{\!\frac{k}{2^n}} $$
should work, but I have not managed to prove it.



Can the integral of a "generic" bounded measurable function be determined by its values on the rationals?
Yes your $F$ works. This is a result of B. Jessen, "On the Approximation of Lebesgue Integrals by Riemann Sums", Annals of Mathematics Second Series, Vol. 35, No. 2 (Apr., 1934), pp. 248-251.


I found this by googling "Strong Sweeping Out" and "Riemann sums". If you do the Riemann sum along multiples of $1/n$, however, things don't work at all as you take the limit as $n\to\infty$. You might look at the notes of Wierdl and Rosenblatt in the Cambridge University Press book for more info.


EDIT: So here are some more details of why your $F$ works. 
Define 
$$
\Lambda(f)(x)=\limsup\_{n\to\infty}\frac{1}{2^n}\sum\_{i=0}^{2^n-1}f(x+i/2^n).
$$
By Jessen's theorem, if $f$ is 1-periodic, then $\Lambda(f)(x)=\int\_0^1 f$ for Lebesgue-a.e. $x$. 


For $q\in\mathbb Q$, define a map $\Pi\_q$ sending a measurable function $f$ to the measurable 1-periodic function agreeing with $f$ on $[q,q+1)$ and let $\Lambda\_q=\Lambda\circ\Pi\_q$. By Jessen's theorem, $\Lambda\_q(f)(x)=\int\_q^{q+1}f$ for Lebesgue a.e. $x$. 
Let $A\_q=\{x\colon \Lambda\_q(f)(x)=\int\_q^{q+1}f\}$. 
If $f$ is bounded, it's straightforward to see that $\Lambda\_q(f)(x)\to\Lambda(f)(x)$ as $q\to x$ and also that $\int\_q^{q+1}f\to\int\_x^{x+1}f$ for all $x$. 


Now if $x\in\bigcap\_q A\_q$ (a set of full Lebesgue measure), we have $\Lambda(f)(x)=\lim\_{q\to x}\Lambda\_q(f)(x)
=\lim\_{q\to x}\int\_q^{q+1}f=\int\_x^{x+1}f$. 


By the way, I believe that Jessen's theorem follows quickly from the backwards martingale convergence theorem if you take the $\sigma$-algebras to be $\mathcal F\_n=\{B\in\mathcal B\colon B+2^{-n}=B\pmod 1\}$. 


