Approximate invariance for ergodic actions of amenable groups

We develop in this paper some general techniques to analyze action sets of small doubling for probability measure-preserving actions of amenable groups. As an application of these techniques, we prove a dynamical generalization of Kneser's celebrated density theorem for subsets in $(\bZ,+)$, valid for any countable amenable group, and we show how it can be used to establish a plethora of new inverse product set theorems for upper and lower asymptotic densities. We provide several examples demonstrating that our results are optimal for the settings under study.

where AB denotes the "action set" ∪ a∈A aB ⊂ Y and d * (A) the (left) upper Banach density of A. Furthermore, if every finite-index subgroup of G acts ergodically on (Y, ν), and if the lower bound above is attained for some Borel set B, then A must be contained in a "Sturmian set" (a very well-structured Bohr set) with the same upper Banach density as A.
We apply these results to problems in additive combinatorics concerning asymptotic densities of product sets in G. More specifically, we show that if A ⊂ G is a "sufficiently aperiodic" large set, then for any (left) Følner sequence (F n ) in G and for every syndetic set B ⊂ G, we have d (Fn) (AB) min(1, d * (A) + d (Fn) (B) , where d (Fn) (A) denotes the lower asymptotic density of A along (F n ). This may be viewed as a generalization of the Kneser's celebrated density theorem on sets of small doubling in (Z, +) to arbitrary countable amenable groups. We also show that if the lower bound above is attained for some left Følner sequence (F n ) and for some syndetic set B in G such that the product set AB does not contain a piecewise periodic set, then A must be contained in a Sturmian set with the same upper Banach density as A. In the appendix we show that our assumptions on A, B and AB are indeed necessary already in the case when G = (Z, +) and F n = [−n, n]. As an application of our combinatorial results, we provide a classification of "spread-out" 2approximative subgroups in a general countable amenable group.
Finally we develop a "Counterexample Machine" which produces in certain two-step solvable groups, pairs of large subsets with "small" product sets whose "right" (but not left) addends fail to be "nicely" controlled by either periodic or Sturmian sets.

Kneser's density theorem
Let G be a countable discrete group. Given two subsets A, B ⊂ G, we define their product set AB by It is a fundamental problem in the research field of arithmetic combinatorics to understand the structure of "large" sets A, B ⊂ G for which the product set AB is "small", where the intentionally vague notions "large" and "small" are allowed to vary.
The problem has so far mostly been studied in the case when G = (Z, +); in this setting, we (temporarily) define a set A ⊂ Z to be large if its lower asymptotic density d(A), given by d(A) = lim n |A ∩ [1, n]| n is positive. Extending a celebrated result by Mann, known as one of Chintschine's "Three pearls of number theory" [7], Kneser proved in [19] that if A ⊂ Z is large and "sufficiently spread-out", meaning that A ∩ N is not contained in a proper periodic set P ⊂ Z such that then neither A nor B can be spread out in the sense described above, and must thus be "controlled" by proper periodic sets P and Q, which are not much larger than A and B (in the sense that (1.1) hold for (A, P) and (B, Q)).

Main ergodic-theoretical results
Ever since the very influential work of Furstenberg [10], it has been a common practice in ergodic Ramsey theory to prove results in arithmetic combinatorics by first converting them into essentially equivalent "dynamical" versions. By the general "structure theory" of ergodic systems, we can then often reduce the proofs of these dynamical versions to simpler classes of systems for which a larger set of technical tools is available. In our setting, this strategy works as follows.
Let Y be a set equipped with an action of G. Given a subset A ⊂ G and a set B ⊂ Y, we define their action set AB by Note that if Y = G, on which G acts by left multiplication, then action sets are the same as product sets. If Y is a Borel space, the G-action on Y is Borel measurable and B ⊂ Y is Borel measurable, then AB is again Borel measurable (since G is countable).
In what follows, let (Y, ν) be a standard Borel probability measure space, equipped with an action of a countable group G by bi-measurable maps which preserve ν. We refer to (Y, ν) as a Borel G-space. Throughout this section, we shall always assume that our Borel G-spaces are ergodic, i.e. any G-invariant Borel set of Y must be either ν-null or ν-conull. The line of study pursued in this paper was inspired by the following natural (although vague) question: Question 1. Given a "large" subset A ⊂ G and an ergodic Borel G-space (Y, ν), can we provide non-trivial lower bounds on ν(AB) for a general Borel set B ⊂ Y with positive ν-measure in terms of the "size" of A and ν(B) alone? Let us give an example of a "trivial" lower bound in the case when G is a countable abelian group. We note that since ν is G-invariant, we always have ν(AB) ν(B) for any Borel set B ⊂ Y, and it is not hard to show (see e.g. the appendix in [5]) that ν(AB) d * (A) for any B ⊂ Y with positive ν-measure, where d * (A) denotes the upper Banach density of A (see definition below). Hence, if we combine the two lower bounds, we get ν(AB) max d * (A), ν(B) , for every A ⊂ G and every Borel set B ⊂ Y with positive measure. We note that if G has a finiteindex subgroup G o which does not act ergodically on (Y, ν), then upon choosing A ⊂ G o and B ⊂ Y a G o -invariant Borel set with positive measure, we see that this lower bound is indeed sharp. We wish to improve on this bound when some form of "aperiodicity" is forced upon A.
In order to make the notions of "large" and "aperiodic" more precise, we begin by recalling some useful notions. We say that a sequence (F n ) of finite subsets of G is (left) Følner if lim n |F n ∆gF n | |F n | = 0, for all g ∈ G, and we say that G is amenable if it admits a Følner sequence. We stress that we do not assume that (F n ) exhausts G. For instance, G = (Z, +) is amenable, and are all examples of Følner sequences in G. More generally, every solvable (in particular, abelian) group is amenable, as is every locally finite group and every group of intermediate growth. However, free groups of rank at least two, are non-amenable, as is every (countable) group which contains such a free group.
Let us from now on assume that G is amenable, and let (F n ) be a Følner sequence in G. Given a subset A ⊂ G, we define its upper and lower asymptotic density by d (F n ) (A) = lim n |A ∩ F n | |F n | and d (F n ) (A) = lim n |A ∩ F n | |F n | .
Note that if G = (Z, +), then d = d ( [1,n]) . Since there is no canonical choice of a Følner sequence in G, it is also natural to consider the following "uniformizations" of the asymptotic densities. We define the upper and lower Banach density of A ⊂ G by • syndetic if there exists a finite set F ⊂ G such that FD = G.
• thick if there is, for every finite set F ⊂ G, an element g ∈ G such that Fg ⊂ D.
• periodic if its stabilizer group Stab G (D), defined by Stab G (D) = g ∈ G : gD = D has finite index in G.
• piecewise periodic if there is a periodic set P and a thick set T such that D = P ∩ T .
• spread-out if there is no subset D o ⊂ D with d * (D o ) = d * (D) which is contained in a proper periodic set. In particular, D is large. We note that if G lacks proper finite-index subgroups, then every large set is automatically spread-out.
Example 1. The definition of a spread-out set may seem a bit technical at first. For the convenience of the reader, let us briefly discuss a general dynamical construction of such sets. Let Y be a compact metrizable space, equipped with an action of G by homeomorphisms. Let us further assume that the action has a unique G-invariant probability measure ν with full support, which is ergodic with respect to every finite index subgroup of G.
Then for any open set B ⊂ Y, and ν-almost every y ∈ Y, the set of return times B y = {g ∈ G : gy ∈ B} is spread-out. If B is assumed to be ν-Jordan measurable, then B y is in fact spread-out for every y ∈ Y. In particular, if G admits a homomorphism τ into a compact connected group K with dense image, and B ⊂ K is Jordan measurable, then τ −1 (B) is spread-out.
Our first dynamical result provides a non-trivial answer to Question 1. We stress that this result is completely new already for G = (Z, +). (1. 2) The proof of Theorem 1.1 is outlined in Section 5 and heavily utilizes our "Correspondence Principles for action sets", which constitute the main technical core of this paper. The aim of these Correspondence Principles is to reduce the study of action sets in general ergodic systems, to the study of products of Borel sets in compact metrizable groups, which contain (some factor of) G as a dense subgroup. Since G is assumed to be amenable, serious constraints are forced on the identity components of these compact groups. In fact, by an application of Tits' alternative, they must be abelian (see Proposition 2.9 below).
Luckily, there already exist in the literature a plethora of results which deal with products of "large" Borel sets in the latter kind of groups. Some of these results are strong enough to be plugged into our "Correspondence Machinery", and return Theorem 1.1.
Example 2 (Grigorchuk group). Let us briefly comment on the role of the assumption that the set A in Theorem 1.1 must be spread-out. While this assumption is harmless if G lacks proper finite-index subgroups, it is quite a strong assumption (when action sets are concerned) if G is a finitely generated amenable torsion group, e.g. the (first) Grigorchuk group. In Subsection 5.3, we show that if G is such a group, and A ⊂ G is spread-out, then ν(AB) = 1 for every ergodic Borel G-space and Borel measurable set B ⊂ Y with positive measure.
Let us address the question when the lower bound in Theorem 1.1 is attained. As it turns out, there are relatively few such examples, and they are essentially all encompassed by the following construction. In what follows, let T denote the one-dimensional torus, which we think of as (R/Z, +), and let M denote either T or the "twisted" (non-abelian) torus T ⋊ {−1, 1}, where the group ({−1, 1}, ·) acts on T by multiplication. If K is a compact Hausdorff group, we let m K denote the Haar probability measure on K. Definition 1.2 (Sturmian set). We say that a set A ⊂ G is Sturmian if there exists a homomorphism τ : G → M, a closed and symmetric interval I ′ ⊂ T and a ∈ M such that either In either case (M = T or M = T ⋊ {−1, 1}), the homomorphism τ : G → M in the definition above gives rise to an ergodic measure-preserving action of G on (M, m M ) by g · m = τ(g)m, for g ∈ G and m ∈ M.
Let I ′ , J ′ ⊂ T be closed and symmetric intervals such that We leave it to the reader to verify that in either case, we have In other words, the pair (A, B) realizes the lower bound in Theorem 1.1. Furthermore, A is spread-out in G (see Example 1).
Let us now formulate our second main dynamical theorem, which very roughly asserts that the only examples of pairs (A, B), where A ⊂ G is a spread-out subset of G, and B is a Borel set with positive measure in an ergodic Borel G-space (Y, ν), which together attain the lower bound in Theorem 1.1 stem from the construction above.
then A is contained in a Sturmian subset of G with the same upper Banach density as A. In particular, if every finite-index subgroup of G acts ergodically on (Y, ν), then it suffices to assume that A is spread-out and B has positive measure.
The "untwisted" Sturmian sets (M = T) have been extensively studied in complexity theory and tiling theory, see e.g. the survey [29]. On the other hand, it seems that our paper is the first one to deal with their "twisted" analogues. Of course, for abelian G, only "untwisted" Sturmian sets exist. However, there are natural examples of countable groups for which only twisted Sturmian sets exist.
Example 3 (Dihedral group). Let G = Z ⋊ {−1, 1} denote the infinite dihedral group, and note that the commutator group [G, G] equals 2Z ⋊ {1}. We conclude that if (K, τ K ) is any abelian compactification of G, then K must be finite. In particular, G does not admit any homomorphism into T with a dense image. On the other hand, there are plenty of homomorphisms into M = T ⋊ {−1, 1} with dense images; for instance, let α ∈ T be irrational, and define the homomorphism τ M : One readily checks the image is dense in M.

Main combinatorial results
The combinatorial applications that we have in mind in this paper are motivated by the following density analogue of Question 1.

Question 2.
Let G be a countable amenable group, and let ρ be a left-invariant density on G, 3) for some fixed Følner sequence (F n ). Given a set A ⊂ G, can we provide non-trivial lower bounds on ρ(AB) for a ρ-large set B ⊂ G in terms of the "size" of A and ρ(B) alone?
In this paper, we show how to, given a large set A ⊂ G, answer Question 2 for the listed densities in (1.3) above, provided that one has answered Question 1 for a general Borel Gspace (Y, ν). While this translation between Question 1 and Question 2 is well-known for ρ = d * and ρ = d * (see e.g. [3]), it is certainly new for ρ = d (F n ) and ρ = d (F n ) for a fixed Følner sequence (F n ) in G (already in the case G = (Z, +) and F n = [1, n]).
Our generalization of Kneser's Theorem (see Subsection 1.1) now takes the following form.
. If all finite quotients of G are ABELIAN, then instead of assuming that A is spread-out, it suffices to assume that A is large and NOT contained in a proper periodic subset P ⊂ G with (1.4) Remark 1.5. We stress that this result is completely new even for G = (Z, +) and the Følner sequence ([−n, n]). Furthermore, in the appendix to this paper, we show that in this particular case, all of the assumptions above are necessary. An analogous result for the upper asymptotic density for G = (Z, +) and F n = [1, n] and A = B was recently established by Jin [15].
The proof of Theorem 1.4 also yields the following analogous result for the upper Banach density (a similar statement can also be deduced for the lower Banach density). Scholium 1.6. If A ⊂ G is spread-out and B ⊂ G is large, then If all finite quotients of G are ABELIAN, then it suffices to assume that A is large and NOT contained in a proper periodic subset P ⊂ G such that (1.4) holds. Remark 1.7. This result was first established in the (semigroup) case G = (N, +) and F n = [1, n] by Jin [16], and extended to countable abelian groups by Griesmer [13] (his proof is very much inspired by earlier versions of our Correspondence Principles).
Let us now give an example of a countable two-step (hence non-abelian) solvable (hence amenable) group to which the last assertion in Theorem 1.4 (and Scholium 1.6) applies.
Example 4 (Generalized lamplighter group). Let G = Q ≀ Z, i.e. the wreath product of the two abelian groups (Q, +) and (Z, +) (also known as a generalized lamplighter group). It is not hard to show that every homomorphism of G onto a finite group factors through Z, and thus every finite factor group of G is abelian. Indeed, since Q does not have any proper finiteindex subgroups, the restriction to the subgroup Z Q of G, of any homomorphism from G into a finite group, must be trivial.
Let us address the question when the lower bound in Theorem 1.4 is attained. The following result is new already for G = (Z, +).
, then A is contained in a Sturmian subset with the same upper Banach density as A. Remark 1.9. We show in the appendix of this paper that the assumptions in the theorem are necessary already in the case G = (Z, +) and F n = [−n, n].
Just as with Theorem 1.4 and Scholium 1.6, the proof of Theorem 1.8 can be readily adapted to yield the following result. Scholium 1.10. If A ⊂ G is spread-out, B ⊂ G is large, AB does not contain a piecewise periodic set and d * (AB) = d * (A) + d * (B) < 1, then A is contained in a Sturmian subset with the same upper Banach density as A. Remark 1.11. Inspired by personal communication, as well as by earlier versions of this paper, Griesmer proved Scholium 1.6 and Scholium 1.10 for countable ABELIAN groups in [13].

