# Positive function with zero Haar integral

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.

-
The group is dense in its compactification. But not open. In fact, the group $\mathbb R$ has measure zero in its Bohr compactification. Your function $1/(x^2+1)$ is identiacally zero except on that set of measure zero. –  Gerald Edgar Jun 2 '12 at 21:07
Moreover, $\frac1{x^2+2}$ is not "as above and integrable": it is not almost periodic, hence has no canonical extension (not "lift"!!) to the compactification. It goes the other way: (continuous) functions on $b\mathbf{R}$ pull back to (continuous) almost periodic functions on $\mathbf{R}$. –  Francois Ziegler Jun 2 '12 at 22:43
Gerald Edgar: The AP compactification takes CONTINUOUS bounded AP functions $f$ and gives back CONTINUOUS functions $\tilde{f}$ on the AP compactification, by the Gelfand-Naimark isomorphism. Since $\tilde{f}$ is continuous, it can't be nonzero but zero almost everywhere, as you say. Francois Ziegler: Correct me if I'm wrong: $\frac{1}{1+x^2}$ has the derivative bounded by 1 and as such $|f(x)-f(y)|\leq|x-y|$ (by Lagrange's mean value theorem), and it's now easy to see that it's AP (it's Lipschitz!). Still, my question remains (just think of a continuous, bounded, AP integrable function). –  Alex M Jun 3 '12 at 7:15

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).
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).