Let $X$ be a locally compact metric space.
Assume that a commutative operation "$+$" is defined on $X$ with $(X,+)$ forming a group.
Assume further that for any $y\in X$, $x\mapsto x+y$ is a bijective isometry. (We say $h:X\rightarrow X$ is an isometry iff for all $x_1,x_2 \in X$, $d(x_1,x_2)=d(f(x_1),f(x_2))$.)
Let $\int_X \cdot \,dx$ denote the integral formed from the Haar measure on the locally compact topological group $(X,+)$.
What is the weakest possible additional assumption for it to be true that for all bijective isometries $f:X\rightarrow X$: $$\int_X {g(x)\,dx}=\int_X {g(f(x))\,dx}$$ for all functions $g:X\rightarrow\mathbb{R}$ for which the integrals are defined.
Notes:
- If $X=\mathbb{R}$, then $f$ is a shift and/or reflection, and the claimed result holds by a trivial substitution.
- If $X=\mathbb{R}^n$ with the usual metric, then $f$ is a translation followed by a unitary transformation, so the result again goes through. It is not clear that it holds with non-standard metrics though.
- The result also holds for circles and spheres with the standard metric.
- The claimed result will not hold in general if $f$ is not an isometry. For example, take $X=[0, 1]$, $g(x)=x$ and $f(x)=x^2$.
I would guess that the missing condition ensures that the metric in some sense agrees with the measure. For example, consider the Manhattan or max metrics on Euclidean space. They generate the same topology and thus (?) the same Haar measure, but it seems unlikely the integral condition holds for these metrics.
New note: This question (just discovered) is clearly very closely related: Existence of isometry-invariant measures
The only missing step is from the invariance of the measure to the invariance of the integral, but I guess this is trivial.