An application: Spread-out 2-approximate subgroups
Let us briefly mention an application of Scholium 1.6 and Scholium 1.10. Given an integer K 1, we say that a symmetric subset A ⊂ G is a K-approximate subgroup of G if e G ∈ A and there is a finite set F ⊂ G with |F| K such that A 2 ⊂ FA. Of course, a 1-approximate subgroup is nothing but a subgroup of G. The problem of understanding finite K-approximate subgroups of various groups has attracted a lot of attention in recent years, and the paper [6] by Breuillard, Green and Tao presents a general structure theory of finite K-approximate groups.
We shall now show that our combinatorial results above yield a classification of spread-out (in particular, INFINITE) 2-approximate subgroups of a countable AMENABLE group G. We note that if A is 2-sapproximate subgroup of G, then d * (A 2 ) 2d * (A). Since A is spread-out, Scholium 1.6 shows that this inequality cannot be strict, and thus either In the first case, Lemma 2.12 below implies that A 2 is thick. In the second case, Scholium 1.10 applies, and shows that either A 2 contains a piecewise periodic set, or A is contained in a Sturmian set with the same upper Banach density as A. We can summarize this discussion in the following corollary. Corollary 1.12. Let G be a countable amenable group and suppose that A ⊂ G is spread-out, A 2 does not contain a piecewise periodic set and there exist x, y ∈ G such that (1.5) Then A is contained in a Sturmian subset of G with the same upper Banach density as A. If G does not have any proper finite-index subgroups, then it suffices to assume that A is large, A 2 is not thick and (1.5) holds.

Counterexamples
Our two last theorems in this paper address the asymmetry in the roles of A and B in Scholium 1.6 and Scholium 1.10. We note that the first of these results says that if A, B ⊂ G are large and then A cannot be spread-out. If G is abelian (or only admits abelian finite factors), then A is in fact contained in a proper periodic set for which (1.4) holds. However, in general, we make no such assertion about the set B. The same asymmetry appears in Scholium 1.10. We stress that by looking deeper into the proofs of Scholium 1.6 and Scholium 1.10 some very rough information CAN be deduced about B, but this information is certainly not on the same level as the one we deduce about A.
The aim of the following two theorems is to show that if G is "sufficiently non-abelian", then the situation is truly asymmetric, and the corresponding containment statements for the set B do simply not hold. Both examples will be produced by our "Counterexample Machine", which we construct in Section 11. Theorem 1.13. There exist a countable two-step solvable group G with the following property: There is a large set A ⊂ G with d * (A) = 1/2 such that for every and whenever P is a proper periodic subset of G with B ⊂ P, then Theorem 1.14. There exist a countable two-step solvable group G and spread-out subsets A, B ⊂ G such that AB does not contain a piecewise periodic set, B ⊂ G is not contained in Sturmian subset of G with the same upper Banach density as B, and d * (AB) = d * (A) + d * (B) < 1.

Organization of the proofs
In Section 3, we reduce Theorem 1.1 and Theorem 1.3 to Theorem 3.1 and Theorem 3.2 respectively. In Section 4, we show how one can deduce Theorem 1.4 and Theorem 1.8 from Theorem 1.1 and Theorem 1.3. In Section 5, we formulate our main Correspondence Principles, and show how one can establish Theorem 3.1 and Theorem 3.2 from them. Finally, in Section 6 and Section 10 we prove the Correspondence Principles mentioned in the introduction. Theorem 1.13 and Theorem 1.14 are proved in Section 11.

