# A question regarding separable continuity and measurability

Suppose $f(x,y)$ is a function mapping from $R^2$ to $R$ and it is continuous in each variable separately (separable continuity), then why $f(\frac{{\left\lfloor {mx} \right\rfloor }}{m},\frac{{\left\lfloor {ny} \right\rfloor }}{n})$ is Lebesgue measurable where $m,n$ are positive integers? How to show the measurability? $\left\lfloor {mx} \right\rfloor$ denotes the largest integer no larger than $mx$.

Actually similar question has been asked here Showing a function of two variables is measurable and here Separate continuity implies measurability. I have examined the answers to the two posts but still don't get it. Hope someone can help. Thank you!

For any function $f:\mathbb{R}^2\to\mathbb{R}$ the composition $f_{m,n}(x,y) = f(\frac{{\left\lfloor {mx} \right\rfloor }}{m},\frac{{\left\lfloor {ny} \right\rfloor }}{n})$ is Lebesgue measurable. Indeed, $f_{m,n}$ is constant on half-open rectangles of size $(1/m)$ by $(1/n)$. Therefore, for any set $A\subset\mathbb{R}$ the preimage $f_{m,n}^{-1}(A)$ is a countable union of rectangles and is therefore measurable.
As Davide Giraudo wrote, for a fixed $m$, $f_{m,n}(x,y)\to f\left(\frac{\lfloor mx\rfloor}m,y\right)$ as $n\to\infty$, because $f$ is continuous in the second variable. Similarly, $f\left(\frac{\lfloor mx\rfloor}m,y\right)\to f(x,y)$ as $m\to\infty$, because $f$ is continuous in the first variable. It follows that
$$f = \lim_{m\to\infty}\lim_{n\to\infty} f_{m,n}$$ is measurable, being the pointwise limit of measurable functions.