I was thinking about integrals and how one might generalize them to be able to integrate over fractals rather than just over intervals. For example, consider the cantor set $C$. Let us assume that $$\int_C dx=1$$ for our funny, not-yet-well-defined integral-like operation. If we assume linearity of this "funny integral," then we may calculate the integral of $xdx$ over the Cantor set, because of its symmetry about $x=1/2$: $$\int_C xdx=\int_C (1-x)dx=1-\int_C xdx=\frac{1}{2}$$ We may also make use of the fact that the left half of the Cantor set, or $C_1$, is a contraction of $C$ by a factor of $3$, and the right half $C_2$ is also a contraction of $C$ by a factor of $3$. If $f$ is a function defined over the Cantor set, by extending another property of integrals to our "funny integral," we have that $$\int_C f(x)dx=\int_{C_1}f(x)dx+\int_{C_2}f(x)dx$$ However, if we wish to make the substitution $x\to x/3$, we should not replace $dx$ with $dx/3$, because shrinking $C$ by a factor of $3$ does not actually decrease its "size" by a factor of $3$, but rather by a factor of $2$ (this is also why the fractal dimension of $C$ is $\log_3(2)$). Thus, when we let $x\to x/3$, we must also let $dx\to dx/2$, giving us $$\int_C f(x)dx=\int_{C}\frac{f(x/3)+f(1-x/3)}{2}dx$$ This formula, derived by assuming some of the familiar properties of the classical integral for our "funny integral," allows one to compute the integrals of $x^2,x^3,x^4,$ and so on recursively.
My question is the following: Is there a "proper" way (a way already accepted and used by mathematicians, I mean) to integrate over a nasty fractal set like $C$, and if so, do my assumptions about the "funny integral" still hold? I would be very surprised if this sort of thing has not been formalized yet.
For the specific example of integration over the Cantor set, these manipulations can be rigorously interpreted by considering the random variable $X=\sum_{i=1}^{\infty}B_i/3^i$. Here $B_i$ are iid and take the values $0$ and $2$ with probability $1/2$. Then an "integral over the cantor set" can be seen as integration with respect to the distribution of $X$. In particular, we have $X=^dB/3+X/3$ where $B=^d B_1$ and $B$ and $X$ are independent.
For example, $EX=EB/3+EX/3$. Since $EB=1$, we conclude $EX=1/2$.
Similarly, $EX^2=E(B^2)/9+2EBEX/9+E(X^2)/9$ which can be solved for $EX^2$ as above, and we can obtain a recursive formula for expectations of higher powers by using the binomial theorem and the independence of $B$ and $X$