Acknowledgements
The authors have benefited enormously from discussions with Benjy Weiss during the preparation of this manuscript, and it is a pleasure to thank him for generously sharing his many insights with us.
We also wish to acknowledge the great impact that our many discussions with Eli Glasner and John Griesmer have had on our work. Furthermore, we are grateful for the inspiring and very enlightening discussions on the topics of the this paper we have had with Mathias Beiglböck, Vitaly Bergelson, Manfred Einsiedler, Hillel Furstenberg, Elon Lindenstrauss, Fedja Nazarov, Amos Nevo, Imre Ruzsa, Omri Sarig and Jean-Paul Thouvenot.
The present paper is an outgrowth of a series of discussions between the authors which began at Ohio State University in 2009, and continued at University of Wisconsin, Hebrew University in Jerusalem, Weizmann Institute, IHP Paris, KTH Stockholm, ETH Zürich, Chalmers University in Gothenburg and University of Sydney. We wish to thank to the mathematics departments at these places for their hospitality.
The first author acknowledges support from the European Community Seventh Framework program (FP7/2007/2012 Grant Agreement 203418) when he was a postdoctoral fellow at Hebrew University, and ETH Fellowship FEL-171-03 between January 2011 and August 2013. Since September 2013, he is supported by Gothenburg Center for Advanced Studies in Science and Technology (GoCas).

PRELIMINARIES
Throughout this section, let G be a countable group.

General notation
Let Y be a set on which G acts. If A ⊂ G and B ⊂ Y and y ∈ Y, we define and the (possibly empty) set We note that AB y = (AB) y and B g·y = B y g −1 for all g ∈ G.

Means on G
Let ℓ ∞ (G) denote the Banach space of real-valued bounded functions on G, equipped with the uniform norm. We let M denote the convex and weak*-compact subset of positive and unital functionals on ℓ ∞ (G), which we can identify with finitely additive probability measures on G via the (notation-abusive) formula λ(A) = λ(χ A ), where χ A stands for the indicator function of the set A ⊂ G. If λ ∈ M, we write even though the right-hand side is not an integral in the Lebesgue sense.
The (left) G-action on G itself induces an isometric action on ℓ ∞ (G) and a weak*-continuous action on M by for φ ∈ ℓ ∞ (G) and λ ∈ M. We shall refer to the elements in M as means on G, and we define the (possibly empty) set L G = λ ∈ M : g · λ = λ, for all g ∈ G of left-invariant means on G. We note that G is amenable if and only if L G is non-empty (see e.g. [24]). Let us from now on assume that G is amenable. We say that λ ∈ L G is extremal if it cannot be written as a non-trivial convex combination of other means in L G . By Krein-Milman's Theorem, extremal means always exist.
The following analogue of the Weak Ergodic Theorem will play an important role in the proofs to come.

1)
and for all η ∈ L G .

Pointed G-spaces
Let X be a compact and metrizable space, equipped with an action of G by homeomorphisms, and suppose that there exists a point x o whose G-orbit in X is dense. We refer to the pair (X, x o ) as a compact pointed G-space.
We denote by C(X) the Banach space of real-valued continuous functions on X, equipped with the uniform norm, and by P(X) the space of (regular) Borel probability measures on X, identified with the convex and weak*-compact subset of positive and unital functionals in the dual space C(X) * . We note that the G-action on X gives rise to an isometric G-action on C(X) and a weak*-continuous action on P(X) by for f ∈ C(X) and µ ∈ P(X). We define the (possibly empty) set P G (X) = µ ∈ P(X) : g · µ = µ, for all g ∈ G of G-invariant Borel probability measures. If G is AMENABLE, then P G (X) is non-empty for every pointed G-space.
We say that µ ∈ P G (X) is ergodic if any G-invariant Borel subset of X is either µ-null or µ-conull, and extremal if it cannot be written as a non-trivial convex combination of elements in P G (X). By Krein-Milman's Theorem, extremal measures always exist in P G (X), and it is a classical fact (see e.g. Theorem 4.4 in [8]) that µ ∈ P G (X) is ergodic if and only if it is extremal.
If µ is a G-invariant Borel probability measure, then its support (the set of all points in X which admit open neighborhoods with positive µ-measures), here denoted by supp(µ), is a closed G-invariant subset of X. The following lemma will be useful later in the text.

Lemma 2.2.
For every ergodic µ ∈ P G (X), there exists a µ-conull subset X ′ ⊂ X such that Proof. We may without loss of generality assume that supp(µ) = X. Let (U n ) be a countable basis for the topology on X, and define Since µ is ergodic, we have µ(GU n ) = 1 for all n, and thus X ′ is µ-conull. By construction, every x ∈ X ′ has a dense G-orbit.

Bebutov triples
We denote by 2 G the space of all subsets of G endowed with the Tychonoff topology, which renders 2 G compact and metrizable, and G acts by homeomorphisms on 2 G by One readily checks that the set U = A ∈ 2 G : e ∈ A is clopen, and U A = A for all A ∈ 2 G . Let X = G · A and set x o = A. Then (X, x o ) is a compact pointed G-space. We shall consistently abuse notation and denote by A the (clopen) intersection U ∩ X, so that A x o = A (where A on the right hand side refers to the set in G). We refer to (X, x o , A) as the Bebutov triple of the set A ⊂ G.

The Bebutov map
Let us from now on assume that G is amenable, so that L G is non-empty, and let (X, x o ) be a compact pointed G-space. We note that we have a G-equivariant isometric, positive and unital map S (2.3) We refer to S x o as the Bebutov map of (X, x o ). Its transpose S * x o maps M into P(X), and L G into P G (X). The following proposition shows that this map is in fact onto.
is onto and maps the set of extremal means in L G onto the set of ergodic measures in P G (X).

Proof. We begin by proving that
One checks that λ ν defines positive and unital functional on the subspace S x o (C(X)) ⊂ ℓ ∞ (G) of norm one. By Hahn-Banach's Theorem, λ ν extends to ℓ ∞ (G) with norm one and λ ν (1) = 1. We abuse notation and use λ ν to denote this extension as well. We wish to prove that λ ν is positive (and thus a mean on G). We note that if φ is a non-negative function on G, then the inequality holds. Since λ ν has norm one, and thus λ ν (φ) 0. We conclude that the set Q ⊂ M defined by Q = λ ∈ M : λ S xo (C(X)) = λ ν contains λ ν , and is thus a non-empty convex and weak*-compact, which is invariant under the affine and weak*-continuous G-action on M. Since G is amenable, G must fix an element λ in Q (see e.g. [24]). By construction, S * Let us now prove that extreme points in L G are mapped to ergodic measures in P G (X). Fix an extreme left invariant mean λ and set ν = S * λ. By Proposition 2.1, for all f ∈ C(X) and η ∈ L G . By a straightforward approximation argument, we conclude that In particular, if B ⊂ X is G-invariant, then ν(B) = ν(B) 2 and thus ν(B) is either zero or one, and hence ν is ergodic.

Correspondence principles
Of course, every clopen set if µ-Jordan measurable.
Let µ ∈ P G (X) and suppose that A ⊂ X is a µ-Jordan measurable set. Fix ε > 0 and let f − and f + be as above.
The following corollary is now immediate.
We note that although the Bebutov map However, some bounds can be asserted for semi-continuous functions, as the (proof of the) following lemma shows.
By monotone convergence (recall that µ is σ-additive, although λ is not), this inequality is preserved upon taking the limit m → ∞.
In the introduction of this paper, we defined, for a given subset A ⊂ G, its upper Banach The following (well-known) alternative definition will be useful later in the text. We sketch a proof for completeness.

Proposition 2.6. For every
Furthermore, for every A ⊂ G, we can always find extremal λ + , , it suffices to prove the first identity (to make referencing easier, let m * (A) denote the right hand side of this identity). We begin by showing that for every A ⊂ G, and ε > 0, there exists λ ∈ L G such that d * (A) λ(A) + ε. This readily implies that d * (A) m * (A). We note that by the definition of d * , we can find a Følner One readily checks any weak*-accumulation point λ belongs to L G and d Let (F n ) be a Følner sequence in G. It follows from the Mean Ergodic Theorem that the converges to µ(A) in the L 2 -norm, and thus f n k (x) → µ(A) for µ-almost every x, along some sub-sequence (n k ). Let us fix x ∈ X for which convergence holds. Since A ⊂ X is CLOPEN, we can find a sequence (g n k ) in G such that and thus Note that (F n k g n k ) is still a Følner sequence in G. Hence, if we use this sequence instead of (F n ) in the definition of (λ n ) above, we can extract a weak*-accumulation point λ ∈ L G such that λ(A x o ) = µ(A), which finishes the proof.
We now arrive at the following corollary, which is often referred to as Furstenberg's Correspondence Principle (see e.g. [10]).

