Is the following slightly generalization of Corollary 20.17 in Hewitt and Ross Book (page 296) correct?


Let $A$ be a subset of a profinite group $G$ ( compact, Hausdorff, totally disconnected topological group) such that $A=A^{-1}$ and $\lambda(A)>0$, where $\lambda$ is the normalized Haar measure of $G$. Suppose that 
$f$ is the function defined on $G\times \cdots \times G$ ($k$ times) into $\mathbb{R}^{\geq 0}$ by $$(x\_1,\dots,x\_k)\mapsto \lambda(A\cap x\_1 A \cap \cdots \cap x\_k A).$$
Then $f$ is continuous.


Note that $f(1,\dots,1)=\lambda(A)$ ( $1$ is the identity element of $G$), so $f$ is somewhere
positive.



Continuous function defined by measurable sets
The answer is yes, and the assumption of profiniteness is not needed (see comments). This can be proved by approximating in $L^2$
 the indicator function $1\_A$ by a continuous function $f$. 


Using the fact that such $f$ must be uniformly continuous, any small perturbation $f\_g$ of $f$ is within a small $L^\infty$ error of $f$. Therefore the map
$$\Phi\_f:(x\_1,\dots,x\_k)\mapsto\int\_G f(g)f(x\_1^{-1}g)\cdots f(x\_k^{-1}g)\,d\lambda(g)$$
is continuous.


As $f\to1\_A$ in $L^2$, Cauchy-Schwarz's inequality (together with the fact that we can keep every function in this argument bounded by $2$) implies that $\Phi\_f\to\Phi\_{1\_A}$ uniformly, which shows that $\Phi\_{1\_A}$ is also continuous.
Finally, note that
$$\Phi\_{1\_A}(x\_1,\dots,x\_k)=\lambda(A\cap x\_1A\cap\cdots\cap x\_kA).$$


The more general principle at play here is that for any $p<\infty$ the map $g\mapsto f\_g$ from $G$ to $L^p(G)$ is continuous, where $f\_g$ denotes the function $f\_g(x)=f(gx)$.


