If $C$ is a compact (semi-)topological (semi-)group, are there nonzero positive functions having zero Haar integral? In other words: is the Hermitian product associated to the Haar integral degenerate?


The motivation of my question: if $G$ is a locally-compact (semi-)topological (semi-)group, $C$ its almost periodic (AP) compactification and $\lambda$ a Haar measure on $G$, then for any AP function $f$ on $G$ and any Foelner sequence $H\_n$ in $G$ one has:


$\int\_{C} f \mathbb{dc} = \mathbb{lim}\_{n\rightarrow\infty} \frac{\int\_{H\_n} f \mathbb{dg}}{\lambda (H\_n)}$


But then, if $f$ is as above AND integrable (like $\frac{1}{1+x^2}$ on $R$), the previous result implies that when it is lifted to the compatification its integral becomes 0 (despite the fact that its lift is positive, since a group is dense in its compactification).


For details about the theorem see Hewitt & Ross, "Abstract Harmonic Analysis", p.252-253.



Positive function with zero Haar integral
The answer to the question asked is no, i.e. the Haar integral $I(f)$ of a nonzero, nonnegative continuous function $f$ is always positive. See Hewitt & Ross, [Theorem (15.5)(i)](http://books.google.com/books?id=uf11K1wXEYUC&pg=PA185).


The mistake in your argument is that $f(x)=1/(1+x^2)$ is not almost periodic. Indeed, recall that $f$ is almost periodic iff $\forall\varepsilon>0$ $\exists L>0$ such that every interval of length $L$ contains an *$\varepsilon$-almost period* of $f$, i.e. a number $P$ such that $\sup\_{\mathbf{R}}|f(\cdot - P)-f(\cdot)|\leqslant\varepsilon$. But it is clear (from looking at the graph) that $\sup\_{\mathbf{R}}|f(\cdot - P)-f(\cdot)|>\frac12$ for every $P$ in every interval $[10, 10+L]$ say.


Re: "just think of a continuous, bounded, AP integrable function", there is no such function $f$ except zero. Indeed if $\int\_{-\infty}^\infty |f(x)|dx<\infty$ then $I(|f|)=\lim\_{T\to\infty}\frac1{2T}\int\_{-T}^T |f(x)|dx=0$, whence $f=0$ by the above-quoted Theorem (15.5).