Corollary 2.7 (Furstenberg's Correspondence Principle). For every compact pointed
Furthermore, for every such set A ⊂ X, we can always find ergodic measures

Compactifications
Let K be a compact metrizable group and suppose that G admits a homomorphism τ into K with dense image. We refer to (K, τ K ) as a compactification of G. Let e K denote the identity element in K and note that (K, e K ) is a compact pointed G-space under the action (g, k) → g · k = τ K (g)k, for g ∈ G and k ∈ K.
We note that if I ⊂ K is any subset and t ∈ K, then I t = τ −1 K (It −1 ). More generally, if L < K is a closed (not necessarily normal) subgroup of K, the (pointed) quotient space (K/L, L) is also a compact pointed G-space under the action (g, kL) → τ K (g)kL. If I ⊂ K/L is any subset, we can alternatively view it as a right L-invariant subset of K, and if t = kL, then I t = τ −1 K (It −1 ), which is well-defined by the right-L-invariance of I.
denotes the Haar probability measure on K/L. In particular, the following observation is an immediate consequence of Corollary 2.4.
Let us now point out an important property of compactifications of countable amenable groups, which will play a crucial role in the proof of Theorem 3.2.

Proposition 2.9. If K is a compact group with a dense countable amenable subgroup, then the identity component of K is abelian.
Proof. We shall argue by contradiction: Suppose that there exist two elements x, y ∈ K o such that xyx −1 y −1 = e K . By Peter-Weyl's Theorem, we can find a positive integer n and a representation π of K into U(n) such that π(x)π(y)π(x) −1 π(y) −1 = e π(K) . We note that π(x) and π(y) belong to the identity component of the (possibly not connected) compact Lie group π(K). Let Γ π denote the image of G under π • τ K ; by assumption Γ π is a dense countable amenable subgroup of π(K). By Theorem 6.5 (iii) in [14], π(K) o has finite index in π(K), and a straightforward argument shows that Λ := Γ π ∩ π(K) o is a dense countable amenable subgroup of π(K) o . In particular, the commutator subgroup [Λ, Λ] is a dense amenable subgroup of [π(K) o , π(K) o ]. By Theorem 6.18 in [14], the latter group is a semisimple and connected compact Lie group. At this point, Tits' Alternative [28] can be applied: a non-trivial semisimple and connected compact Lie group cannot contain a dense amenable subgroup. Hence π(K) o is abelian, which contradicts π(x)π(y)π(x) −1 π(y) −1 = e π(K) .

Borel G-spaces and their Kronecker-Mackey factors
Let (Z, η) be a standard probability space, equipped with an action of G by measurable maps which preserve η. We refer to (Z, η) as a Borel G-space, and we say that it is ergodic we say that (W, θ) is a factor of (Z, η) with factor map q, and we say that (Z, η) and (W, θ) are isomorphic if q in addition is a bi-measurable bijection.
We see that if B Z and B W denote the σ-algebras on Z and W respectively, then F q = q −1 (B W ) is a G-invariant sub-σ-algebra of B Z . Conversely (see e.g. Theorem 6.5 in [8]), if F is any G-invariant sub-σ-algebra of B Z , then there exists a (unique up to isomorphisms) factor (W, θ) and a factor map from (Z, η) to (W, θ) such that F = q −1 (B W ) modulo null sets. For this reason, we shall refer to G-invariant sub-σ-algebras of B Z as factors as well, and to the corresponding Borel G-space (W, θ) as the factor Borel G-space of F.
We stress that even if both (Z, η) and (W, θ) are ergodic, (Z × W, η ⊗ η) may not be ergodic. We denote by E G (Z) the sub-σ-algebra of B Z consisting of G-invariant Borel sets, and we denote by K the smallest sub-σ-algebra of (Z × Z, η ⊗ η) such that E G (Z × Z) is contained in K ⊗ K. We refer to K as the Kronecker-Mackey factor of (Z, η). The following proposition shows that the corresponding factor Borel G-space is quite special.
We shall refer to (K, L, τ K ) as the Kronecker-Mackey triple associated to (Z, η).
Proof. By a classical result of Mackey (Theorem 1 in [21]), it suffices to show that the subrepresentation L 2 (Z, K, η) of the regular G-representation L 2 (Z, η), consisting of K-measurable functions, decomposes into a direct sum of FINITE-DIMENSIONAL sub-representations. Let L ⊂ B Z denote the G-invariant sub-σ-algebra with respect to which all elements in L 2 (Z, η) with a finite-dimensional linear span are measurable. We shall prove that E G (Z × Z) ⊂ L ⊗ L, which by the definition of K forces K ⊂ L, and thus L 2 (Z, K, η) ⊂ L 2 (Z, L, η). By definition, the right hand side does decompose into finite-dimensional sub-representations, which finishes the proof of the proposition.
To establish the inclusion E G (Z × Z) ⊂ L ⊗ L, we shall prove that any G-invariant function in L 2 (Z × Z, η ⊗ η) is measurable with respect to L ⊗ L. Since every G-invariant function f can be written on the form f = f 1 + f 2 where f 1 , f 2 are G-invariant, and satisfy and the function f 3 = if 2 satisfies the same equation as f 1 , we see that it suffices to show that Note that if f is any such function, then the operator T f : is compact, self-adjoint and G-equivariant. Hence, by the Spectral Theorem for compact and self-adjoint operators, we have where (ψ n ) and (λ n ) are the eigenvectors and eigenvalues of T f respectively, and the sum converges in the L 2 -sense. In particular, we have where the sum is taken in the weak topology on L 2 (Z×Z, η⊗η). Furthermore, the eigenspaces corresponding to non-zero λ n 's are finite-dimensional, and since T f is G-equivariant, each such subspace is a sub-representation of the regular representation. Since only non-zero eigenvalues appear in the sum, and each corresponding eigenfunction ψ n belongs to a finitedimensional sub-representation of L 2 (Z, η), we conclude that each ψ n is measurable with respect to L, and thus f is measurable with respect to L ⊗ L.

Joining containment
is called a joining of (X, µ) and (Y, ν). We note that the product measure µ ⊗ ν is always a joining, and we denote by J G (µ, ν) the set of all joinings of (X, µ) and (Y, ν). It is a fundamental fact, see. e.g. Theorem 6.2 in [11], that ergodic joinings always exist provided that (X, µ) and (Y, ν) are both ergodic. If A ⊂ X and B ⊂ Y are Borel sets, and ξ ∈ J G (µ, ν), we say that A is joining contained in B, and we write The following simple result will be useful later on.
Lemma 2.11. Let (K, τ K ) be a metrizable compactification and L < K a closed subgroup. Let (Z, η) be an ergodic Borel G-space and suppose that (K/L, m K/L ) is a factor of (Z, η) with factor map q. If A ⊂ Z and I ⊂ K/L are Borel sets, and A ⊂ q −1 (I) modulo null sets, then there exists an ergodic ξ ∈ J G (η, m K ) with the property that A ⊆ ξ p −1 (I), where p : K → K/L is the canonical quotient map.
Sketch of proof. Let ξ o denote the joining of (Z, η) and (K/L, m K/L ) defined by , for Borel sets A ⊂ Z and I ⊂ K/L.
Since η is ergodic, so is ξ o . We have a natural quotient map from Z × K onto Z × K/L given by (z, k) → (z, p(k)). We can argue as in the proof of Proposition 2.3 to find a G-invariant We note that the same identity holds for almost every ergodic component of ξ (see e.g. Theorem 4.8 in [8]) so we may just as well assume that ξ is ergodic (we stress that the choice of ergodic component may depend on A). Since the projection of ξ onto K is G-invariant, it must coincide with m K , and thus ξ is an ergodic joining of (Z, η) and (K, m K ).

Thickness and syndeticity
Let G be a countable amenable group. Recall from the introduction that a subset B ⊂ G is • syndetic if there exists a finite set F ⊂ G such that FB = G.
The following alternative characterization of thickness will be useful.
Proof. Let (F n ) be a Følner sequence in G. If B ⊂ G is thick, then we can find (s n ) such that F n s n ⊂ B for all n, and thus d (F n s n ) (B) = 1 (and hence d * (B) = 1).
On the other hand, if d * (B) = 1, then one readily checks that d * ( f∈F fB) = 1 for every finite set F ⊂ G, which shows that each such intersection is non-empty, and thus B is thick.
One readily verifies that B ⊂ G is not syndetic if and only if B c is thick. Hence the previous lemma implies the following result. Let us now re-formulate Theorem 1.1 and Theorem 1.3 in a way which will fit better with the way that proofs are set up later in the text. For the convenience of the reader, we sketch below the proofs of the reductions that we will use.
In what follows, let G be a countable amenable group and let (X, x o ) be a compact pointed G-space. We shall also fix an ERGODIC G-invariant Borel probability measure µ on X and an ERGODIC p.m.p. G-space (Y, ν). In the proofs of Theorem 1.1 and Theorem 1.3 below, one should think of (X, x o ) as part of the Bebutov triple (X, x o , A) associated to the set A ⊂ G, and µ is an ergodic Borel probability measure on X such that µ(A) = d * (A x o ) (where A on the right hand side is a clopen subset of X).
(2) There exists a finite-index subgroup G o < G such that ν(G o C) < 1.  In this section we show how to deduce Theorem 1.4 and Theorem 1.8 from Theorem 1.1 and Theorem 1.3 respectively. This will be done in several steps, so we kindly ask the reader for some patience.
As preparation for the proofs, let G be a countable amenable group and let us fix a Følner sequence (F n ) in G once and for all. We define a sequence (λ n ) of means on G by Since the set of means on G is weak*-compact, the set F of weak*-cluster points (of subnets, not necessarily sub-sequences) of the sequence (λ n ) is non-empty. It follows by the Følner property of (F n ) that each such weak*-cluster point is left-invariant, and thus F ⊂ L G . Furthermore, one readily checks that and

Proof of Theorem 1.4 assuming Theorem 4.1
Let F be as above, and suppose that A ⊂ G is spread-out, B ⊂ G is syndetic and AB is not thick. By (4.3), we can find λ + and λ − in F such that By (4.1) and (4.2) we further have By Theorem 4.1, from which the first part of Theorem 1.4 now follows. If all finite quotients of G are abelian, then instead of assuming that A is spread-out, it suffices to assume that A is large and not contained in a proper periodic subset P ⊂ G such that (1.4) holds.

Proof of Theorem 1.8 assuming Theorem 4.2
Let F be as above, and suppose that A ⊂ G is spread-out, B ⊂ G is syndetic and AB does not contain a piecewise periodic set. In particular, AB is not thick. Suppose that either By (4.3), we can find λ + and λ − in F such that By (4.1) and (4.2) we further have Hence, either On the other hand, these upper bounds are also lower bounds by Theorem 4.1, so we conclude that either By Theorem 4.2, A is contained in a Sturmian subset of G with the same upper Banach density as A.

Interlude: A few words about ergodic decomposition
In this interlude, we explain the relevance of the assumptions on the sets A, B and AB above in the dynamical setting of Theorem 1.4 and Theorem 1.8.
In what follows, let G be a countable amenable group and let (Y, y o ) be a compact pointed G-space. Let us fix a left-invariant mean on G once and for all, and denote by ν the image in P G (Y) of λ under the adjoint of the Bebutov map of (Y, y o ). If A ⊂ G and B ⊂ Y is a clopen subset, then by Lemma 2.5, we have λ(B y o ) = ν(B) and λ(AB y o ) ν(AB). (4.4) We stress that ν may not be ergodic. However, it is a very useful fact in ergodic theory that ν can always be "decomposed" into "ergodic components"; more precisely (see e.g. Theorem 4.8 in [8]), there exists a unique Borel probability measure κ on P G (Y), which is supported on the set of ERGODIC G-invariant Borel probability measures on Y such that Let B ⊂ Y be a clopen set. By Lemma 2.7, we have Hence, if we assume that B y o ⊂ G is SYNDETIC and AB y o is NOT THICK, then Lemma 2.12 and Lemma 2.13 tell us that we must have inf ν ′ (B) : ν ′ ∈ supp(κ) > 0 and sup ν ′ (AB) : ν ′ ∈ supp(κ) < 1.
We conclude by Theorem 1.1 that if A ⊂ G is spread-out (or, if all finite quotients of G are abelian, that A is not contained in proper periodic subset P which satisfies (1.4)), B y o is syndetic and AB y o is not thick, then Finally, let us assume that A is spread-out, B y o is syndetic and there exists at least one ν ′ in the support of κ such that By Theorem 1.3, this means that A is either contained in a Sturmian subset of G with the same upper Banach density as A, or the action set AB contains a Borel set Z which is invariant under a finite-index subgroup. In the latter case, AB y o must contain a piecewise periodic set by Lemma 10.4 (applied to the open set U = AB ⊂ Y).

Proof of Theorem 4.1 assuming Theorem 1.1
Assume that A ⊂ G is spread-out, or, if all finite quotients of G are abelian, that A is not contained in proper periodic subset P which satisfies (1.2)). Further assume that B ⊂ G is syndetic and AB is not thick.
We abuse notation and write (Y, y o , B) for the Bebutov triple of B. Let λ be a left-invariant mean on G, and denote by ν the image of λ under the adjoint of the Bebutov map. If κ is the ergodic decomposition of ν, then the discussion in the interlude above shows that ν ′ (AB) d * (A) + ν ′ (B), for κ-a.e. ν ′ , and thus, by (4.5), Finally, by (4.4), we conclude that which finishes the proof.

