The Lebesgue integral of certain function on the set of irrational numbers of the unit interval We define a function on $J$, the set of irrational points of the interval $(0,1)$ with $$f(0/a_1a_2a_3a_4\ldots)=0/a_2a_1a_4a_3\ldots$$ What is the value of  Lebesgue integral $$\int_J f $$  Furthermore is there an algebraic formulation for $f$?
 A: Hints: (Thanks to @EricWofsey for catching an egregious error.)
Let $d_k(x)$ be the $k$th
 element of decimal expansion of $x$. Then
$\int d_k = {1 \over 10} (0+1+\cdots + 9)= {9 \over 2}$.
We have $x = \sum_{k=1}^\infty d_k(x) {1 \over 10^k}$.
Note that for any nice functions $g_k$ that satisfy $\int g_k = {9 \over 2}$ we have
$\int ( \sum_{k=1}^\infty g_k(x) {1 \over 10^k} ) dx =\sum_{k=1}^\infty \int g_k(x) {1 \over 10^k} dx = {1 \over 2}$.
A: Here is a probabilistic take on essentially the same method as copper.hat's answer.  Lebesgue measure on $[0,1]$ is the same as the probability measure where you independently choose each digit uniformly from $\{0,1,\dots,9\}$.  Now, $f(x)$ (thought of as a random variable) has this same property: each digit of $f(x)$ is chosen independently and uniformly from $\{0,1,\dots,9\}$, since the digits of $f(x)$ are just the digits of $x$ in a different order.  This means that random variable $f(x)$ has the same probability distribution as the identity random variable $g(x)=x$, and so they have the same expectation.  That is, $$\int_{J} f(x)\,dx=\int_J x\,dx=\frac{1}{2}.$$
