TITLE: What does the Haar measure on $\hat{\mathbf{Z}}$ look like?
QUESTION [7 upvotes]: What does the Haar measure on $\hat{\mathbf{Z}} = \prod_p \mathbf{Z}_p$ look like?
Does it bear any relation to the "upper density" of a subset $S\subset\mathbf{N}$ defined by $m(S) = \limsup_{n\to\infty} |S\cap\{1,\ldots,n\}|/n$?

REPLY [2 votes]: A way to construct an Haar measure on $\hat{\Bbb Z}$ is to take the product $\prod dz_p$ where $dz_p$ is an Haar measure on $\Bbb Z_p$ normalized so that $\int_{\Bbb Z_p}\,dz_p=1$.
This measure actually extends to an Haar measure on the full ring of adeles $\Bbb A=\Bbb Q\Bbb R\hat{\Bbb Z}$.
Any other Haar measure on $\hat{\Bbb Z}$ (or $\Bbb A$) is a scalar multiple of this one.