Proof of Theorem 4.2 assuming Theorem 1.3
Assume that A ⊂ G is spread-out, B ⊂ G is syndetic and AB does not contain a piecewise periodic subset. We also assume that there exists a left-invariant mean λ on G such that (4.7) We abuse notation and denote by (Y, y o , B) the Bebutov triple of B. Let ν be the image of λ under the adjoint of the Bebutov map. If κ is the ergodic decomposition of ν, then by (4.4), (4.5), (4.6) and (4.7), we have We conclude that the inequalities are in fact identities, and thus ν ′ (AB) = d * (A) + ν ′ (B) < 1, for κ-a.e. ν ′ .
By the last part of the discussion in the interlude above (recall that we assume that AB y o does not contain a piecewise periodic set), this implies that A must be contained in a Sturmian set with the same upper Banach density as A.

CORRESPONDENCES PRINCIPLES AND THE PROOFS OF THEOREM 3.1 AND THEOREM 3.2
Let us now formulate our two main technical ingredients in this paper, and deduce Theorem 3.1 and Theorem 3.2 from them, using some results about products of Borel sets in compact groups.
In what follows, let (X, x o ) be a compact pointed G-space and let µ be an ergodic Ginvariant Borel probability measure on X. Let (Y, ν) be an ergodic Borel G-space. If K is a compact group, we say that a Borel set I ⊂ K is spread-out if every Borel set I ′ ⊂ I with the same Haar measure as I projects onto every finite quotient of K. Equivalently, I ′ U = K for every open subgroup U of K.
We note that a proper subset of a finite group can never be spread-out, and if K is totally disconnected, then every spread-out set in K must be dense. Indeed, if K is totally disconnected, then open subgroups form a neighborhood basis of the identity, so if I ⊂ K is a spread-out set which is not dense, then there exists an open subgroup U of K and k ∈ K such that I ∩ kU = ∅, contradicting the fact that IU = K. Finally, if I, J ⊂ K are Borel sets, and M is a factor group of K with factor map p : K → M, we say that (I, J) reduces to a pair ( Our first result shows that if A ⊂ X is open and C ⊂ Y is Borel, then the sets A and C are joining contained in some Borel subsets I and J of a compact metrizable group K, while the action set A −1 x o C in Y is "larger" than the product set I −1 J in K.

Proposition 5.1 (Correspondence Principle I). There exist
• a metrizable compactification (K, τ K ) of G, • ergodic joinings ξ µ ∈ J G (µ, m K ) and ξ ν ∈ J G (ν, m K ), with the following properties: For every open set A ⊂ X and Borel set C ⊂ Y, there are Borel sets I, J ⊂ K such that A ⊆ ξ µ I and C ⊆ ξ ν J and Our second result upgrades the joining containment to "local containment" provided that the pair (I, J) from Proposition 5.1 reduces to "nice" subsets in some factor group of K.
The proof of Correspondence Principle I, modulo the two last assertions, will be outlined in the next section. The proofs of the remaining assertions and Correspondence Principle II will be outlined in Section 10.

2, we can find
is a proper periodic set, and thus we have established the first part of Theorem 3.1.
Let us now assume that all finite quotients of G are abelian. Suppose that N is a finite factor of K and q : K → N the corresponding factor map. Then r = q • τ K is factor map from G onto N, so by our assumption, N is abelian. We conclude that every finite factor group of K is abelian, and thus Theorem 5.

If we plug this into (5.3), we conclude that
, for all s ∈ A x o \ A o , and thus the right hand side must be zero, from which we deduce that τ M (s) By the second part of Theorem 5.3, we see that this forces τ M (s) which finishes the proof.

Proof of Theorem 3.2
Let A ⊂ X be an open set and C ⊂ Y a Borel set, and suppose that . If at least one of the inequalities above is strict, then Theorem 5.3 implies that neither I nor J can be spread-out, and thus the second part of Proposition 5.1 tells us that µ(A) which is contained in a proper periodic subset, and • there exists a finite-index subgroup G o < G such that ν(G o C) < 1. Let us henceforth assume that neither of these conclusions hold, so that both I and J are spread-out and thus By Proposition 2.9, every compactification of G (being a countable amenable group) must have an ABELIAN identity component. Since K is metrizable, the following theorem by the first-named author applies. Since I o is clearly Jordan measurable, Proposition 5.2 tells us that there exist a subset A o ⊂ A x o and t ∈ M such that If we collect all of the identities and lower bounds above, we get We conclude that the set A x o is contained in a Sturmian set with the same upper Banach density as A x o .

Ergodicity of spread-out sets in finitely generated torsion groups
Let G be a countable amenable group. We say that a subset A ⊂ G is ergodic if for every ergodic Borel G-space (Y, ν) and for every Borel set B ⊂ Y with positive ν-measure, we have ν(AB) = 1. By definition, G itself is always an ergodic set. In this appendix, we prove the following result. Proposition 5.9. If G is a finitely generated amenable TORSION group, then every spread-out set in G is ergodic.
We first note that if K is a compact group and I ⊂ K is a dense subset, then m K (I −1 J) = 1 for every Borel set J ⊂ K with positive Haar measure. Indeed, if it were not the case, then for some J ⊂ K with positive measure, there would be another Borel set D ⊂ K with positive measure such that I −1 ∩ DJ −1 = ∅. However, as is well-known (Steinhaus' Lemma), DJ −1 must have non-empty interior, and thus intersects I −1 non-trivially (being a dense set).
Let A ⊂ G be a spread-out set and suppose that B ⊂ Y is a Borel set with positive measure such that ν(AB) < 1. Then C = (AB) c has positive measure, and ν(A −1 C) < 1. Let (X, x o , A) denote the Bebutov triple of A. Since A is large, there exists by Corollary 2.7, an ergodic µ ∈ P G (X) such that µ(A) = d * (A x o ). By Correspondence Principle I, there exists a metrizable compactification (K, τ K ) of G and Borel sets I, J ⊂ K such that m K (I) µ(A) > 0 and 1 > ν(A −1 x o C) m K (I −1 J).
By the last part of Correspondence Principle I, if A x o is spread-out, then so is I. Hence, if we can prove that K is totally disconnected, then I must be dense (the argument is given in the introduction of this section), and thus the first part of this appendix shows that m K (I −1 J) = 1, which is a contradiction. What remains is then to prove the following lemma of independent interest.
Lemma 5.10. Let G be a finitely generated torsion group and suppose that (K, τ K ) is a compactification of G. Then K is totally disconnected.
Proof. By Corollary 2.36 in [14] we can find a family (N α ) of closed normal subgroups of K and a family (n α ) of integers such that where U(n α ) denotes the unitary group of dimension n α . Let Γ = τ K (G), which is again a finitely generated torsion group, and note that for every α, the quotient Γ α = Γ/Γ ∩ N α is dense in K α ⊂ U(n α ). By the Jordan-Schur Theorem, Γ α (being a finitely generated torsion subgroup of a linear group) must be finite, and thus K α is finite as well. We conclude that N α is open for every α, which shows that the family (N α ) is a neighborhood basis of K, and thus K is totally disconnected.

PROOF OF CORRESPONDENCE PRINCIPLE I
In this section, we break down the proof of Proposition 5.1 (Correspondence Principle I) into three propositions, whose proofs will be postponed to later sections.
Throughout the section, let G be a countable amenable group and let (X, x o ) be a compact metrizable pointed G-space. We fix an ergodic G-invariant Borel probability measure µ on X, and an ergodic Borel G-space (Y, ν).

Step I: Symmetrization
The following proposition is established in Section 7 below. Proposition 6.1. There exist an ergodic joining η ∈ J G (µ, ν) such that for every open set A ⊂ X and Borel set C ⊂ Y, we have

Step II: Finding a compactification
We set Z = X × Y and let η be as in Proposition (6.1) so that (Z, η) is an ergodic Borel Gspace. Recall the definition of a Kronecker-Mackey triple from Subsection 2.8. The following proposition will be established in Section 8. Proposition 6.2. Let (K, L, τ K ) be Kronecker-Mackey triple of (Z, η), and let q : Z → K/L denote the corresponding factor map. Then, for all Borel sets A ′ , C ′ ⊂ Z, there are Borel sets I ′ , J ′ ⊂ K/L such that A ′ ⊂ q −1 (I ′ ) and C ′ ⊂ q −1 (J ′ ), modulo η-null sets, and η ⊗ η(G(A ′ × C ′ )) = m K/L ⊗ m K/L (G(I ′ × J ′ )).
If p : K → K/L is the canonical quotient map, then Lemma 2.11 shows that we can find an ergodic joining ξ of (Z, η) and (K, m K ) such that Let us from now on abuse notation and write I ′ and J ′ for the lifts p −1 (I ′ ) and p −1 (J ′ ), which we think of as right-L-invariant Borel sets in K. Let ξ µ and ξ ν denote the projections of ξ onto X × K and Y × K respectively. One readily checks that ξ µ and ξ ν are ergodic joinings in J G (µ, m K ) and J G (ν, m K ) respectively, and if A ′ = A × Y and C ′ = X × C, we have A ⊆ ξ µ I ′ and C ⊆ ξ ν J ′ .

Step III: Trimming sets in direct products
Let us briefly summarize what we have done so far. Given (X, x o ), µ and (Y, ν) we have found a metrizable compactification (K, τ K ) of G and ergodic joinings ξ µ ∈ J G (µ, m K ) and ξ ν ∈ J G (ν, m K ) such that for any open set A ⊂ X and Borel set C ⊂ Y, there are Borel sets , where we think of Γ := τ K (G) as a dense subgroup of the diagonal ∆(K) in K × K. The following proposition, which will be established in Section 9, finishes the proof of Correspondence Principle I (modulo the two last assertions), upon noting that if I ⊂ I ′ and J ⊂ J ′ are Borel sets with the same measures as I ′ and J ′ , then A ⊆ ξ µ I and C ⊆ ξ ν J as well.  Let (X, x o ) be a compact pointed G-space and fix an ergodic G-invariant Borel probability measure µ on X. Let (Y, ν) be a Borel G-space.
Proof. Fix x ∈ X and ε > 0. Since ν is a σ-additive measure, we can find a finite set is a non-empty open subset of X. Since x o has a dense G-orbit, there exists at least one g ∈ G such that g · x o ∈ U, and thus F ⊂ A g·x o = A x o g −1 . We note that Since ε > 0 is arbitrary, the proof is finished.

Lemma 7.2. If
A ⊂ X and C ⊂ Y are Borel sets, then there exists a µ-conull Borel set X ′ ⊂ X such that Proof. One readily checks that is Borel measurable on X and G-invariant, and thus constant µ-almost everywhere by ergodicity of µ. This constant must be equal to its µ-integral, and thus by Fubini's Theorem.

PROOF OF PROPOSITION 6.2
Throughout this section, let G be a countable (not necessarily amenable) group and let (Z, η) be an ergodic Borel G-space. Let B Z denote its Borel σ-algebra. Recall that the Kronecker-Mackey factor K ⊂ B Z is the smallest G-invariant sub-σ-algebra of B Z such that E G (Z × Z) ⊂ K ⊗ K. By the discussion in the introduction of Subsection 2.8 and Proposition 2.10, to prove Proposition 6.2, it suffices to establish the following lemma. Lemma 8.1. If A, C ⊂ Z are Borel sets, then there are K-measurable sets I, J ⊂ Z such that A ⊂ I and C ⊂ J modulo η-null sets, and η ⊗ η(G(A × C)) = η ⊗ η(G(I × J)).

Proof of Lemma 8.1
If (X, µ) is a Borel G-space and F ⊂ B X is a factor (i.e. a G-invariant sub-σ-algebra of B X ), then we say that a F-measurable subset J ⊂ X is a F-shadow of a Borel set C ⊂ X if for every Borel set D ⊂ J of positive µ-measure. In particular, µ(C \ J) = 0. We note that every Borel set C ⊂ X admits a F-shadow for any given factor F ⊂ B X . Indeed, let f be a pointwise realization of E[χ C |F], and let J be its positivity set. We leave it to the reader to verify that J is a F-shadow of C.
The following lemma is key. Lemma 8.2. Let F ⊂ B X be a factor and suppose that E G (X) ⊂ F. For every Borel set C ⊂ X and F-shadow J of C, we have µ(GC) = µ(GJ).
Proof. Define E = GJ \ GC ⊂ X, which clearly belongs to E G (X) and hence to F. We need to prove that µ(E) = 0. First note that which is a contradiction. We conclude that, since E is G-invariant and G is countable, we have µ(E ∩ GJ) = µ(E) = 0, which finishes the proof.
Let us now turn to the proof of Lemma 8.1, retaining the notation from the beginning of this section. Let A, C ⊂ Z be Borel sets, and consider the (not necessarily ergodic) Borel G-space One can readily check that if I and J denote the K-shadows of A and C respectively, then I × J is a K⊗K-shadow of A×C. By definition, we have E G (X) ⊂ F := K⊗K, and thus, by Lemma 8.2 η ⊗ η(G(A × C)) = η ⊗ η(G(I × J)), which finishes the proof. 9. PROOF OF PROPOSITION 6.3

Dirac sequences and balanced sets
Let H be a compact and second countable group and let m H denote the unique Haar probability measure on H. We denote by e the identity element in H. We note that every sub-sequence of a Dirac sequence is again a Dirac sequence. Remark 9.2. Dirac sequences always exist: Indeed, since H is assumed to be second countable, we can find a decreasing sequence (U j ) of open neighborhoods of the identity in H such that U j ⊂ U j ⊂ U j+1 and j U j = {e}. One can readily check that B j = U j forms a Dirac sequence in H. If D is balanced with respect to some Dirac sequence in H, then we simply say that D is balanced. Suppose that K is a compact and countable group, Γ < ∆(K) is a dense countable subgroup and I ′ , J ′ ⊂ K are Borel sets. Note that if I ⊂ I ′ and J ⊂ J ′ are Borel sets with the same measures as I and J respectively, then, since Γ is countable, we have It suffices to show that I and J can be chosen so that Indeed, consider the multiplication map (s, t) → s −1 t. By the uniqueness of Haar probability measures on compact groups, we see that it maps m K ⊗ m K to m K , and the pre-image of product set Let us now prove (9.1). In order to align the notation with the one of Proposition 9.4 and Proposition 9.5, we set H = K × K and L = ∆(K) < H. Fix a Dirac sequence (B ′ j ) in K. By Proposition 9.4 we can find a (common) sub-sequence (B ′ j k ) and subsets I ⊂ I ′ and J ⊂ J ′ with the same Haar measures as I ′ and J ′ which are balanced with respect to (B ′ j k ). If we set D = I × J ⊂ H and B k = B ′ j k × B ′ j k ⊂ H, then it is readily checked that (B k ) is a Dirac sequence in H, and that D is balanced with respect to (B k ). By Proposition 9.5, we conclude that m H (Γ D) = m K (HD), and thus m H (Γ D) = m K ⊗ m K (Γ (I × J)) = m H (LD) = m K ⊗ m K (∆(K)(I × J)).

Proof of Proposition 9.4
Lemma 9.6. Let (B j ) be a Dirac sequence in H and define Then, lim j f * ρ j = f in the norm topology on L 1 (H, m H ), for every f ∈ L 1 (H, m H ).
Proof. It suffices to establish the lemma in the case when f is a continuous, and hence uniformly continuous, function on H. Fix ε > 0 and find an open neighborhood U of the identity in H such that sup t∈H f(ts) − f(t) < ε, for all s ∈ U. Then, for every j such that B j ⊂ U, which shows that f * ρ j → f uniformly on H as j → ∞.
We now turn to the proof of Proposition 9.4. Let D ⊂ H be a Borel set with positive measure and define f = χ D . Let (B j ) be a Dirac sequence in H. By Lemma 9.6, we have lim j f * ρ j = f in the norm topology on L 1 (H, m H ), and thus we can find a subsequence (j k ) and a conull Borel set H ′ ⊂ H such that the lim k f * ρ j k (s) = f(s) for all s ∈ H ′ . We define the set D ′ = D ∩ H ′ and note that for all s ∈ D ′ , which shows that D ′ is balanced with respect to (B j k ).

Proof of Proposition 9.5
Let (B j ) be a Dirac sequence in H and suppose that D ⊂ H is a Borel set with positive measure which is balanced with respect to (B j ). Fix a closed subgroup L < K and a dense subgroup Γ < L and define the left Γ -invariant Haar measurable set C = LD \ Γ D. We wish to prove that C is a null set. We argue by contradiction. Assume that m H (C) > 0 and define the left Γ -invariant functions f j (s) = m H (C ∩ sB j ) on H and note that each f j is continuous. Since Γ < L is dense, we conclude that f j is left L-invariant for every j.
Fix 0 < ε < 1 2 and use Proposition 9.4 to find a subset C ′ ⊂ C with the same Haar measure as C and which is balanced with respect to some sub-sequence (B j k ). We note that every s ∈ C ′ can be written on the form s = ld, for some l ∈ L and d ∈ D. Hence, since f j is left L-invariant and C ′ , D ⊂ H are balanced with respect to (B j k ), we have for large enough k. In particular, since 2ε < 1, we have for large enough k. Hence C ∩ D is non-empty, which is a contradiction.

PROOFS OF PROPOSITION 5.2 AND THE LAST PART OF PROPOSITION 5.1
Let us briefly summarize the setting of Correspondence Principle I and II. As usual, G is a countable amenable group, and we have fixed a compact pointed G-space (X, x o ) and an ergodic Borel G-space (Y, ν) once and for all. Furthermore, we have fixed an ergodic G-invariant Borel probability measure µ on X, an open set A ⊂ X with µ(A) > 0 and a Borel set C ⊂ Y.
We wish to prove that if (I, J) reduces to a pair (I o , J o ) in a factor group M of K, with factor map p : K → M, and I o ⊂ M is Jordan measurable, then we can find a subset The last inequality can be equivalently written as Let W be a compact metrizable space equipped with an action of G by homeomorphisms. We say that a point w ∈ W is almost automorphic if whenever (g n ) is a sequence in G such that g n · w → w ′ for some point w ′ ∈ W, then g −1 n · w ′ → w as well. We say that W is an isometric G-space if every point is almost automorphic. One readily checks that M, with the G-action induced by τ M , is isometric.
In what follows, let (X, x o ), µ and (Y, ν) be as above, and let W be a compact G-space and θ an ergodic G-invariant Borel probability measure on W. The following lemma now implies Correspondence Principle II (Proposition 5.2) (with W = K, U = I o o and V = J o ). Lemma 10.1. Let A ⊂ X and U ⊂ W be open sets and let C ⊂ Y and V ⊂ W be Borel sets. Suppose that there are ξ ∈ J G (µ, ϑ) and ρ ∈ J G (ν, ϑ) with ξ ergodic such that If W is isometric, then we can find • a left-invariant mean λ on G, and and with the property that for all Furthermore, we can choose A o so that whenever (Y, ν) is a p.m.p. G-space and C ⊂ Y is a Borel set, then ν(A −1 o C) ν(A −1 x C). Proof. Since x o has a dense G-orbit in X, we can find a sequence (g n ) in G such that g n ·x o → x. Let w o be a cluster point of the sequence (g −1 n · w) in W. Since w is assumed to be almost automorphic, there exists a sub-sequence (g n k ) such that g n k · w o → w, and thus

Proof of Lemma 10.1
Since ξ is ergodic, there exists by Lemma 2.2 a ξ-conull Borel set T ⊂ X × W such that supp(ξ) = G · (x, w) for all (x, w) ∈ T . Furthermore, by Lemma 7.1 and Lemma 7.2, we have , for µ-a.e. x ∈ X. We can now fix (x, w) ∈ T such that supp(ξ) = G · (x, w) and ν(A −1 Since W is isometric, w is an almost automorphic point. Since A ⊆ ξ U, Lemma 10.2 tells us that we can find • a left-invariant mean λ on G, and and thus

A small variation of Lemma 10.2
The proof of Lemma 10.2 can be readily modified to yield the following result (where the positions of the spaces X and W have been permuted). Sketch of proof. Upon possibly passing to further finite-index subgroups, we may without loss of generality assume that G o is normal in G. Let F denote the factor of (Y, ν) consisting of all left-translates of Z. Since G o has finite index in G, we note that F is finite, and thus the corresponding factor space is isomorphic to a finite homogeneous space, say K/L, where K is a finite group and L a subgroup thereof, and G acts on K/L by left translations induced by a (surjective) homomorpism τ : G → K. We conclude there exists I ⊂ K/L such that q −1 (I) = Z modulo null sets, where q : Y → K/L is the corresponding factor map. In particular, we have In particular, I o is a piecewise periodic subset of U y o .

Proof of the last part of Proposition 5.1
Recall that a Borel set D ⊂ K is spread-out if every Borel set D ′ ⊂ D with the same measure as D projects onto every finite quotient of K. Equivalently, and an open subgroup L < K such that m K (LD ′ ) < 1. Note that the set LD ′ is a proper clopen subset of K.
Let us first assume that J ⊂ K is not spread-out. We can find a Borel set J ′ ⊂ J with m K (J ′ ) = m K (J) and an open subgroup L < K such that m K (LJ ′ ) < 1. Let G o = τ −1 K (L) and note that G o is a finite-index subgroup of G. Since C ⊆ ξ ν J, we have G o C ⊆ ξ ν LJ ′ and thus ν(G o C) m K (LJ ′ ) < 1. This finishes the proof of the last assertion in Proposition 5.1.
Let us now assume that I ⊂ K is not spread-out. As in the previous paragraph, we can conclude that A ⊆ ξ U, where U is a proper open subset of K which is invariant under τ K (G o ) for some finite-index subgroup G o < G. By Lemma 10.2 applied to W = K, we can find • a left-invariant mean λ on G, and , we conclude that P is a proper periodic subset of G, which finishes the proof of the second to last assertion in Proposition 5.1.

COUNTEREXAMPLE MACHINE
Definition 11.1 (Contracting triple). Let G be a countable group, N ⊳ G is a normal subgroup and Λ < N is a proper subgroup. We say that the triple (G, Λ, N) is contracting if for every finite set F ⊂ N, there exists g ∈ G such that gFg −1 ⊂ Λ.
The following two examples of contracting triples will be useful to keep in mind. In both cases, G is a two-step solvable group.
Example 5. Let p 2 be an integer, and define the groups where Z acts on Z[1/p] by multiplication by multiplicative powers of p. We claim that (G, Λ, N) is contracting: Indeed, let F ⊂ Z[1/p] be a finite set, and pick a large enough integer N such that p N F ⊂ Z. Then, Example 6. Let Q denote the additive group of rational numbers, and let Q * + denote the multiplicative group of positive rational numbers. Define the groups G = Q ⋊ Q * + and Λ = Z ⋊ {0} and N = Q ⋊ {1}. We claim that the triple (G, Λ, N) is contracting. Indeed, let F ⊂ Q be a finite set, and pick a large enough positive integer q such that qF ⊂ Z. Then, In what follows, suppose that G is a countable group with two abelian subgroups N and L such that N is normal in G and In other words, G is the semi-direct product of N and L, and one readily checks that G is a two-step solvable group and thus amenable. We further assume that there is a FINITELY GENERATED subgroup Λ of N such that (G, Λ, N) is a contracting triple. Note that the two examples given above are of this form with L = {0} ⋊ Z and L = {0} ⋊ Q * + . We denote by d * G and d * L the upper Banach densities, and by d G * and d L * the lower Banach densities, on G and L respectively.
The following proposition is the main technical result in this section. We shall use it below to establish Theorem 1.13 and Theorem 1.14.

Given subsets
Since N is normal in G, we have By Proposition 2.6, there exists an extreme left-invariant mean λ on G such that d * G (AB) = λ(AB). Hence, The following lemma will now be useful. Proof. Let λ be a left-invariant mean on G, and suppose that C ⊂ G is left N-invariant and D ⊂ G is left L-invariant. Since G = LN, we can write every g ∈ G on the form ln with l ∈ L and n ∈ N. We conclude that If λ in addition is an extreme left-invariant mean, then Proposition 2.1 tells us that By plugging these identities into (11.2), we get Since N is normal, we see that λ ′ (E) = λ(NE) defines a left L-invariant mean on L. Since L is abelian, λ ′ is automatically right-invariant, and thus , which finishes the proof.

Proof of Proposition 11.3
By assumption, the triple (G, Λ, N) is contracting. We recall that this means that for every finite set F N ⊂ N, we can find g ∈ G such that Since N is abelian, we can always choose g ∈ L. Indeed, since G = NL = LN, every g ∈ G can be written on the form ln with l ∈ L and n ∈ N, and thus Let S = LΛ ⊂ G. In order to prove that d * G (S) = 1, it suffices by Lemma 2.12 to show that S is thick, that is to say, we need to show that for every finite set F ⊂ G, there exists g ∈ G such that Fg −1 ⊂ S.
We may without loss of generality assume that F = F L F N , where F L ⊂ L and F N ⊂ N are finite sets. Since N is abelian, we can find l ∈ L such that lF N l −1 ⊂ Λ. Hence, Since F was chosen arbitrary, this shows that S is thick.
In order to show that d * (S −1 S) = 0, it suffices by Lemma 2.13 to prove that S −1 S is not syndetic. We shall argue by contradiction. Suppose that S −1 S is syndetic, and choose finite subsets F N ⊂ N and F L ⊂ L such that F N F L S −1 S = G. In particular, upon intersecting with N, we get F N F L ΛLΛ ∩ N = N. Since N ∩ L = {e G } and Λ < N, we note that for a fixed l ∈ L, Let Λ o ⊂ Λ be a finite generating set for Λ. It is now immediate from (11.3) that the finite set generates N. However, if (G, Λ, N) is any contracting triple, then N cannot be finitely generated. Indeed, suppose that N were finitely generated, and let N o be a finite generating set for N. Since (G, Λ, N) is contracting, we can find g ∈ G such that gN o g −1 ⊂ Λ, and thus gNg −1 = N ⊂ Λ, which contradicts our assumption that Λ is a proper subgroup of N.

Proof of Theorem 1.13
Let (G, Λ, N) be as in Example 5, and let L = {0} ⋊ Z. Let S and T be as in Proposition 11.3, and set L 2 = {0} ⋊ 2Z. Fix 0 < ε < 1 2 and let I o ⊂ T be a closed interval of Haar measure 2ε. If α ∈ T is an irrational number, then one readily verifies that the set for any non-trivial (hence finite-index) subgroup L o ⊂ L ∼ = Z.
We now set where r = (0, 1). Note that rL 2 = {0} ⋊ (2Z + 1). In the notation of Proposition 11.3, we have chosen A o = L 2 and B o = r(L 2 ∩ C o ). One readily checks that and hence, by Proposition 11.3, Suppose that B is contained in a proper periodic set P ⊂ G with Stab G (P) = G o (which has finite index in G). We may assume that P = G o B = G. Let L o < L be a subgroup such that NG o = NL o . Then L o is a non-trivial (hence finite-index) subgroup of L. The following lemma will now be useful.
Proof. Let us fix a finite-index subgroup H o < H, and define We note that We leave it to the reader to verify that if s ∈ D + , then D ∩ H o s is in fact syndetic in H, and thus intersects every thick set T ⊂ H non-trivially. Let us fix a thick set T ⊂ H. We note that We apply this lemma as follows. First note that if (L/L 2 × T, τ o ) denotes the compactification of L given by τ o (l) = (l + 2Z, lα), for l ∈ L ∼ = Z, Since N is normal in G, we can extend τ o to a homomorphism τ : G → L/L 2 × T by τ(n, l) = τ o (l). We now note that and thus, by the previous lemma, In particular, we get Since P = G o B is assumed to be proper, we conclude that only the first case can occur. We have G o ⊂ NL o and since L o ⊂ L 2 , the intersection NrL 2 ∩ NL o is empty. Hence, for every left-invariant mean λ on G, we have which finishes the proof of Theorem 1.13. We denote by τ : G → T the extension of τ o given by τ(n, q) = τ o (0, q). Let I ⊂ T be a closed interval with m T (I) < 1/3, which does NOT contain 0, and set By Proposition 11.2, we have We claim that A is spread-out. Indeed, if it were not, then we could find a set A ′ ⊂ A with d * (A ′ ) = d * (A) which is contained in a proper periodic set. We can fix λ ∈ L G such that λ(A ′ ) = d * (A) and λ(A) = m T (I).
We can clearly write A ′ of the form τ −1 (I) ∩ R for some set R ⊂ G such that τ −1 (I) ∪ R = G. we conclude that R is thick by Lemma 2.12. By assumption, A ′ = τ −1 (I) ∩ R is contained in a proper periodic subset Q of G, and thus G o A ′ = G for the finite-index stabilizer of Q. However, by Lemma 11.5, Since T is connected, the right hand side must equal G, which is a contradiction, and thus A is spread-out.
Since A is spread-out in G, Scholium (1.6) shows that the inequality in (11.4) cannot be strict, and thus d * G (AB) = d * G (A) + d * G (B) < 1. In particular, AB is not thick by Lemma 2.12. In fact, AB cannot contain a piecewise periodic set, say Q ∩ T where Q is a (proper) periodic set and T is thick. We note that if this is the case, then τ(Q ∩ T ) ⊂ τ(AB) = (I + I) ∪ I = T, so our assertion follows from the following simple lemma applied to the connected compactification (T, τ) of G above. Lemma 11.6. If (K, τ K ) is a connected compactification of a countable group H, then, for every periodic set Q ⊂ H and thick set T ⊂ H, we have τ K (Q ∩ T ) = K.
Proof. Let (F n ) be an exhaustion of H by finite sets, and let Q ⊂ H be periodic and T thick. We can find a sequence (h n ) in H such that F n h n ⊂ T , and upon passing to a sub-sequence we may assume that the sequence h n H o is constant, say equal to hH o , where H o is a finiteindex normal subgroup of H, contained in the stabilizer of Q. Furthermore, if we fix an invariant metric d K on K, and ε > 0, we can restrict to a further sub-sequence, and assume that d K (τ K (h n ), t) < ε for some t ∈ K, and for all sufficiently large n in this sub-sequence. Then, τ K (Q ∩ T ) ⊃ τ K (Q ∩ F n h n ) = τ K (Qh −1 ∩ F n )τ K (h n ), for all n.
Since (F n ) exhaust G, we have where B ε (t) denotes the closed ball (with respect to the metric d K ) of radius ε around t. Since H o has finite-index in G, we see that τ K (H o ) < K is an open subgroup of K, and thus equal to K by connectivity. Since Q is invariant under H o , we see that τ K (Qh −1 ) must be dense in K, and thus τ K (Q ∩ T )B ε (t) −1 = K, for all ε > 0.
We leave it to reader to show that this implies that τ K (Q ∩ T ) is dense in K, which finishes the proof.
Let us now show that B is not contained in a Sturmian set with the same upper Banach density as B. We shall argue by contradiction. Let (M, τ M ) be a compactification of G, where M denotes either T or T ⋊ {−1, 1}, and fix a symmetric interval J ′ ⊂ T of Haar measure equal to d * (B), and an element a ∈ M. Let depending on whether M = T or M = T⋊{−1, 1}, and suppose that B ⊂ τ −1 M (J). Since e G ∈ B, we note that e M ∈ J. In both cases, J equals the closure of its interior.
Let us now define the compactification (K, τ K ) of G by τ K (g) = (τ(g), τ M (g)) for g ∈ G, where K denotes the closure of the image of τ in T × M, and set C = (I × M) ∩ K and D = (T × J) ∩ K.
One readily checks that m K (C) = m T (I) and m K (D) = m M (J) and τ −1 K (C) ∩ T ⊂ τ −1 K (D). In particular, m K (C) = m K (D), and τ −1 is syndetic. Since T is thick, and thus intersects every syndetic set non-trivially, we see that only the first alternative can hold. We leave it to the reader to verify that C o = C, which then implies (since D is closed) that C ⊂ D.
Since m K (C) = m K (D), the open set D o \ C ⊂ K must be empty, and thus D o ⊂ C. Since D equals the closure of D o , and C is closed, we conclude that C = D. However, since e M ∈ J, we have e K ∈ D, and thus e K ∈ C, which then implies that e T ∈ I. We have assumed is not the case. This contradiction implies that B cannot be contained in the Sturmian set τ −1 M (J). In this appendix we focus on the (additively written) abelian group G = (Z, +) and the Følner sequence ([−n, n]). In order to spare sub-indices, we denote by d the corresponding lower asymptotic density, that is to say, for A ⊂ Z, we define In what follows, we shall in this setting address the necessity of the conditions in Theorem 1.4 and Theorem 1.8. We give below four examples (two examples per theorem), how different attempts to weaken the hypotheses in these theorems fail. All of the examples are constructed by similar procedures. To avoid repeating the same construction four times, we collect here some notation that will be used throughout the appendix. The basic parameter is a proper closed interval I of the one-dimensional torus T, which we shall think of as the quotient R/Z. Let α ∈ T be irrational, and define the Sturmian set C = n ∈ Z : nα ∈ I .
In the examples below we shall specify I, and thereafter reserve the letter C for the set above. One can readily check that C is not contained in a proper periodic set, and Finally, C does not contain a piecewise periodic set, nor does its sumset C + C as long as we assume that m T (I) < 1/2.

A.1. Weakening the conditions in Theorem 1.4: First attempt
Let us begin by showing that the assumption that the sumset A + B is not thick cannot be left out in Theorem 1.4. Proof. Suppose that m T (I) < 1 3 , and define the sets A = C ∩ N and B = C ∪ N.  Since A+B ⊂ (C+n)∪(C+C), and the latter set does not contain a proper piecewise periodic set, neither does A + B. It is straightforward, albeit tedious, to verify that Our last example is quite technical, and we shall only provide a rough sketch. The point here is to demonstrate the necessity of the assumption that the sumset A + B does not contain a piecewise periodic set (in particular, it is not thick). The existence of such I and m can be proved using the fact that τ(T ) ⊂ T is dense, and utilizing the flexibility to translate a given interval of measure 1/4 around in T. Finally, once these sets and numbers have been chosen, we define the sets