{'fraction_non_alphanumeric': 0.057421186606618366, 'fraction_numerical': 0.00868905423927942, 'mean_word_length': 3.613808835486494, 'pattern_counts': {'":': 1, '<': 67, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 74, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Applications of Ultrafilters in Ergodic Theory and Combinatorial Number Theory

Ultrafilters are very useful and versatile objects with applications throughout mathematics: in topology, analysis, combinarotics, model theory, and even theory of social choice. Proofs based on ultrafilters tend to be shorter and more elegant than their classical counterparts. In this thesis, we survey some of the most striking ways in which ultrafilters can be exploited in combinatorics and ergodic theory, with a brief mention of model theory. In the initial sections, we establish the basics of the theory of ultrafilters in the hope of keeping our exposition possibly self-contained, and then proceed to specific applications. Important combinatorial results we discuss are the theorems of Hindman, van der Waerden and Hales-Jewett. Each of them asserts essentially that in a finite partition of, respectively, the natural numbers or words over a finite alphabet, one cell much of the combinatorial structure. We next turn to results in ergodic theory, which rely strongly on combinatorial preliminaries. They assert essentially that certain sets of return times are combinatorially rich. We finish by presenting the ultrafilter proof of the famous Arrow's Impossibility Theorem and the construction of the ultraproduct in model theory.


Introduction
Ultrafilters are one of the most mysterious and surprising objects in mathematics. On the one hand, there is no explicit construction of an ultrafilter and even proof of their existence involves the axiom of choice. On the other hand, they turn out to have remarkable applications in a wide variety of branches of mathematics. In topology they are closely tied to Stone-Čech compactification. In analysis, they provide a notion of a generalised limit, which is in many ways the best possible generalised limit that exists. In model theory, they make construction of ultraproducts and saturated models possible, leading to worthwhile applications in non-standard analysis. Even the theory of social choice can benefit from application of ultrafilters. What is even more, the space of ultrafilters is a highly non-trivial object with rich algebraic and topological structure, well worth the study in its own right. With a shade of national pride, we also mention that ultrafilters were first discovered by the Polish mathematician Tarski in 1930s, cf. [BK12].
The application of ultrafilters that interests us the most lies in ergodic theory. Running a little ahead of the exposition, we informally present the basic idea behind these applications. In ergodic theory, one classically considers Cesáro averages, which in a simplest instance take the form where T is a measure preserving transformation of a compact probability space X, and f : X → R is a measurable function. Ultrafilters allow one to replace the Cesáro averages by generalised limits along an idempotent ultrafilter p p-lim n f (T n x) .
While typical results in ergodic theory would imply that certain sets of recurrence times are non-empty, or at best syndetic, ultrafilter methods show additional algebraic structure of these sets, such as IP * or C * .
Behaviour of the mentioned averages depends on the algebraic properties of p, hence it becomes necessary to study the algebraic structure of ultrafilters. We also need to establish a connection with combinatoric to recover a concrete notion of largeness from considerations about ultrafilters. However, we dispose of the need to study Cesáro averages, which frees us of much of the ε/δ management. On the whole, we are able to shift much of the burden from analysis to algebra, which often simplifies the reasonings and strengthens the conclusions, as well as provides a different point of view.
Many important contributions to the area of our investigation were made by Bergelson, Blass, Hindman, Knutson, Kra, Leibman, McCutcheon, and others. The highly illuminating papers by these authors were the basis of our research. Very accessible expository papers by Bergelson were especially helpful and motivating. Of importance to our considerations was also the sole paper by Schnell [Sch07] on ergodic theory. A comprehensive reference for algebraic structure is due to Hindman and Strauss [HS12]. Topological and set-theoretic issues are thoroughly discussed by Comfort and Negrepontis [CN74]. Great expository material can be found in the thesis by Zirnstein [Zir12]. Most of the discussed results come from these sources, with some minor extensions and simplifications due to the author.
The aim of this thesis is to provide a possibly self-contained introduction to the many ways in which ultrafilters are applicable to ergodic theory and combinatorial number theory, and provide a glimpse of their applications in other areas. We hope to convince the reader that ultrafilters are a versatile and powerful tool for dealing with problems in these fields. We do not assume previous knowledge of ultrafilters, and take care to keep the treatment self-contained. A degree of familiarity with abstract topology and functional analysis is necessary for the dynamical applications. A nodding acquaintance with ergodic theory and with combinatorics is useful, but not strictly indispensable.
The thesis structure is as follows.
In Chapter 1 we introduce the preliminary material. We begin by defining filters and ultrafilters on arbitrary spaces. Subsequently, we introduce the natural topological structure on the space of ultrafilters, as well as the semigroup structure, if the underlying space is a semigroup. We close with some remarks on general left-topological semigroups.
In Chapter 2 we discuss applications in combinatorics, especially combinatorial number theory. Notions introduced there include IP/IP * sets and C/C * (central) sets, which will be important for dynamical applications. We provide the ultrafilter proof of Hindman's theorem, which is arguably one of the most elegant application of ultrafilters, as well as some immediate generalisations. Other discussed results include van der Waerden Theorem and Hales-Jewett Theorem, which have effectively the same proof in the ultrafilter approach.
In Chapter 3 we discuss applications in ergodic theory. We first discuss the easy example of maps on the torus, where we derive recurrence results along polynomials and more general functions. A significant amount of work goes into establishing the correct generalisation of polynomial maps. Next, we proceed to applications in general dynamical systems, where we prove that certain set of return times are IP * or C * .
In Chapter 4 we present some applications of ultrafilters in apparently unrelated areas of mathematics: social choice theory and model theory. Our main purpose there is to show how multifarious applications of ultrafilters are; the reader interested solely in ergodic theory may disregard this chapter. We start by considering Arrow's theorem on voting procedures. Next, we develop ideas already present in this simple application to construct ultraproducts, which are an important object in model theory, important for the introduction of non-standard analysis.

Preliminaries
In this chapter, we build up the basics of the theory, necessary for later applications. To begin with, we define ultrafilters on arbitrary sets, and then proceed to introduce the additional structure that the space of ultrafilters carries. In particular, we show that the space of the ultrafilters on a discrete semigroup has a natural structure of a compact lefttopological semigroup, and can be identified with the Stone-Čech compactification. We develop some basic theory of Stone-Čech compactifications and compact left-topological semigroups in an abstract way, avoiding reference to the concrete example of the ultrafilter space, partly for elegance, partly because we will require a pinch more generality in the applications to come. The notion of a generalised limit, defined here, will play an the most essential role in the following chapters.
For most of the applications, it suffices to restrict one's attention to ultrafilters on simple spaces. The single most useful example is the natural numbers N = {1, 2, 3, · · · }. Slightly more general ones are the integers Z, the finite sets of natural numbers P fin (N), and Cartesian products thereof. The reader may always assume that the space X is one of these special cases.
All of the presented results are widely known by now. The basic definitions can be found in any introductory text, and are provided in many of the cited papers. For aspects connected to topology and pure set theory, we refer to [CN74]. Also, many purely topological texts treat Stone-Čech compactification, possibly without identifying it with the ultrafilters; see for example [Eng89]. For a detailed discussion of the algebraic structure, we refer to [HS12].

Set theory: filters and ultrafilters
Throughout this section, let X denote for an arbitrary set. We will later require the space X to additionally have the structure of a discrete semigroup, but just yet we work in a fully general context. The main goal in this section is to introduce and analyse the notion of ultrafilters on X, but it will be useful to also define the related weaker notions of filters and families with the finite intersection properties.
Definition 1.1 (Finite intersection property). Let X be a set. A family A ⊂ P(X) is said to have finite intersection property if and only if for any finite subset A 0 ⊂ A it holds the intersection A 0 is non-empty.
Definition 1.2 (Filter). Let X be a set. A family F ⊂ P(X) is said to be a filter if and only if the following conditions are satisfied: (i ) ∅ ∈ F, X ∈ F.
(ii ) If A ∈ F and A ⊂ B then B ∈ F.
We denote the family of all ultrafilters on the set X by Filt (X). Definition 1. 3 (Ultrafilter). Let X be a set. A family U ⊂ P(X) is said to be an ultrafilter if and only if U is a filter and the following additional condition is satisfied: We denote the family of all ultrafilters on the set X by Ult (X). We acknowledge that this notation is slightly non-standard. It is more frequent to denote the set of ultrafilters by βX, which has its roots in topology. This issue will be discussed in more detail.
Observation 1.4. If U ∈ Filt (X) is a filter the property (iv ) in definition 1.3 is equivalent to either of the following conditions: (v ) If A ∪ B = X then A ∈ U or B ∈ U .
(vi ) If n i=1 A i ∈ U then A i ∈ U for some i.
(vii ) If C, D ∈ P(X) \ A, then C ∪ D ∈ P(X) \ A (viii ) If C ∈ U then C c ∈ U .
Proof. (iv ) ⇐⇒ (v ) Since X ∈ U by property (i ), the implication (iv ) =⇒ (v ) is clear. Conversely, if A ∪ B =: C ∈ U , then A ∪ B ∪ C c = X, so either A ∈ U or B ∪ C c ∈ U by property (v ). If A ∈ U then we are done. If B ∪ C c ∈ U , then B = (B ∪ C c ) ∩ C ∈ U , so we are done as well.
(v ) ⇐⇒ (viii ) Since C ∪ C c = X, the implication (v ) =⇒ (viii ) is clear. Conversely, if A ∪ B = X, then setting C := A \ B we find C c = B \ A. By (viii ) we have C ∈ U or C c ∈ U . Since A ⊃ C and B ⊃ C c , the property (ii ) implies A ∈ U or B ∈ U .
(iv ) ⇐⇒ (vi ) Condition (iv ) is a special case of (vi ), where n = 2, so the implication (vi ) =⇒ (iv ) is clear. On the other hand, (vi ) follows from (iv ) by induction. The case n = 2 is clear. Suppose (v ) holds for all n < n 0 where n 0 ≥ 3. If we then have n 0 i=1 A i ∈ U , then either A n 0 ∈ U or n 0 −1 i=1 A i ∈ U by the case n = 2. If bigcup n 0 −1 i=1 A i ∈ U , then case n = n 0 − 1 implies that A i ∈ U for some 1 ≤ i < n 0 . Thus, either way, A i ∈ U for some i, so the claim for n = n 0 follows. By induction, (vi ) holds for all n.
(iv ) ⇐⇒ (vii ) Putting C := A c and D := B c we see that the two conditions are equivalent.
Remark 1.5. The family of ultrafilters can be more concisely defined, using the following characterisation. A family U ⊂ P(X) is an ultrafilter if and only if for any partition X = A 1 ∪ A 2 ∪ A 3 , exactly one of A i belongs to U . We prefer the more elaborate definition because it is more intuitive and easier to motivate. Because the finite intersection property does not impose any additional structure, a simple way to give an example of a set with the finite intersection property is to consider an arbitrary subset of a given filter. We will shortly see that these are essentially the only examples.
The principal ultrafilter can be construed as the set of neighbourhoods of a given point in the discrete topology. This is essentially the only case when the set of neighbourhoods is an ultrafilter.
Although we are not able to exhibit concrete examples of ultrafilters, we will prove an existence statement which will provide us with all the ultrafilters we need. As a first step, we show how a family with the finite intersection property can be extended to a filter. Among other applications, this allows one to specify a filter by providing less data: a generating family with the finite intersection property, instead of all the elements of the filter.
Lemma 1.12 (Constructing filters). Let A ⊂ P(X) be a family with the finite intersection property. Then there exists a unique filter F ⊂ P(X) which contains A and is minimal with respect to this property among filters. Moreover F can be explicitly described as: Proof. Let F be defined as above. We shall prove that F is indeed a filter, and that it satisfies the required uniqueness property.
We begin by the showing that, assuming that F is a filter, it is the unique minimal filter containing A. Indeed, let G ⊂ P(X) be a filter and suppose that A ⊂ G, and let us consider a set A ∈ F with A ⊃ A 0 . Since G is closed under finite intersections, we have A 0 ∈ G. Since G is closed under taking supsets, A ∈ G. Since A was chosen arbitrarily, it follows that F ⊂ G. Thus, F is minimal, and it remains to show that it is a filter.
By definition of the finite intersection property, all the intersections of the form A 0 where A 0 ⊂ A and #A 0 < ℵ 0 are non-empty. Thus, if A ⊃ A 0 , then A = ∅, and thus ∅ ∈ F. Taking arbitrary A 0 , we also find that X ∈ F.
Let A ∈ F and B ⊃ A. Then, we have: for some finite A 0 ⊂ A. It follows immediately that B ∈ F, and thus F is closed under taking supersets.
Suppose that A, B ∈ F. Then, there exist finite subsets A 0 , B 0 ⊂ A such that A ⊃ A 0 and B ⊃ B 0 . Then the family A 0 ∪ B 0 is a again a finite subset of A, and we have by de Morgane's rules: Thus, F is closed under taking finite intersections.
It follows that F satisfies all the defining properties of a filter.
We next give a convenient characterisation of ultrafilters in terms of maximality. It will lead directly to the existence result alluded to earlier. Moreover, it provides some intuition concerning the structure of ultrafilters.
Proposition 1.13 (Characterisation of ultrafilters). Let A ⊂ P(X) be an arbitrary family of subsets. Then the following conditions are equivalent: (1) The set A is a maximal family with finite intersection property, i.e. A has finite intersection property and if A ′ ⊃ A also has this property then A ′ = A.
(2) The set A is an ultrafilter. Proof.
(1 ) =⇒ (2 ) Suppose A has finite intersection property, and there is no proper supset of A with this property. Since all fiters clearly have the finite intersection property, it follows from lemma 1.12 that A is in fact a filter. Thus, it remains to verify the defining property of an ultrafilter. Let us now consider an arbitrary set C ⊂ X which does not belong to A. Since A ∪ {C} is then a proper supset of A, it cannot have the finite intersection property. Taking into account that A is already closed under finite intersections, this means that there exists a set A ∈ A such that C ∩ A = ∅.
This can be rewritten as C c ⊃ A, so from A ∈ A we conclude that C c ∈ A. Thus, C ∈ A implies C c ∈ A, and hence A satisfies all the defining properties of an ultrafilter.
(2 ) =⇒ (1 ) Suppose that A is an ultrafilter. Since ultrafilters are closed under finite intersections, A has finite intersection property, so it remains to show that no proper supset of A has this property. Suppose that A B where B ⊂ P(X) is an arbitrary family, and let B ∈ B \ A. Since B ∈ A, by the ultrafilter property, B c ∈ A ⊂ B.
Thus, B, B c ∈ B, so evidently B does not have the finite intersection property.
Since B was taken arbitrarily, the maximality of A follows.
Construction 1.17. Let α := #P(X) = 2 #X be the cardinality of the family of all subsets of X. We can enumerate all sets these subsets by ordinals less then α: P(X) = {A ι } ι<α . We stress that the enumeration of the sets in P(X) is done in advance of any subsequent choices.
Let F 0 be a filter. We shall construct an ascending family of filters {F ι } ι≤α such that F α will turn out to be an ultrafilter. Because the construction will involve a choice at each stage, and we want to keep track of these choices, let χ ∈ {⊤, ⊥} α be an arbitrary sequence.
The filter F 0 is already given, which constitutes the base for the transfinite induction that we are about to perform. We need to show how to construct F β+1 given {F ι } ι≤β and how to construct F ζ given {F ι } ι<ζ for limit ordinal ζ. At the step F γ is defined, the following invariant shall be satisfied: Additionally, we keep track of a sequence of ordinals {τ (β)} β<α .
Let us suppose that I = ∅, so τ (β) < α and F β is not yet an ultrafilter. Let us put B := A τ (β) if χ β = ⊤ and B := A c τ (β) if χ β = ⊥. By construction, it is clear that B c ∈ F β , and hence the family B := F β ∪ {B} has finite intersection property. By Lemma 1.12, there exists the smallest filter that contains B; let F β+1 be this filter.
It remains to check that ( * ) is satisfied for β + 1. Because of the construction of τ , it suffices to show that if ι ≤ β, then ι ≤ τ (β), which amounts to the proving that τ (β) ≥ β.
To prove this, we first note that the function τ : β + 1 → α is strictly increasing. Indeed, it is weakly increasing because the family F ι is ascending, and we have τ (ι + 1) = τ (ι) unless τ (ι) = α. Because of the monotonicity of τ and the construction of the order on the ordinals, it follows that τ (β) ≥ β, which finishes the inductive step.
Suppose now that ζ is a limit ordinal. Then we set F ζ := ι<ζ F β . It is clear that F ζ is a filter because each term F ι in the union is a filter, and the family is ascending. It is also immediate that the condition ( * ) holds for ζ, and that F ζ ⊃ F ι for ι < ζ. This finishes the inductive step, and hence also the construction.
We claim that that F α is an ultrafilter. Indeed, because of the condition ( * ), for any γ < α it holds that A γ ∈ F γ+1 ⊂ F α or A c γ ∈ F γ+1 ⊂ F α . Because we already know that F α is already known to be a filter, this concludes the proof. We denote this ultrafilter by U χ .
In the above construction, an ultrafilter was specified by making #P(X) binary choices, or choosing χ ∈ {⊤, ⊥} #P(X) . This suggests that the cardinality of the ultrafilters that can be constructed should be 2 #P(X) . Note that this is the cardinality of P(P(X)), which contains Ult (() X), so certainly we can never construct more ultrafilters than this. It is not clear, however, that the construction does not terminate at an earlier step, leading to a smaller number of constructed objects. The following Proposition shows that this is not the case.
Proposition 1.18. The cardinality of the space of all ultrafilters on X is #Ult (X) = 2 2 #X . Moreover, if A is a family with finite intersection property and #A < #P(X), then the family of ultrafilters U ∈ Ult (X) such that U ⊃ A has cardinality 2 2 #X Proof. We will only prove the second claim, since the first follows by taking A := ∅. We take F 0 to be the smallest filter containing A, and we retain the notation from the above Construction 1.17. We also let δ := #X.
Let B := {A χ(ι) τ (ι) } ι<β , and choose an ordinal γ with #B, #A ≤ γ < α. It follows from the construction that F β is the smallest filter that contains A ∪ B. From the characterisation in Lemma 1.12, it follows that F β consists of the intersections of finite subsets of A ∪ B, of which there are γ. On the other hand, #F β = α, because there is a bijection between F β × 2 and P(X). This is the sought contradiction.

Topology: ultrafilters as a topological space
Our next goal is to establish the link between the ultrafilters and topology. There two main objectives that we will accomplish in this section.
Firstly, we will show that given an ultrafilter on the space X, it is possible to construct a notion of generalised limit for sequences indexed by X. This generalisation has number of desirable properties, most notable of which is that the limits along ultrafilters exist for all sequences with terms in a compact Hausdorff space.
Secondly, we define and study a natural topology on the space of ultrafilters Ult (X). We show that this topology is compact Hausdorff, which makes it remarkably well behaved.
The generalised limits and limits in the sense of topology are closely related to the limits in the topological sense. In fact, they can be considered to be the same notion, modulo a number of innocuous identifications. This leads us to the conclusion that Ult (X) can be identified with the Stone-Čech compactification of X, usually denoted by βX, assuming that we take X to be a discrete topological space.
Throughout this section, X denotes a topological space. When X comes with no standard topology, as is arguably the case for N, we assume the topology of X to be discrete. At some point we will entirely restrict to discrete topological spaces, but we do not do it just yet, in the hope of providing some motivating examples.
As has already been mentioned earlier, one of the main motivations behind the notion of a filter is that it can be used to construct generalised limits in a natural way. This is done in the following definition.
Definition 1.19 (Generalised limits). Let Z be a topological Hausdorff space, let f : X → Z be any map, and let F be a filter. If there exists z ∈ Z such that then we define z to be the limit of f along F. Symbolically, we denote this by: If no such z exists, we leave the symbol F-lim The above definition does not guarantee that the limit, if exists, is unique. In particular, if Z is equipped with the trivial topology: Top(Z) = {∅, Z}, then for any z ∈ Z it holds that F-lim x f (x) = z. However, this situation is not worse than for the classical notion of a limit. We will now show that for most interesting spaces, the limit is in fact unique, hence the notation will not lead to confusion.
Proposition 1.20. If Z is Hausdorff, and there exists z ∈ Z such that F-lim x f (x) = z, then this z is unique.
Proof. For a proof by contradiction, suppose that z, z ′ ∈ Z are two distinct points such . By the definition of the limit we have A ∈ F and A ′ ∈ F, so on one hand A ∩ A ′ ∈ F, and on the other hand A ∩ A ′ = f −1 (U ∩ U ′ ) = ∅. This is a contradiction, since ∅ ∈ F by definition. Thus, no two distinct limits can exist.
Let us now see how the above notion corresponds to some of the usual limits. We begin with limits of conventional sequences indexed by natural numbers.
Example 1.21. Take X = N, arbitrary Hausdorff Z, and define F cofin = {A ∈ P(N) : #A c < ℵ 0 } to be the filter of cofinite sets. Then In particular, the limit may or may not exist.
Moreover, let L ⊂ N be an infinite set, and F L := {A ∩ L : A ∈ F cofin }. Then On the topological space X we already have the topological notion of a limit. In the following example, we show how to recover this limit as a special case of the generalised limit.
Example 1.22. Let y ∈ X, and let F y consist of all the open neighbourhoods of y. Then the generalised limit coincides with the classical limit as defined in general topology: As a special case of the above definition, we can compute limits along principal ultrafilters, which correspond to taking limits in the discrete topology.
Example 1.23. Let y ∈ X and let U y be the principal ultrafilter associated to the point. Then In particular, this limit always exists.
The following property of ultrafilters is extremely useful in applications. It is the principal reason why we will restrict to ultrafilters in most of the subsequent discussion.
Proposition 1.24 (Existence of limits). If U is an ultrafilter, then U -lim Proof. For a proof by contradiction, suppose that U -lim Since Z is compact, and {U z : z ∈ Z} is an open cover, there exists a finite subcover, which is by necessity of the form {U z : z ∈ Z 0 } for some But since the set Z 0 is finite, this is a contradiction with the defining property of ultrafilters (iv ).
It will be convenient to have the following description of the limit along an ultrafilter. It is more concrete, and easier to work with, than the one derived by using the definition verbatim.
Proposition 1.25 (Characterisation of limits). If U is an ultrafilter, then Proof. We will first show that z := U -lim cannot be empty.
Let us now show that if w ∈ A∈U cl f (A), then U -lim x f (x) = w. Let w ∈ Z be any such point, and let U ∈ Top Z be any open neighbourhood of w. For any A ∈ U we have that U ∩ f (A) = ∅, so f −1 (U ) ∩ A = ∅. Since A was taken arbitrarily, it follows that It is natural to inquire into the connection between the generalised limits we just defined, and the more classical notion of a limit in a topological space. It turns out that this relation is rather close, and generalised limits can be realised as the classical limits for the properly chosen topology on Ult (X). The Definition 1.19 suggests that the following sets should be open in the topology we are about to construct. Definition 1.26 (Base clopen sets). For a set A ∈ P(X), define A ∈ P(Ult (X)) to be the set: We stress that right now the symbol A is not meant to denote closure, but merely the construction in the definition above. It so happens that these sets will be closures in the topological sense (up to the natural identification of elements of X with the related principal ultrafilters), but they will also be open sets, and indeed a basis for a topology. A reader accustomed to working with connected topological spaces may find this worrying at first, but a closer inspection shows that this situation merely indicates that the constructed topology will be highly disconnected.
Before we pass on to using these sets to introduce a topology, let us note some of the convenient properties they satisfy.
Proposition 1.27 (Properties of closure). The operation A → A defined above has the following properties.
(1) If A ∈ P(X) then A c = A c .
(2) If A, B ∈ P(X) then A ∩ B = A ∩ B. (3 ) Using the previous points, we find that: We recall a classical result characterising families of sets that can be used to define a topology. Together with the above observations, it will immediately allows us to describe a topology on Ult (X).
Theorem 1.28. Suppose that X is a set and B ⊂ P(X) is a family of sets such that the following conditions are satisfied: A ∈ P(X)} to be the base of the topology. By Theorem 1.28 and Proposition 1.27, this indeed defines a topology.
We shall now proceed to the study of the topology of Ult (X). This topology turns out to have many desirable properties. Because the topology on Ult (X) does not carry any connection to the topology on X, we will be assuming from now on that the topology on X is discrete. Under this assumption, Ult (X) can be shown to be the maximal compactification of the discrete space X, in a sense that will be made precise soon.
Proof. Let U and V be any distinct ultrafilters. By the characterisation of ultrafilters as the maximal families with finite intersection property in 1.13, we see that neither of U and V is contained in the other. Thus, there exists sets A, B ∈ P(X) such that A ∈ U \ V and B ∈ V \ U . Now the ultrafilter property (viii ) ensures that A c ∈ V and B c ∈ U . If we now denote A 1 := A \ B and B 1 := B \ A then it follows that A 1 ∈ U and B 1 ∈ V and A 1 ∩ B 1 = ∅. Thus, U ∈ A 1 and V ∈ B 1 . Finally, by Lemma 1.27. Thus, A 1 and B 1 are separating neighbourhoods for U and V.
Proposition 1.31. The topological space Ult (X) is compact.
Proof. Let C ⊂ Top(Ult (X) X) be an open cover of Ult (X). Replacing C by a finer cover if necessary, we can assume C consists only of base sets of the form A with A ∈ P(X).
Thus, we can find a family A ⊂ P(X) such that C = {A : A ∈ A}. For any x ∈ X and the related principal ultrafilter F x based at x, we know that F x ∈ A if and only if x ∈ A. Thus, A is a cover of X.
I claim that one can find a finite subcover of A. For a proof by contradiction, suppose the denote the family of complements of sets in A. We can rephrase the above assumption by saying that for any finite family B 0 ⊂ B we have B 0 = ∅. Thus, B has the finite intersection property. By corollary 1.14, there exists an ultrafilter U that contains B. By construction, for any A ∈ A we have A c ∈ U , so U ∈ A c . But this means that U does not belong to any of the sets A c in the cover C, which is a contradiction with C being a cover.
Let A 0 be the finite cover of A, whose existence we have just proved, and let C 0 := {A : A ∈ A 0 } be the corresponding part of C. I claim that C is then a cover of Ult (X). Indeed, let U be any ultrafilter. Then A 0 = X ∈ U , so by the ultrafilter property (vi ) there exists A ∈ A 0 such that A ∈ A. Thus, U ∈ A ∈ C 0 , as desired.
Corollary 1.32. The topological space Ult (X) is normal.
Proof. It is well known that compact Hausdorff spaces are normal. [Eng89] As the above results show, the space of all ultrafilters Ult (X) is well-behaved from the topological point of view. However, it should be noted that this space is also large, as the following corollary shows.
Corollary 1.33. The topological space Ult (X) is not first countable, and in particular not metrizable.
Proof. The set X is dense in Ult (X). If Ult (X) was first countable, then all point in cl X could be described as limits of sequences (indexed by ω) with elements in X. The cardinality of such sequences is at most (#X) ℵ 0 ≤ 2 #X . On the other hand, we have seen that Ult (X) = 2 2 #X > 2 #X , hence Ult (X) cannot be first countable. It is known that metrizable spaces are first countable, so Ult (X) is in particular not metrizable.
So far, we have studied the basic topological properties of Ult (X). Note that there is a natural injective map i : X → Ult (X) given by i(x) = F x , the principal ultrafilter. We will now study the inclusion map in more detail, and show that X can be considered as a subspace of Ult (X).
Proposition 1.34. If A ∈ P(X) and i : X → Ult (X) is the natural inclusion, then is closed by the definition of topology on Ult (X), it follows that cl i(A) ⊂ A.
Conversely, suppose that U ∈ A, and let us consider any base neighbourhood of U of the form B with B ∈ P(X). Then, A ∈ U and B ∈ U , so A ∩ B ∈ U . Thus, for any is an arbitrary set of principal ultrafilters, then: Hence, arbitrary subset of i(X) is closed in the induced topology, and the topology of i(X) is discrete, which finishes the proof.
Corollary 1.36. The image i(X) of the standard inclusion i : X → Ult (X) is dense.
Proof. It suffices to apply the previous Proposition 1.34 to the full space X to find that: Our next step is to study the generalised limits from the topological perspective. The following proposition shows that the generalised limits can be though of essentially as ordinary limits in the space Ult (X).
Proposition 1.37. For a fixed map f : X → Z into a compact Hausdorff space, the map U → U -lim Proof. For ease of notation, define l(U ) := U -lim x f (x). We need to prove that l is a continuous map, i.e. that for any open set W ∈ Top Z, the pre-image l −1 (W ) is open.
For general topological reasons, it will suffice to show that for any U ∈ l −1 (W ) there exists a set A ∈ P(X) such that U ∈ A and l(A) ⊂ W . For any A and ultrafilter V ∈ A we have by Proposition 1.25 that l(V) ∈ f (A), and hence l(A) ⊂ cl f (A). Since Z is normal, we can find V ∈ Top Z such that cl V ⊂ W . Let A := f −1 (V ). By definition of the limit, U ∈ A. By the above observation: The above considerations show that the space Ult (X) is a compactification of X with the rather special property that many maps defined on X can be naturally prolonged to Ult (X). This situation has been studied in much depth by topologists in the more general context of locally compact topological spaces. Proposition 1.39. If the Čech-Stone compactification of X exists, then it is unique up to unique isomorphism. More precisely, if (Y, i) an (Y ′ , i ′ ) are two Stone-Čech compactifications, then there exists a unique isomorphism of topological spaces u : Proof. Suppose that (Y, i) and (Y ′ , i ′ ) are two Čech-Stone compactifications of X. Then, applying the definition of Čech-Stone compactification for (Y, i) to the map i ′ : X → Y ′ , we find that there exists a unique map g : Applying the definition of compactification once more, this time to (Y, i) and the map i : X → Y we conclude that g ′ • g = id Y . Likewise, we show that g • g ′ = id Y ′ . Thus, g is an isomorphism between (Y, i) and (Y ′ , i ′ ), in the sense that it is an isomorphism between Y and Y ′ and intertwines between i and i ′ . Uniqueness of g follows from uniqueness in the definition the compactification.
The following theorem affirms existence Čech-Stone compactification in a situation much more general than we need in our applications.
Theorem 1.40. If X is a locally compact Hausdorff topological space, then there exists a Čech-Stone compactification of X.
Definition 1.41. If X is a locally compact Hausorff topological space, then we denote its Čech-Stone compactification by (βX, i), with the understanding that βX is defined only up to the unique isomorphism. If f : X → Z is a map to an arbitrary compact Hausdorff space, then we denote by βf : βX → Z the unique continuous extension such With this more general language, we can summarise many of the previous results on the topology of Ult (X) is a much more succinct form.
Theorem 1.42. Let X be a discrete topological space. Then the space Ult (X) together with the natural inclusion map i : X → Ult (X), is the Čech-Stone compactification of

X.
Proof. Let f : X → Z be any continuous map from X to a compact space Z. Define . Then g is continuous by proposition 1.35. By Example 1.23 we have that g For uniqueness, suppose that h : βX → Z is another continuous function such that h • i = f . By the choice of g and h, we have h i(X) = g i(X) . But i(X) is dense in βX by Proposition 1.36, so h = g, as desired.
Remark 1.43. We now have two different notations for the space of ultrafilters on X, namely βX and Ult (X). They are equivalent, but seem to carry slightly different intuitions. We will use the notation Ult (X) when topological structure is irrelevant, and consequently denote ultrafilters by U , V, W, . . . . This will be done when an ultrafilter is thought of as a family of sets with particular properties. When topological properties become important, especially when considering limits, we will prefer the notation βX for the space of ultrafilters on X, and use p, q, r, . . . to denote ultrafilters. It will usually be more helpful to think of ultrafilters as limit objects in this case. We keep in mind that an ultrafilter corresponds to a family of sets, but avoid notations like "set A ∈ p" for aesthetic reasons.
Below, we list some of the properties of the extensions of maps provided by the Čech-Stone compactification. They are very useful when one is faced with the need to compute generalised limits, and mimic the analogous rules for classical limits. 1. For any map f : X → Z to a compact Hausdorff space Z we For any maps f : X → Z and g : Z → T to compact Hausdorff spaces Z, T , we 3. For any maps f : X → Y and g : Y → Z where X and Y are discrete and Z is For any maps f : X → Z and g : X → W where X is discrete and Z, W are compact Hausdorff, we have β(f × g) = (βf ) × (βg).

Proof.
1. It follows directly from how the limit was defined.
2. It suffices to check that g • βf satisfies the universal property: But this is clear, since βf • i = f , and composition is associative.
The statement about the limits follows directly from relation of U -lim x to βf from the previous point.

It suffices to check that
This can be done as follows: Let p : Z × W → Z and q : Z × W → W be the standard projection maps. To verify that β(f × g) = βf × βg, it sufices to prove that p • β(f × g) = βf and q • β(f × g) = βg. From the previous points, we already know that: and likewise p • β(f × g) = βg, hence the claim follows.
5. Follows immediately from the previous observations.
The following special case of the above theorem shows that generalised limits have many of the properties the classical limits have.
Corollary 1.45. Let f, g : N →R be any maps, whereR = R ∪ {+∞, −∞}. Then we have: provided that the application of the operations + and · does not lead to indeterminate symbols ∞ − ∞, 0 · (±∞). Likewise, we have: provided that the operations can be carried out.

Algebraic structure of filters and ultrafilters
We will presently show how to give Ult (X) the structure of a semigroup, assuming that X is a semigroup. The derived structure will be natural, but not the only possible. There are in fact two competing and equally natural notions of semigroup structure, so one has to be careful when consulting the literature.
Throughout this section, we assume that X is a semigroup. We also make X into a topological space by declaring that the topology on X is discrete. We have seen how to endow Ult (X) with a natural topological structure.
We begin by giving some algebraic definitions, needed to define the algebraic structure on Ult (X).
Definition 1.46. For a set A ⊂ X and x ∈ X, we define x\A to be the set {y ∈ X : xy ∈ A}, and A/x to be the set {y ∈ X : yx ∈ A}.
Likewise, for a filter F we define F\A to be the set {x ∈ X : A/x ∈ F}, and F we define A/F to be the set {x ∈ X : x\A ∈ F}.
Remark 1.47. Note that for F x \A we use A/x rather than x\A. This makes sense, since this way we have F x \A = x\A. The analogous remark applies to A/F x . Proof. The conditions y ∈ x\A∩x\B and y ∈ x\A∩B are both equivalent to xy ∈ A∩B.
Likewise, the condition y ∈ A/F ∩ B/F is equivalent to y\A ∈ F and y\B ∈ F. This in turn is equivalent to y\A ∩ y\B = y\A ∩ B ∈ F.
The remaining part of the claim follows by exactly symmetric reasoning.
Observation 1.49. If A ∈ P(X), x ∈ X and U ∈ Ult (X), then (x\A) c = x\(A c ) and Proof. The condition y ∈ (x\A) c is equivalent to xy ∈ A, which is equivalent to y ∈ x\(A c ). Likewise, the condition y ∈ (A/U ) c is equvalent to y\A ∈ U . Because U is an ultrafilter, this says that (y\A) c = y\(A c ) ∈ U , which is equivalent to y ∈ (A c )/U .
The remaining part of the claim follows by exactly symmetric reasoning.
We are now ready to define the semigroup structure on Ult (X). Hopefully, the definition appears natural, at least on the formal level. It is also noticable that we could have formulated the definition differently, applying the semigroup operation on the reverse side. This choice is far from inconsequential, as shall be seen when we discuss the relation with topology.
Definition 1.50 (Semigroup structure of Ult (X)). For filters F, G we define F · G to be the family of those sets A ∈ P(X) for which the set A/G belongs to F: As always, we see how the definition applies in case of principal ultrafilters.
Example 1.51. For principal ultrafilters we have F x · F y = F x·y . This follows by expanding the definitions: So far, we have defined the operation (F, G) → F · G only as a map Filt (X) × Filt (X) → P(P(X)). Before we make Filt (X) and Ult (X) into semigroups, we need to check that the constructed operation satisfies a number of additional conditions. We begin by verifying that necessary closure properties. Afterwards, we check associativity.
Proof. We need to check a number of defining properties of filters.
We clearly have ∅ ∈ F · G and X ∈ F · G. Moreover, if A ∈ F · G and B ⊃ A then B/G ⊃ For the additional part, consider we already know that U · V ∈ Filt (X), so it remains to check that ultrafilter property. Let A ∈ P(X). Then either A/V ∈ U or (A c )/V = (A/V) c ∈ U , hence either A ∈ U · V or A c ∈ U · V, which finishes the proof.
Proof. Let A ∈ P(X). We show that A ∈ (F · G) · H if and only if A ∈ F · (G · H), using the following transformations.
Having verified the semigroup structure of Ult (X), we proceed to describe the semigroup operation in more detail. Our main objective here is to find the connection between algebraic and topological structure. Proof. Let us take any C ∈ U ·V. By the definition, we have C/V ∈ U . For any x ∈ C/V, which we fix for the time being, we have x\C ∈ V. For y ∈ x\C we have x · y ∈ C, and hence i(x · y) ∈ C. Because x\C ∈ V and C is closed, we have V-lim y i(x · y) ∈ C.
Likewise, because C/V ∈ U and the choice of x was arbitrary, another limit transition Because C was arbitrary and the space Ult (X) is Proposition 1.56. For any function f : X → Z into a compact Hausdorff space, Proof. Using Proposition 1.44, we can perform the following transformations (we denote the map X ∋ y → x · y ∈ X by µ x ): Remark 1.57. Even if X is a commutative group, Ult (X) is not in general neither commutative, nor is it a group. In fact, even in Ult (Z), all elements except for the principal ultrafilter are non-invertible and do not commute with the remainder of Ult (Z). Noninvertibility is straightforward to prove: it suffices to notive that if U is non-principal, then so is U · V for any V. One needs a considerable amount of work to prove noncommutativity, so we refrain from further discussion on this purely negative result.
Proof. It suffices to show that if U · V ∈ A for some A ∈ P(X), then U ′ · V ∈ A for U ′ in some open neighbourhood of U . According to definition 1.50 that the condition U ′ · V ∈ A is equivalent to: A/V ∈ U ′ . But this is equivalent to U ′ ∈ A/V, so we have just exhibited the desired open neighbourhood and we are done.
Remark 1.59. In general, the map µ in the above corollary is not continuous in the right argument. In fact, if it was, a simple argument would prove commutativity of Ult (X).
If we had chosen the definition of the semigroup structure differently, the map µ would have been continuous in the right argument. If X opp denotes the semigroup with action x · opp y := y · x, then Ult (X opp ) opp is a compactification of X with multiplication continuous in the right argument instead of the left argument.
Because Ult (X) will now have both topological and algebraic structure, we introduce the relevant definition.
Definition 1.60 (Topological semigroup). Let X be a set, (X, ·) a semigroup and (X, T ) a topological space. Then the triple (X, ·, T ) is said to be a topological semigroup (resp. right/left topological semigroup) if and only if the multiplication map µ : X × X ∋ (g, h) → g · h is continuous (resp. continuous in the right/left argument).
Corollary 1.61. The space Ult (X) is a compact Hausdorff left-topological semigroup.
Proof. This follows directly from combining the results obtained previously.
Having established that Ult (X) is a compact left-topological semigroup, we now turn to study compact left-topological semigroups in more generality. Although our key object of interest will be Čech-Stone compactifications of discrete groups, we keep the discussion general because we need to apply our results to slightly more involved semigroups, such as (Ult (N)) k . Until the end of this section, S stands for a compact left-topological semigroup, except some initial definitions.
We note in the passing that all proved statements have their analogues in right-topological semigroups. In fact, if S is a right-topological semigroup, then one can form the semigroup S opp on the same set with the same topology by declaring x · opp y = y · x. A moment's thought will convince the reader that S opp is then a left-topological semigroup, to which our results apply.
Study of ideals, especially the minimal ones, turns out to be essential for understanding the structure of general semigroup. We note that the concept becomes trivial in groups, where the only ideals are the trivial ones -much as ring ideals make little sense in fields.
Definition 1.62 (Ideal). Let S be a semigroup. Then a non-empty set I ⊂ S is defined to be a left (resp. right ) ideal, if and only if S · I ⊂ I (resp. I · S ⊂ I) 2 . If I is both left and right ideal, we refer to it as a two-sided ideal. By principal left ideal (resp. principal right ideal) we mean the ideal S · x (resp. x · S). The ideal is said to be minimal, if there is no ideal properly contained in it.
We will mostly pay attention to left ideals, because they are well-behaved from the topological point of view, as shown in the following lemma. Note that we would not be able to prove the analogous statement for right ideals.
Lemma 1.63. Let S be a compact left-topological semigroup. If L = S · x is a principal left ideal in S, then L is closed.
Proof. Note that L is the image of a compact space S by the continuous map µ(·, x).
Thus, L is compact, as the image of a compact space by a continuous map. Since S is assumed to be Hausdorff, L is hence closed.
The following lemma is useful for finding left ideals contained in chains of left ideals.
The result does not depend on topology. The analogous statement is true for right and two-sided ideals, but we won't need those results.
Lemma 1.64. If L is any family of left ideals in a semigroup S, then L is either the empty set or a left ideal.
Proof. It follows from direct transformations that: Thus, the set L is closed under multiplication on the right. Hence, as long as it is non-empty, it is a left ideal.
We are now able to characterise minimal left ideals. Again, the result is independent of topology, and holds also for right ideals.
Proposition 1.65. If L is a left ideal in a semigroup S, then L is minimal if and only if for any x ∈ L we have L = G · x.
Proof. If L is minimal, then it does not properly contain any left ideal (principal or otherwise), so we only need to prove the other implication. Let us thus take L as described, and for an arbitrary x ∈ L consider the left principal ideal L ′ := S · x. Then L ′ ⊂ L, by minimality the assumption on L we have L ′ = L. Thus, L = S · x for any x ∈ L, and all remaining claims follow readily.
We are finally able to prove an existence statement about minimal left ideals. The result depends heavily on the topology, even though the formulation contains no topological notions. The reader will easily convince himself that simple non-compact semigroups, such as N k or P fin (N) contain no minimal ideals. We claim that each chain C ⊂ L has a lower bound M . In fact, we can just take What is more, M is the intersection of a descending family of non-empty compact sets, hence it is non-empty and compact. Thus, by Lemma 1.64, M is a left ideal, and hence an element of L.
It now follows from Kuratowski-Zorn Lemma that C contains a minimal element, say L ′ . By construction, L ′ contains no proper closed left ideal, so by Lemma 1.65, L ′ is a minimal left ideal. By definition, L ′ ⊂ L. Thus, L ′ is the sought minimal ideal.
We shall now introduce the notion of idempotence, which is useful in study of semigroups.
Definition 1.67 (Idempotent). Let S be a semigroup. An element x ∈ S is said to be idempotent if and only if x · x = x.
Example 1.68. If G is a group, on at least a cancellative monoid, the the only idempotent is the unit, e. Indeed, from x · x = x · e it follows after cancelling x that x = e.
If E is a Banach space, then the idempotent elements in the semigroup of bounded operators B(E) are the projections onto closed subspaces of E.
It is not clear at all that idempotents should exists. For example, (N, +) contains no idempotents, and the only idempotent in (N, ·) is 1. Generally, if S is a cancellative monoid and I is a proper ideal, then I contains no idempotent. Hence, the following theorem, due to Ellis [Ell58] might come as a welcome surprise.
Theorem 1.69 (Existence of idempotents, Ellis). Let S be a compact left-topological semigroup. Then S contains an idempotent element.
Proof. We divide the proof in two steps.
Step 1. Among the compact sub-semigroups of S, there exists a minimal one S ′ .
Proof. Consider the family of S of all compact sub-semigroups of S, including S itself.
To show that there is the minimal in S with respect to the order induced by inclusion, we use Kuratowski-Zorn Lemma. We need to verify that any chain C ⊂ S has a lower bound M . We just take M := C, which is a subset of any T ∈ C by definition. Since M is the intersection of a descending family of compact non-empty sets, it is non-empty and compact. It is closed under the semigroup operation, since all T ∈ C are such, and this is an inductive condition. Thus, M belongs to S, as desired. Now, Kuratowski-Zorn Lemma ensures the existence of the announced minimal element.
Step 2. Any minimal compact sub-semigroup S ′ contains exactly one element.
Proof. Let L ⊂ S ′ be a minimal left ideal. We know that for any x ∈ L, we can write L in the form L = S ′ · x. Consider the set T := {y ∈ S ′ : x = y · x}. Note that since x ∈ L = S ′ · x, we have x = y · x for some y ∈ S ′ , and hence T is non-empty. Since the map y → y · x is continuous, and T is the preimage of {x}, T is compact. Moreover, if y, y ′ ∈ T then y ′ yx = y ′ x = x, so y, y ′ ∈ T . Thus, T is a compact sub-semigroup of S ′ .
We have assumed that S ′ is a minimal compact sub-semigroup of S. Hence, the above considerations show that T = S ′ . In particular, we have x ∈ T , which means precisely that x · x = x. Thus, {x} is a compact sub-semigroup of S. Using minimality again, we conclude that S ′ = {x} consists of precisely one idempotent element.
We have established that S has a one-element sub-semigroup {x}. In particular, we have x · x = x, and consequently x is the sought idempotent.
Corollary 1.70. If T ⊂ S is a closed sub-semigroup of S, then T contains an idempotent.
Proof. It suffices to note that T is a compact Hausdorff left topological semigroup in its own right, and apply Lemma 2.12. Of course, the property of being idempotent is independent of the semigroup in which we consider the element.
Corollary 1.71. There exists idempotent ultrafilters in Ult (X) for any discrete semigroup X. Moreover, if T ⊂ Ult (X) is a closed sub-semigroup, then T contains and idempotent.
Proof. We know that Ult (X) is a compact Hausdorff topological semigroup. Thus, the above Theorem 1.69 applies.
The next object of our study are the two-sided ideals. More precisely, we prove the existence of a unique two-sided ideal. Given that there generally exists a multitude of minimal left ideals and we were not able to guarantee existence of minimal right ideals at all, this may be a surprising fact. Moreover, this unique ideal has useful functional properties, as we will shortly see.
Proposition 1.72. There exists a unique minimal two-sided ideal in S.
Proof. Let L denote the family of all minimal left ideals if S, and define K := L. We claim that K is the sought ideal.
We first show that if I is a two sided ideal, then K ⊂ I. If L ∈ L is a minimal ideal, Because L is minimal we have L = L ∩ I, or simply L ⊂ I. Taking the union over all choices of L, we find that K ⊂ I.
Because each L ∈ L is itself a left ideal, K is also a left ideal. It remains to see that K is also a right ideal. We will in fact show more, namely that if L ∈ L and x ∈ S, then we have L · x ∈ L. Because L · x is clearly a left ideal, it remains to see that it is minimal.
For this, let us take any element of L · x, which is necessarily of the form y · x with y ∈ L, and notice that G · y · x = L · x because G · y = L.
Definition 1.73. We denote be K(S) the unique minimal two sided ideal of S. If x ∈ K(S), then we refer to x as minimal element of S. Likewise, x is called a minimal idempotent if x ∈ K(S) and x is idempotent.
Remark 1.74. The use of the adjective minimal in the above definition is customary, but we wish to note, following Hindman and Strauss [HS12] that it would be more logical to refer to K(S) as the smallest two sided ideal. Indeed, the phrase minimal suggests that other minimal ideals may exist. This being said, we accept the traditional notation.
It will be useful to have a criterion for membership in K(S).
Proposition 1.75. Let S be a compact left-topological semigroup, and fix some x ∈ S. Then the following conditions are equivalent: 2.
x ∈ L for some minimal left ideal L, 3. for any y ∈ S there exists z ∈ S such that z · y · x = x.
Proof. The equivalence of 1 and 2 follows directly from the proof of Proposition 1.72.
Suppose that 2 holds, and let y ∈ S as in 3. We have y · x = S · x = L. By the characterisation of minimal ideals, we have L = S · y · x, so x ∈ L implies that there exists z ∈ S such that x = z · y · x. Hence, 3 holds.
Finally, suppose that 3 is satisfied, and consider the left ideal L = S · x. Let us consider an arbitrary x ′ ∈ L, which is necessarily of the form x ′ = y · x, and let z be such that z · x ′ = z · y · x = x. It follows that: Because the other inclusion is clear, we have L = S · x ′ , which implies minimality of L by characterisation in Proposition 1.65.
Because these are the idempotent elements of K(S) that are of most importance, we derive another criterion for minimality of idempotents. We begin by introducing a partial order on the set of idempotents.
Definition 1.76. Let p, q ∈ S be idempotent elements of a compact left-topological semigroup S. Then we say that p ≤ q if and only if pq = qp = p.
Lemma 1.77. The relation ≤ defined in 1.76 is a partial order.
Proof. If is clear that the relation is reflexive: p ≤ p because pp = p. It is also clear that if p ≤ q and q ≤ p then p = pq = q, so the relation is weakly anti-symmetric. Finally, if p ≤ q and q ≤ r then we have: pr = pqr = pq = p, rp = rqp = qp = p so p ≤ r, proving transitivity.
We are now in position to characterise minimal idempotents as the idempotents minimal with respect to the introduced order.
Proposition 1.78. Let S be a compact left-topological semigroup, and let p ∈ S be idempotent element. Then the following conditions are equivalent: 1. The idempotent p is minimal in the sense of Definition 1.73.
2. The idempotent p is minimal with respect to the order in Definition 1.76.
Proof. 1 =⇒ 2 Suppose that p ∈ K(G) and that q is an idempotent with q ≤ p; we need to check that q = p. Let L = S · p be the left ideal generated by p. We see that q = qp ∈ L. It follows from Proposition 1.75 that we have for some r ∈ S the relation: p = rqp. Consequently: which finishes the proof that p = q.
2 =⇒ 1 Suppose that p is minimal with respect to ≤, and consider the left ideal L := S · p; we need to show that L is minimal. Let M ⊆ L be a minimal left ideal; we know that M = S · q for some idempotent q. Because q ∈ S · p, we have qp = q.
Let us consider the r := pq = pqp. It is clear taht r is idempotent: Moreover, we have pr = rp = r, so directly by the definition we have r ≤ p.
Because of minimality, we have r = p. Consequently, p = pq ∈ M , and by a previously shown characterisation we have M = L.
Corollary 1.79. Let p be an idempotent in a a compact left-topological semigroup S. Then, there exists a minimal idempotent q with q ≤ p.
We now prove some useful properties of the minimal ideal K(S), depending on S. We begin with a simple result on Cartesian products, and then consider a slightly more involved result on sub-semigroups. These facts will have unexpected combinatorial applications.
Conversely, consider any x ∈ K(S), y ∈ K(T ), and let (s, t) ∈ K(S × T ) be arbitrary. Because of minimality of x, y, there exist s ′ ∈ S, t ′ ∈ T such that s·s ′ ·x = x The additional claim about products of more than two semigroups follows by a simple induction.
Proposition 1.81. Let T ⊆ S be compact left-topological semigroups, and suppose that Proof. The inclusion K(T ) ⊆ T ∩ K(S) follows from the simple observation that T ∩ K(S) ⊂ T is a two sided ideal. It remains to prove the inverse inclusion.
Let x ∈ T ∩ K(S). We will show that x ∈ K(T ). By Lemma 1.66, the (principal) ideal T x contains a minimal ideal, which is of the form T e for some idempotent e. Because x ∈ K(S), the ideal Sx is minimal, so in particular from e ∈ T e ⊆ T x ⊆ Sx it follows that Sx = Se, and hence there exist s ∈ S such that x = se. It now remains to notice that xe = see = se = x, and hence x ∈ T e. Consequently, x ∈ T e ⊂ K(T ), as desired.
In the case when S is commutative, the theory is especially well-behaved. Although the most important compact semigroups for us are the highly non-commutative ones like Ult (N), it is interesting in its own right to investigate the behaviour of K(S) in a commutative setting.
Proposition 1.82. Suppose that S is a commutative compact left-topological semigroup. Then K(S) is compact. Moreover, there exists a unique idempotent e ∈ K(S), and K(S) is a group with e as the identity.
Proof. Because S is commutative, the notions of a two-sided ideal and left ideal coincide.
Hence, K(S) is a minimal left ideal, and hence it is compact. Because K(S) is a compact semigroup, there exists an idempotent e ∈ K(G). If f ∈ K(G) was another idempotent, then we would have e = xf and f = ye for some x, y ∈ S. Hence, it would follow that: with yx = e. Moreover, we have eyx = ee = e and ey ∈ K(G), so ey is the inverse of x. Because K(G) was already a semigroup, existance of inverses implies that it is a group.
It is useful to be able to construct compact left-topological sub-semigroups of a given compact left-topological semigroup S. If T 0 ⊂ S is a (non-compact) sub-semigroup, one might be tempted to cojecture that T := cl T 0 is the (smallest possible) compact subsemigroup containing T 0 . Unfortunately, upon closer insection there turns out to be no reason to believe this happens in the general situation. Because the semigroup operation is only continuous in the one argument, one cannot argue that cl T 0 is closed under the semigroup operation by means of continuity. Nevertheless, under the additional assumption of commutativity, cl T 0 turns out to indeed be a sub-semigroup. We begin by some relevant definitions and observations. Proof. It is clear that (x, x ′ ), (y, y ′ ) ∈ S×T commute if and only if x, y commute and x ′ , y ′ commute. The claim follows directly by fixing (x, x ′ ) and taking (y, y ′ ) arbitrary.
Observation 1.85. If X is a commutative semigroup, then X ⊂ Z(Ult (X)). If X = (N, ·) or X = (N, +), then it can be shown that Z(Ult (X)) = X, but we don't prove this result.
We are now ready to give a condition for the closure of a sub-semigroup to be a (compact) subsemigroup.
Proposition 1.86. Suppose that S is a compact left-topological semigroup, and T 0 ⊂ Z(S) is a sub-semigroup contained in the centre of S, and let T := cl T 0 denote the closure of T 0 . Then, T is a (compact) sub-semigroup of S. Moreover, if I 0 ⊂ T 0 is a (by necessity, two-sided) ideal and I := cl I, then I is a two sided ideal in T .
Proof. Let p, q ∈ T . We need to check that p · q ∈ T . Because of continuity, we have Using continuity again, we can write q · x = lim y→q y · x. Again, taking this limit we may restrict to y ∈ T 0 . Because T 0 is a semigroup, we have y · x ∈ T 0 . Passing to the limit, we conclude that q · x ∈ T . Passing to the limit again, we finally find p · q ∈ T , as desired.
For the additional part, note that if either p ∈ I or q ∈ I, then we might restrict to x ∈ I 0 or y ∈ I 0 . In either case, we would have x · y ∈ I 0 , and after limit transitions we conclude that p · q ∈ I. Hence, I is an ideal (in T ).
The above results can be generalised somewhat, using the notion of topological centre.
As previously, we begin with the necessary definition. Next, we make some simple observations.
Definition 1.87. If S is a left-topological semigroup, then by Z top (S) we denote the topological centre of S, which is defined as the set of those q ∈ S for which the right multiplication by q, i.e. the map S ∋ q → p · q ∈ S, is continuous.
Proof. The claim follows immediately from characterisation of continuity on product spaces.
Proof. It suffices to notice that for the elements of the centre, left multiplication and right multiplication coincite, and left multiplication is continuous by assumption.
Observation 1.90. If X is a discrete semigroup, then X ⊂ Z top (Ult (X)).
Proof. This follows directly from how semigroup structure is defined of Ult (X).
The following is refinement of Proposition 1.86, with centre replaced by topological centre.
Proposition 1.91. Suppose that S is a compact left-topological semigroup, and T 0 ⊂ Z top (S) is a sub-semigroup contained in the centre of S, and let T := cl T 0 denote the closure of T 0 . Then, T is a (compact) sub-semigroup of S. Moreover, if I 0 ⊂ T 0 is a (by necessity, two-sided) ideal and I := cl I, then I is a two sided ideal in T .
Proof. Essentially the same as in Proposition 1.86.

Finitely additive measures
Yet another way to look at ultrafilters is as a special kind of measures. More precisely, we show that there is a natural way to identify an ultrafilter U ∈ Ult (X) with a {0, 1}-valued finitely additive measure on X. Note that this is a rather specific kind of a probabilistic measure, where each set is assigned measure either 0 or 1; we take the apportunity to cite an amusing way of putting this, found at the n-Category Café: If probability indicates your degree of belief, an ultrafilter is a probability measure for fundamentalists.
This approach leads to new intuitions, and allows us to borrow some new language from measure theory.
We begin by defining a measure corresponding to an ultrafilter, and vice versa. Afterward, we prove that this correspondence is bijective.
Definition 1.92. Let U be an ultrafilter. Then we define the associated finitely additive, {0, 1}-valued measure µ on X by the formula: Conversely, if µ is a finitely additive, {0, 1}-valued measure on X then we define the associated ultrafilter U by the formula: Proposition 1.93. The above definition gives a bijective correspondence between ultrafilters and finitely additive, {0, 1}-valued measures.
Proof. Let U be an ultrafilter, and µ the associated measure. We need first to verify that µ is indeed what we declared it to be. It is immediate from the definition that it Since U is closed under finite intersections, it cannot be the case that µ(A) = µ(B) = 1. Similarly, let µ be a finitely additive, {0, 1}-valued measure, and U be the additional ultrafilter. Again, we need to verify that U is really an ultrafilter. We have µ(X) = 0 and µ(∅) = 0, so X ∈ U and ∅ ∈ U , so property (i ) holds. If A ⊂ B and A ∈ U , then However, this follows directly from what has It remains to show that the described relations are mutually inverse. Thus, suppose that U is an ultrafilter, µ is the associated measure, and V is the ultrafilter associated to the measure µ. We then have: and thus U = V. In the same spirit, if µ is a finitely additive, {0, 1}-valued measure, U is the associated ultrafilter, and ν is the measure associated to U , then and since the measures take only two values, µ = ν and we are done.
It is fairly easy to describe the correspondence explicitly in the one concrete example of an ultrafilter we have.
Example 1.94. If F x is the principal ultrafilter associated to a point x ∈ X then the associated measure µ is the point measure δ x centered at x.
Remark 1.95. The generalised limit can be thought of as the natural generalisation of the integral. Because there does not seem to be a standard way of defining the integral for finitely additive measures, we don't make a rigorous statement out of this observation.
Instead, we note that if U ∈ Ult (X) is an ultrafilter with associated measure µ, and f : X →R is a function with U -lim x f (x) = α, then for any ε > 0, for µ-almost all x we have α − ε < f (x) < α + ε, and we encourage the reader work out the details.
Similarly, extending the group operation to the ultrafilters can be though of as a generalisation of convolution of measures. Again, we leave the details to the reader.
Thinking of ultrafilters in terms of measures suggests that it makes sense to speak of statements being true U -almost everywhere, where we identify the ultrafilter U with the corresponding measure. For completeness' sake, we define a statement (involving the variable x) to be true U -almost everywhere (abbreviated U -a.e.) with respect to x if and only if the set of those x for which the statement is true is U -big, or belongs to U ; alternatively, we may say that the statement is true for U -almost all x (abbreviated This is a well behaved notion, and has the additional useful property that either a statement is true U -a.e. or it's negation is true is true U -a.e. Conjunction of finitely many statements that are true U -a.a. is again true U -a.a., but this rule does not hold for countable conjunction (as is the case in ordinary measure theory) since U corresponds to merely a finitely additive measure (as opposed to countably additive one). A more subtle caveat is that this type of quantification is sensitive to ordering: For a statement φ in x and y, one could first make the statement that for U -a.a. y, φ is true, and then say that this statement holds true for U -a.a. x. This is a useful statement, however it is not equivalent to the similar statement has reversed order of quantification. As an extreme example, one may say that for U -a.a. n, for U -a.a. m it holds that m > n, but of course it is not true when quantification is interchanged. This issue can be traced back to the failure of Fubini's theorem's analogue for finitely additive measures.
In this chapter study the interplay between ultrafilters and combinatorics. On one hand, application of ultrafilters allows us to prove interesting statements about combinatorial objects, such as arithmetic progressions or sets of finite sums, especially the ones related to partitions. Most of the results derived here were first proved by more classical means, but ultrafilter approach tends to produce proofs that are more succinct and to be more amenable to generalisations.
As a warm-up, we prove the Ramsey theorems for graphs and hypergraphs. Our goal there is not so much derivation of the result, which is classical and not too difficult, but showing how ultrafilters can be applied in combinatorics, and how they produce significantly shorter and more elegant proofs. In the subsequent sections, we investigate some notions of largeness and their relation to ultrafilters. We begin with IP-sets, which are fairly natural from the combinatorial viewpoint, and are connected to idempotent ultrafilters. These can be used to derive Hindman theorem. Secondly, we treat C-sets, which are more special than IP-sets and are easiest to define with help of ultrafilters. As an elegant application of C-sets, we prove van der Waerden's theorem and Hales-Jewett theorem.
Perhaps the most important motivation behind our present inquiry is that it provides a connection between ultrafilters and notions of largeness which are of independent interest.
The most important results we prove in Chapter 3 assert that a given set of "return times" belongs to an ultrafilter, assuming that some additional conditions are satisfied.
Given that ultrafilers are not a part of "mainstream" mathematics, these results are not immediately appealing in the basic form. However, statements including IP-sets and C-sets are much more easily understood.
Most of the results presented in this chapter can be found in [HS12]. The proof of Ramsey's theorem is inspired by [Gal]. Extremely accessible treatment of many of the topics discussed here can be found in [Hin05] and [CHS05]. A good discussion of Hindman's Theorem for general semigroup can be found in [GT13]. For the original ultrafilter proof of van der Waerden, see [BFHK89]. For a discussion of partition theorems like Hales-Jewett, see [BBH94].

Ramsey theorem
We begin by discussing simple applications of ultrafilters to Ramsey theory for graphs.
These applications are basic insofar as they only use existence of a single ultrafilter, with no reference to any algebraic or topological properties. Intuitively speaking, for these applications ultrafilters may be seen as a limit objects attached to an infinite number of restrictions to subsequences. Indeed, the classical proofs of the discussed results follow by repeated transitions to subsequences.
To formulate the theorems, we introduce some notation. The reader familiar with graph theory will find the following definition standard. A subset U ⊂ V is said to be monochromatic if and only if there is a colour γ such that Note that a colouring of a graph is essentially the same as finite partition of the set of egdes. The difference is purely notational: we find it more convenient to speak of monochromatic sets than of sets whose edges which lie entirely in a one cell of a given partition.
We are now able to formulate and prove the classical Ramsey theorem for graphs. It is a fundamental result which lies at the very basis of Ramsey theory. c(u) = c} denote the set of those u whose typical edge colour c(u) takes the typical value c. Also, let A(u) := {v ∈ V : c(u, v) = c(u)} denote for each u the set of the endpoints v of edges (u, v) whose colour c(u, v) takes the typical value c(u). Note that A ∈ U and for any u also A(u) ∈ U .
We will now construct by induction a sequance of vertices (v n ) n∈N so that c(v i , v j ) = c for i < j. For n = 0, we take v 0 to be any element of A. For n = 1, we take v 1 to be Thus, all edges between v n indeed have the colour c, as claimed.
The above theorem speaks of infinite graphs. We can formulate a finitary version of the above theorem, replacing infinite graphs by arbitrary large finite graphs. Arguably, the finite version of the theorem is more concrete. Proof. Suppose that for some fixed r, M , the claim fails. Let T be the theory of rcoloured graphs (the language contains r binary relations R 1 , R 2 , . . . , R r corresponding to the colouring of the edges, and the axioms are such that each edge has exactly one colour). The statement that the claim fails for the fixed values of r and M means that for any N we can find a model for T which has at least N elements and has no M -element monochromatic subgraph -both conditions easily expressible as first order sentences. From Łoś Theorem it follows that T needs to have a model in which all these sentences are true: this means that the model has to be infinite, and have no M -element monochromatic subgraphs. But this contradicts the infinitary version of the theorem, since the infinite model needs to have an infinite monochromatic subgraph, let alone M -element.
Remark 2.4. The finitary version of Ramsey theorem can also be deduced by a more classical compactness argument. In this argument, we start with a countably infinite vertex set V = (v i ) i∈N , and use the failure of the finitary version to construct for each N an r-colouring of V N = (v i ) i∈ [N ] with no monochromatic subgraph of size M . The difficulty lies in combining the many finite colourings into one. This can be done by multiple passing to subsequences, using compactness of [r] V , or using ultrafilter limits.
We can repeat very simialar considerations for hypergraphs, which are a natural generalisation of graphs. We begin by giving the relevant definitions.
The full k-hypergraph with vertex set V is the one with the maximal possible set of edges: An r-colouring of the k-hypergraph G is an arbitrary map c : . If e ∈ E is an edge and c(e) = γ, we say that e has colour γ. If u 1 , u 2 , . . . , u k ∈ V , we write c(u 1 , u 2 , . . . , u k ) rather than c({u 1 , u 2 , . . . , u k }) for the colour of the edge {u 1 , u 2 , . . . , u k }; this way c can be identified with a symmetric function on a subset of V k .
A subset U ⊂ V is said to be monochromatic if and only if U there is a colour γ such that c(e) = γ for all edges e ∈ U k .
The follwing theorem is the obvious generalisation of Theorem 2.2 to hypergraphs. The proof is almost a verbatim copy of the the proof for graphs. Proof. Let U be a non-principal ultrafilter on the set of vertices V .
We begin by extending the colouring c to all subsets of V with cardinality not greater than k by the following inductive procedure; thus extended c will describe the colour that is typical for a given subset of vertices. For k-element subsets, the map c V k → [r] is already given. Suppose that for some l < k, the map c : V l+1 → [r] has been defined. Then, for an l-element set distinct verices f = {u 1 , u 2 , . . . , u l }, the colour c(f ∪ {v}) is defined for all v ∈ f , so in particular for U -a.a. v. It therefore makes sense to define the typical colour for f as: c(f ) := U -lim v c(f ∪{v}). We additionally define the set A(f ) ∈ U to be the set where the typical colour for f is realised: This finishes the inductive step. In particular, we have defined c(∅), which we will denote simply by c.
We will now construct by induction a sequance of vertices (v n ) n∈N so that for all f ⊂ {v i } i∈N with #f ≤ k we have c(f ) = c. This will finish the proof, because the condition implies that in particular for edges e ⊂ {v i } i∈N we have c(e) = c, and therefore {v i } i∈N is monochromatic. Suppose that for some n ≥ 0, the vertices v 0 , v 1 , . . . , v n−1 have already been constructed so that for f ⊂ {v i } i∈ [n] with #f ≤ k we have c(f ) = c (we allow n = 0, where no previous vertices are constructed). Let us define Since all the sets A(f ) in the intersection are U -big, also B is U -big, and in particular non-empty. We claim that for any choice of v n in B, the required conditions will hold for v n . We need to check that for any If v n ∈ f ′ , this is satisfied by the inductive assumption, so we may assume that Thus, we have c(f ′ ) = c, as claimed. This finishes the inductive step, and thus the proof.
Just as before, we can make the theorem more concrete by referring to finite objects. We again prefer model-theoretic methods of deriving the finitary version, but a more classical solution is to use compactness arguments. Proof. Suppose that for some fixed r, M , the claim fails. Let T be the theory of r-coloured k-hypergraphs (the language contains r relations R 1 , R 2 , . . . , R r with k arguments corresponding to the colouring of edges, and the axioms are such that each edge has exactly one colour). The statement that the claim fails for the fixed values of r, M means that for any N we can find a model for T which has at least N elements and has no M -element monochromatic subgraph -both conditions easily expressible as first order sentences.

IP-sets and idempotent ultrafilters
In this section we introduce and study an important notion of combinatorial largeness: IP-sets and IP * -sets. These make sense in an arbitrary commutative semigroup , but as usual the most interesting example is provided by the natural numbers. In fact, one can even work with non-commutative semigroups and obtain similar results, but we restrict to the commutative case. On one hand these concepts are fairly natural, and tied closely to even more natural syndeticity. On the other hand, they bear a close relation to ultrafilters. This makes them a convenient bridge between ultrafilters and concrete mathematics. Our main result in this section is the ultrafilter proof Hindman's theorem. The presented proof is due to Galvin and Glazer, and is commonly considered to be one of the most elegant results in combinatorial number theory. The first known proof is due to Hindman [Hin74] and uses only elementary tools -at the price of being rather lengthy and complicated. We follow the treatment by Hindman-Strauss [HS12] and Bergelson [Ber10].
Throughout this section, X stands for a commutative discrete semigroup. As usual, we begin with some definitions. Definition 2.8 (Finite sums and products). Let x = (x n ) n∈N be a sequence of elements of a commutative semigroup X. If X is written multiplicatively, i.e. X = (X, ·), then we define the family of finite products of x to be: Likewise, if X = (X, +) is written additively, then we define the family of finite sums of x to be: Remark 2.10. In the setting of an arbitrary commutative semigroup, the difference between FS(·) and FP(·) is purely notational. In practice, these notions are normally applied in the context where both + and · have fixed conventional meanings, such as in

N.
Some authors require IP-sets to be precisely of the form FS(x) (respectively FP(x)) for some sequence x. However, following the rationalisation of Bergelson et al. [], we require a weaker condition of inclusion, since begin an IP-set should be a notion of "largeness", and thus should be preserved under taking supersets. On a more practical note, it makes the characterisation which we will prove shortly more elegant.
Example 2.11. Consider X = N, and take x n := 10 n . Then FS(x) consists precisely of the positive integers whose digits are only 0's and 1's.
We never assume that x n have to be distinct, nor that their sums need to be distinct. If e ∈ X is idempotent, then taking x n := e shows that {e} = FS(x) is an IP-set. In this case it also happens that the principal ultrafilter F e is idempotent.
The definition of IP-sets we provided used only elementary properties of X, without ever mentioning ultrafilters. The purpose of the following two lemmas is to establish a connectio between IP-sets and idempotent ultrafilters. First, we show how algebraic structure of an ultrafilter implies combinatorial richness of its members.
Proof. We will inductively construct a sequence (x i ) i∈N for which FS(x) ∈ A. In n-th step, the initial fragment (x i ) i∈[n] is assumed to be given, and we construct x n . At each step of the construction, we require that two conditions should be satisfied. Firstly, for any ∅ = I ⊂ [n], we require that i∈I x i ∈ A. Secondly, let A n := Suppose that for some n ∈ N, the initial fragment (x i ) i∈[n] has already been constructed so that the requirements are satisfied. We allow n = 0, which corresponds to no elements being constructed, and the requirement that A 0 = A ∈ U . We wish to construct x n . By the inductive assumption A n ∈ U . Since U + U = U , we can equivalently express this condition by saying that the set B := {x ∈ X : A n − x ∈ U } belongs to U . Since U is closed under intersections, we also have A n ∩ B ∈ U . In particular, A n ∩ B = ∅, so we may select x n ∈ A n ∩ B. We claim that any such x n satisfies the requirements.
Note that by definition we have A n+1 = (A n − x n ) ∩ A n . Thus, A n+1 ∈ U follows from A n − x n ∈ U and A n ∈ U . The first of these conditions follows from x n ∈ B, and the definition of B, while the second is the inductive assumption.
Similarly, note that any index set ∅ = I ⊂ [n + 1] is either contained in [n], or can be . We need to show that i∈I x i ∈ A. In the case I ⊂ [n], this follows form the inductive assumption, so suppose that I = {x n } ∪ I ′ with . Then the requirement can be equivalently expressed as: x n ∈ A − i∈I ′ x i . This follows immediately from x n ∈ A n . Remark 2.13. Note that the above proof really shows more than is stated in the theorem formulation. Namely, at each step, we choose x n as an arbitrary element of a given set which is U -large. This means, that we can make additional requirements of x n .
Most importantly, if X = N we can require that x n be arbitrarily large (with respect to As the next step, we prove a statement converse to the above Lemma 2.12: we show that given combinatorially rich set, one can find an algebraically interesting ultrafilter to which it belongs. Lemma 2.14. If (X, +) is a commutative semigroup, and A ∈ P(X) is an IP-set, then there exists an idempotent ultrafilter U ∈ Ult (X) such that A ∈ U .
Moreover, if x = (x n ) n∈N is a sequence and σ denotes the left shift on X N (so that Proof. By taking x with FS(x) ⊂ A, we see that it will suffice to prove the second part of the statement.
Let us define A n := FS(σ n x), and take Γ := n∈N A n . Since for all n we have A n ⊇ A n+1 and consequently A n ⊇ A n+1 , the set Γ is the intersection of a descending family of nonempty compact sets, and hence is a non-empty and compact.
We shall prove that Γ is also a sub-semigroup of Ult (X). We need to check for that for U , V ∈ Γ we have U + V ∈ Γ. It will suffice to show that for any n ∈ N, we have U + V ∈ A n , or equivalently A n ∈ U + V. By definition of U + V, this is equivalent to: We claim that if y ∈ A n , then A n − y ∈ V. Indeed, any such y can be expressed as y = i∈I x i with min I ≥ n. If we set m := max I + 1, then arbitrary element of A m is of the form z = j∈J x j where min J > max I. In particular, I ∩ J = ∅ and From the above claim it follows that: B ⊃ A n . Since A n ∈ U , we thus have B ∈ U , which finishes the proof that Γ is a sub-semigroup.
We have shown that Γ is a compact sub-semigroup of Ult (X). By Corollary 1.71, Γ contains an idempotent. By construction, this idempotent contains all sets A n .
Finally, we combine the two Lemmas and reach ultrafilter characterisation of ultrafilters.
Corollary 2.15 (Characterisation of IP-sets via ultrafilters). For a set A ∈ P(X), the following conditions are equivalent: 1. The set A is an IP-set.

There exists an idempotent ultrafilter
The characterisation in the above corollary justifies the resolution of IP to "idempotent", as in "sets which are members of idempotent ultrafilters". To see how one can justify the resolution involving parallelopiped, recall that the n-dimensional parallelopipeds are the figures given (up to a translation) by the formula: where x 1 , x 2 , . . . , x n ∈ R n are some linearly independent vectors and Conv denotes the convex hull. The author prefers to connect IP-sets with idempotence, but acknowledges that opinions on this issue may differ.
It is possible to refine the above characterisation slightly, to include a wider class of ultrafilters.
Observation 2.16. Let E denote the set of all idempotent ultrafilters on X. For a set A ∈ P(X), the following conditions are equivalent: 1. The set A is an IP-set.

There exists an ultrafilter
Moreover, if U is an ultrafilter such that for any A ∈ U is an IP-set, then U ∈ cl E.
Proof. If A is an IP-set, then we already know by 2.15 that there exists U ∈ E such that A ∈ U . In the other direction, the condition that A ∈ U for some U ∈ cl E is equivalent to A ∩ cl E = ∅. By the definition of the closure, this means that A ∩ E = ∅, which in turn is equivalent to A being an IP-set by 2.15.
For the additional part, suppose U is such that A ∈ U implies that A is IP. It follows that that any base neighbourhood of U of the form A has non-trivial intersection with E. Hence, U ∈ cl E, as claimed.
Having established the above characterisation, we are able to derive partition regularity of IP-sets. Definition 2.17 (Partition regularity). Let A ⊂ P(X) be a family of sets. Then A is said to be partition regular if and only for any A ∈ A and any finit partition A = Corollary 2.18 (Partition regularity of IP sets). If A ∈ P(X) is an IP-set, and A = A 1 ∪ A 2 ∪ · · · ∪ A k is a finite partition of A, then A i is an IP-set for some i. Equivalently, the family of IP-sets is partition regular.
Proof. Since A is an IP-set, by Lemma 2.14, it belongs to some idempotent ultrafilter U .
By the ultrafilter property (iv ), U contains A i for some i. By Lemma 2.12, A i contains an IP-set.
We now formulate the celebrated Hindman's theorem, in the many versions in which it appears. We strip the formulation from the fancy terminology to make sure we avoid trivial IP sets. Additionally, since this is an end result, we prefer to keep it as transparent as possible. Proof. This follows immediately from Corollary 2.18.
Another semigroup which is useful in applications consists in the finite subsets of N, P fin (N), with the union of sets as the semigroup operation. For this special case, because the operation is the union, we use the notation FU(α) for the finite unions of the sequence of finite sets (α n ) n∈N . Note that this semigroup is badly non-cancellative -in fact, each α ∈ P fin (N) is idempotent. This makes the notion of IP-sets, as we defined it, essentially useless, since each non-empty subset of P fin (N) is IP. Interesting structure in FU(α) only emerges when additional conditions are imposed on α n .
Theorem 2.20 (Hindman; finite sets version). Suppose that P fin (N) = A 1 ∪ A 2 ∪ · · · ∪ A k is a finite partition of the family of finite sets of natural numbers. Then, there exists a sequence of finite sets α = (α n ) n∈N with α n < α n+1 , an index i with FU(α) ⊂ A i .
Proof. We first notice that there exists an idempotent ultrafilter U ∈ Ult (P fin (N)) such that for any A ∈ U , for any β ∈ P fin (N), we can find α ∈ A with β < α. Let γ n := {n} Applying the construction from Lemma 2.14, we find that there exists an idempotent ultrafilter U such that for any m we have FU(σ m γ) ∈ U , were (σ m γ) n = γ n+m = {n+m}.
We show that this choice of U works. Let A ∈ U be arbitrary, and let β ∈ P fin (N) with m := max β +1. Consider the set A ′ := FU(σ m γ)∩A ∈ U . Clearly, if α ∈ A ′ is arbitrary, then min α ≥ m, so α > β. It follows that U satisfies the required properties.
Let P fin (N) = A 1 ∪A 2 ∪· · ·∪A k be a partition, and let U be the ultrafilter just constructed.
We can find i with A i ∈ U . Revisiting the proof of Lemma 2.12 and the subsequent Remark, we find that one can construct a sequence α = (α n ) n∈N such that FU(α) ⊂ A i , and additionally α n < α n+1 for all n.
Remark 2.21. We have derived the Hindman theorem for a general commutative semigroup, and seen several special cases. One might suspect that the general case of the theorem should be significantly more difficult than the cases of particular semigroups.
Somewhat surprisingly, this turns out not to be the case. In fact, it is possible to derive from Hindman's Theorem for finite sets 2.20 the partition regularity of IP-sets as in Corollary 2.18, which lies at the foundation of our subsequent applications. We refer to [Ber10] for details. However, operating with general semigroups does not increase the complexity of the reasoning significantly, so we have no reason to work specifically with P fin (N).
In case X = N, we have two natural structures of a semigroup: additive and multiplicative. Hence, if N = A 1 ∪ A 2 ∪ · · · ∪ is a finite partition, then we can find i such that A i is additively IP, and j such that A j is multiplicatively IP. It is natural to ask if one can find i such that A i is both additively and multiplicatively IP. The answer turns out to be positive, as shown in [Ber10].
is a finite partition of the set of natural numbers. Then, there exist increasing sequences of integers x = (x n ) n∈N , Proof. Let E denote the set of all additively idempotent ultrafilters on N. We claim that cl E is a left multiplicative ideal. Clearly, E is non-empty. Because the multiplication is continuous in the left argument, it will suffice to check that cl E is closed under multiplication by N. Let us consider U ∈ cl E, and n ∈ N; we need to show that n · U ∈ cl E. Thanks to characterisation in 2.16, it will suffice to show that if B ∈ n · U then B is an additive IP-set. Let A := n\B; we know that A ∈ U so A contains a set FS(x). Hence, B is an additive IP-set, because it contains the set FS(nx) (operation taken coordinate-wise).
Because cl E is a closed left multiplicative ideal, it is clearly also a compact multiplicative sub-semigroup. Hence, by theorem 1.69, cl E contains a multiplicative idempotent V. Let i be such that A i ∈ V. Because V ∈ cl E, we know from 2.16 that A i is an additive IP-set. Because V is multiplicatively idempotent, from 2.15 it follows that A i is a multiplicative IP-set. Finally, we notice that V is clearly not principal, so the sequences x and y from the theorem formulation can be assumed to be increasing.
We finish this section by introducing the notion of IP * -sets. We will not yet make much use of it in this chapter, but in dynamical applications this concept will be crucial. We begin by giving a defining the operation A → A * in more generality than really needed. Definition 2.23. Let A ⊂ P(X) be a family of sets. Then A * is defined to be the family of all B ∈ P(X) such that for any A ∈ A we have A ∩ B = ∅. In particular, B ∈ P(X) is an IP * -set if and only if for any IP-set A we have A ∩ B = ∅.
We make some simple observations about the operation we just defined. Apart from developing some intuition, we aim at an application to an ultrafilter characterisation of 2. Let I be a set, A i ⊂ P(X) for i ∈ I. Then we have i∈I A i * = i∈I A * i .
3. If A ⊂ P(X) is partition regular and X ∈ A, then A * ⊂ A and A * is closed under finite intersections. If F ∈ Filt (X), then F ⊂ F * . If U ∈ Ult (X), then U * = U . Proof.
1. Follows directly from the definition, since universal quntification over B leads to a stronger condition than universal quantification over A.

For
which is what was to be shown.

If
Likewise, if A ∈ F, then for B ∈ F we have A ∩ B ∈ F so in particular A ∩ B = ∅.
Thus, A ∈ F * , and consequently F ⊂ F * . Finally, because ultrafilters are partition regular filters, we have by the previous assertion U * ⊂ U ⊂ U * , so indeed U = U * .
The practical consequence of the above Proposition is that we can charaterise IP * -sets in terms of ultrafilters, just as we did for IP-sets. Note that in particular a finite intersection of IP * -sets is again an IP * -sets, and intersection of an IP-set with and IP * -set is again an IP-set.
Corollary 2.25 (Characterisation of IP * -sets via ultrafilters). For a set A ∈ P(X), the following conditions are equivalent: 1. The set A is IP * .
2. For any idempotent ultrafilter U ∈ Ult (X) it holds that A ∈ U .
Proof. Let {U i } i∈I be the set of all idempotent ultrafilters on U . Then Corollary 2.15 implies that the family of all IP-sets is i∈I U . Using the above Proposition 2.24, it follows that the family of all IP-sets is: The above characterisation follows immediately.
To finish this section, we give a simple example of IP * -sets.
Proposition 2.26. Suppose that X is a commutative group, and that Y ⊂ X is a subgroup of finite index: #X/Y < ∞. Then Y is an IP * -set.
Proof. It suffices to show that for any idempotent ultrafilter U ∈ Ult (X) we have Y ∈ U .
Let us fix such U . Because r := #X/Y < ∞, we can partition X into finitely many Because for any such

C-sets and minimal idempotent ultrafilters
Another important notion of largeness is provided by C-sets (also known as central sets 2 ) and C * -sets. Much like the IP-sets are related to idempotent ultrafilters, the central sets are related to minimal ultrafilters. We are again able to derive a strong combinatorial result by consideration of ultrafilters: this time these are van der Waerden's theorem and Hales-Jewitt theorem. As in the previous section, X denotes a discrete (not necessarily commutative) semigroup throughout this section. However, we will often need to specialise to concrete semigroups.
The following definition of C-sets is obviously inspired by the ultrafilter characterisation of IP-sets.
Definition 2.27. Let A ∈ P(X) be a set. Then A is a C-set if and only if there exists a minimal idempotent 3 ultrafilter U ∈ Ult (X) such that A ∈ U .
Observation 2.28. Let A ∈ P(X) be a set. Then A is a C * -set if and only if for any a minimal idempotent ultrafilter U ∈ Ult (X) we have A ∈ U .
It is unfortunate that C-sets do not allow such a natural definition in terms of the basic semigroup structure as IP-sets do. However, there does exist an equivalent definition in terms of dynamical systems, at least in the most important case X = (N, +). The dynamical definition of centrality is due to Furstenberg in [Fur81], and was introduced a long time before the connection to ultrafilters was discovered.
The following result is in no way easy. We cite it (without a proof) as an additional motivation behind the study of C-sets.
Theorem 2.29. Let A ⊂ N. Then, the following conditions are equivalent: 1. The set A is C-set in the sense of Definition 2.27 2. There exists a (topological) dynamical system (X, T ), uniformly recurrent point y ∈ X, point x ∈ X proximal to y and open neighbourhood U ∋ y such that A has the form: Proof. See [Ber03].
The above theorem can be generalised to characterise C-sets in arbitrary semigroups by dynamical properties. However, we will not use them much in our applications.
Armed in the arithmetic preliminaries from Chapter 1, we are able to prove the following theorem about arithmetic progressions in central sets with remarkably little work.
This result is similar in the spirit to Lemma 2.12: algebraic properties of an ultrafilter imply combinatorial richness of a set. To make notation more succinct, we begin with a definition.
Definition 2.30. Let A ∈ P(N) be a set. We say that A is AP r if and only if A contains an arithmetic progression of length r, i.e. a configuration {a, a + b, . . . , a + (r − 1)b} for some a ∈ N and b ∈ N. Moreover, A is said to be AP if it is AP r for all r, i.e. it contains arbitrarily long arithmetic progressions.
Theorem 2.31. Let V ∈ Ult (N) be a minimal idempotent, and suppose that A ∈ V.
Then, A is AP-set, i.e. for any r ∈ N 0 , the set A contains an arithmetic progression of length r.
Proof. Consider the semigroup S := i∈[r] βN, and the sets: Note that with these definitions, existence of an arithmetic progression a, a + b, . . . , a + (r − 1)b in a set B ∈ P(N) is equivalent to existence of a vector (a + ib) i∈[r] ∈ B ×n ∩ I 0 .
The same argument shows that if B ∈ P(N) is non-empty, then B ×n contains a common element with E 0 , namely any constant sequence.
It is clear that E 0 is a semigroup, and that I 0 ⊂ E 0 is an ideal. What is more, Z(S) = i∈[r] Z(Ult (N)) = i∈[r] N, so clearly E 0 ⊂ Z(S). It follows by Proposition 1.86 that E := cl E is a semigroup and I := cl I 0 is an ideal in E. I is an ideal, by the definition of K we have: Ult (N))).
Let us now consider the minimal idempotent V, and set A ∈ V. Then A ×r is a neighbourhood of δ(V) in S. The above considerations show that δ(V) ∈ I. Hence A ×r ∩ I 0 = ∅, which is, as we noted above, equivalent to existence of an arithmetic progression of length r in A.
The reason why the above theorem is important is that it allows us to prove the classical van der Waerden theorem.
Theorem 2.32 (van der Waerden). Suppose N = A 1 ∪ A 2 ∪ · · · ∪ A k is a finite partition of the natural numbers. Then, for some i, the set A i is AP, i.e. contains arbitrarily long arithmetic progressions.
Proof. Let V be an arbitrary minimal idempotent ultrafilter. There exists i such that It follows from the above theorem that A i is AP.
It comes as no surprise that the above theorem also has a finite version. The derivation of this finite version is standard and can be done in many ways, so we omit the proof.
Theorem 2.33 (van der Waerden, finite version). Let length r and number k be fixed.
Then there exists N ∈ N such that for any partition pieces, there exists i such that the set A i is AP r , i.e. contains an arithmetic progression of length r.
Proof. Left as an exercise to the reader.
Using the finite version of the van der Waerden Theorem, we can derive the following elegant corollary.
Corollary 2.34. The family of subset of N which are AP is partition regular.
Proof. Suppose that A is AP, and that A = A 1 ∪ A 2 ∪ · · · ∪ A k is a partition. We will show for any r that one of A i is AP r . It will follow immediately that one of A i is AP r for arbitrarily large r, and hence also AP.
Let r be fixed. Let N be such that whenever [N ] is partitioned into k parts, one of the parts is AP r . Because A is AP, it contains an arithmetic progression of length N , say P = {a + tb} N −1 t=0 . Let P i := P ∩ A i . Because scaling and shifts do not alter the propery of being an arithemetic progression, it follows than that one of P i is AP r . Thus, also A i is AP r , which finishes the proof.
Remark 2.35. We note that, unlike in the case of IP-sets in Lemma 2.14, Theorem 2.31 does not admit a converse: it is not at all true that if A is an AP-set then A ∈ U for some minimal idempotent U . For example, the set 2N + 1 contains an infinite arithmetic progression, but is not even IP. One can notice that 2N + 1 is in fact a translate of 2N (which is even IP * ). With a little more work, it is possible to find sets with AP but not being translates of IP-sets.
A theorem closely related to van der Waerden theorem is attributed to Hales and Jewett.
While van der Waerden theorem concerned the commutative semigroup (N, +), Hales-Jewett speaks of a highly non-commutative situation of words over a finite alphabet. To begin with, we make some definitions.
Definition 2.36. Let Σ be a set, referred to from now on as "the alphabet". The free semigroup F (Σ) generated by Σ is the set of all non-empty sequences w : [n] → σ, n ∈ N 1 , together with the operation of concatenation 4 (w, w ′ ) → ww ′ . If w(v) is a variable word, then for a ∈ Σ, w(a) is the word in F (Σ) obtained from w(v) by substitution of a for the variable: A combinatorial line is the analogue of an arithmetic progression. It is obtained from a variable word in the same way an arithmetic progression is obtained from an affine function. Proof. Consider the semigroup S := i∈[r] Ult (F (Σ)), and the sets: Note that with these definitions, existence of a combinatorial line {w(c)} c∈Σ in a set B ∈ P(F (Σ)) is equivalent to existence of a vector (w(c)) c∈Σ ∈ B ×n ∩ I 0 . The same argument shows that if B ∈ P(F (Σ)) is non-empty, then B ×n contains a common element with E 0 , namely any constant sequence.
It is clear that E 0 is a semigroup, and that I 0 ⊂ E 0 is an ideal. We need to check that the same is true of E and I. We know that, Z top (S) = i∈ Because I is an ideal, by the definition of K we have: (F (Σ)))).
Let us now consider the minimal idempotent V, and set A ∈ V. Then A ×r is a neighbourhood of δ(V) in S. The above considerations show that δ(V) ∈ I. Hence A ×r ∩ I 0 = ∅, which is, as we noted above, equivalent to existence of an arithmetic progression of length r in A.

Chapter 3
Applications in ergodic theory.
In this chapter, we study the applications of ultrafilters to ergodic theory. We will prove that certain sets of "return times" have the combinatorial structure of IP * -sets of C * -sets.
We begin by some general considerations about polynomials. We introduce the notion of discrete derivative, which allows us to characterise the polynomials only in terms of the additive structure. This leads to the notion of polynomial maps between general commutative groups.
Our first application is to polynomial maps on a torus; it can also be construed as a polynomial recurrence result for rotations. By explicit computation of generalised limits, we are able to show IP * -set property of certain interesting sets. These results are meant to foreshadow subsequent applications to general dynamical systems.
Thanks to the characterisation of polynomials in terms of discrete derivatives, we are able to introduce a generalisation of the notion of polynomials, which we refer to as "almost polynomials", for want of a better name. These are very closely related to p-VIP-systems, and extend the so-called "generalised polynomials". Adapting proofs for standard polynomials, we obtain very similar recurrence results.
Finally, we turn to applications to general dynamical systems. We re-derive and strengthen Khintchine's theorem: instead of a statement about a given set of returns being merely syndetic, we show the IP * property. We then derive some results similar to those of Schnell, except we deal with minimal idempotents rather than general ones.
We make extensive use of papers by Bergelson, McCutcheon and Knutson, like [BM10], [BHKM06] and [Ber96]. The paper by Schnell [Sch07], re-deriving results by Bergelson, Furstenberg and McCutcheon, is also very relevant to our inquiry. The surveys by Bergelson [Ber10] and [Ber03] were also very helpful.

Polynomials and discrete derivative
In this section we will study the properties of polynomial maps. Given that polynomial maps are among the simplest maps one can imagine, interest in them hardly needs justification. We will take a rather different approach that is common in algebra. For our purposes, a polynomial map will first and foremost be a particularly regular map, and the algebraic aspects will play a secondary role. To begin with, we define polynomials in the simplest possible situation. . We shall shortly see that the assumption that the coefficients of f lie in Q is not restrictive, in the sense that the definition would not change if we allowed more general coefficients, for instance in C.
One of our objectives is to extend the notion of a polynomial to maps between a commutative semigroup and a commutative group. 1 Hence, we need to understand what characterises polynomials in terms of the additive structure. The reader will recall that polynomial in R or C are characterised by the vanishing of sufficiently high derivatives.
To make use of this insight in the discrete setup, the notion of the discrete derivative will be useful. Occasionally, we also refer to ∆ a f as the finite difference 2 .
If R is a domain (commutative ring with unit) of characteristic 0, then polynomials in can be identified with a subset of functions. Because ∆ a f is a polynomial whenever f is a polynomial, we will refer to derivatives of polynomials again as polynomials without further mention. polynomial give rise to the same map, but are clearly distinct as polynomials. In general, definitions similar to the one above make sense for arbitrary commutative rings with unit, but we restrict to characteristic 0 domains for the ease of presentation. In particular, we wish to avoid having to make a distinction between polynomials and polynomial maps.
Before we make use of the introduced notion of the discrete derivative, we point out some of the elementary properties.
Proposition 3.5. Let f, g : X → Y be maps from a semigroup X to a group Y , and let a, b ∈ X. Then, the following properties hold true: Proof. All the equalities follow from direct substitution into the definition. We recall some standard notation related to polynomials. The reader will surely find these standard, but we give a detailed definition to avoid ambiguities. With these conventions, for any f ∈ R[x] we have the decomposition: Much like with the standard derivative, application of the discrete derivative to a polynomial decreases the degree by 1, as shown in the following lemma.  Suppose now that deg f ≥ 1, and the claim holds for all polynomials of degree strictly smaller than deg f . We can write f in the form f (x) = lc f · x deg f + g(x), where deg g < deg f . We then have: By inductive assumption, deg ∆ a g(x) ≤ deg f − 2, and hence the expression in the parenthesis has degree at most deg f − 2. Since deg f · a · lc f = 0, we have It follows that deg ∆ a f = deg f − 1 and lc ∆ a f = deg f · a · lc f , as desired.
The above lemma suggests the following generalisation of the notion of polynomials to maps between commutative (semi)groups.
Definition 3.9 (Polynomials in general groups). Let (X, +) be a commutative semigroup, and let (Y, +) be commutative group, written additively. We define polynomials X → Y inductively, as follows: 1. The unique polynomial of degree −∞ is the zero map x → 0 Y .
2. The polynomials of degree 0 are the non-zero constant maps x → c. is such that f (R) ⊂ R, then the same lemma shows that f is a polynomial in the above sense. We shall now make the correspondence between polynomials in R[x] and polynomial maps R → R more precise. can be represented as a polynomial all of whose coefficients lie in Q. Moreover, any such polynomial is a combination of the polynomials x n := x n n! for n ∈ N with coefficients in R. Here, x n := n−1 k=0 (x − k).

A map
Proof. Let us denote e n (x) := x n . By a direct computation, we check that ∆ 1 e n = e n−1 for n ≥ 1, and ∆ 1 e 0 = 0. Indeed, we have for n ≥ 1: Let us now take a polynomial f as described in the assumptions. We show by induction on deg f that f lies in the R-linear span of e i . The case deg f ≤ 0 is immediate, so let us suppose deg f ≥ 1 and the claim holds for polynomials of lower degrees. By Lemma 3.7, we find that deg ∆ 1 f = deg f − 1, so by the inductive assumptions, we can write ∆ 1 f in the form: where c i ∈ R. Let us consider the polynomial g : . Because of the preliminary observation, we have: Hence, ∆ 1 (f − g) = 0, and Lemma 3.7 ensures that deg(f − g) ≤ 0. In other words, there exists a constant c 0 ∈ K such that f = g + c 0 . Evaluation at 0 yields c 0 = f (0) ∈ R.
Because e 0 = 1, we now have the expression: Hence, f is a combination of e 0 , e 1 , . . . , e deg f with coefficients in R, as claimed.
Corollary 3.11. Let R be a characteristic 0 domain, with field of fractions Q, and let S be a ring containing Q as a subring. If f ∈ S[x] is a polynomial such that f (R) ⊂ R, then f ∈ Q[x], and moreover is a combination of the polynomials x n with coefficients in R.
Note that the above lemma and corollary contain implications only in one direction: there is no guarantee that the map x → x n should preserve the ring R. However, for R = Z we have a full characterisation.
Corollary 3.12. Let K be a characteristic 0 field. Then, the polynomials f ∈ K[x] such that f (Z) ⊂ Z are precisely the combinations of the polynomials x n for n ∈ N, with integer coefficients.
Proof. The above theorem shows that if f ∈ K[x] is such that f (Z) ⊂ Z, then f is a combination of x n for n ∈ N. Conversely, we show that x n ∈ Z for any n ∈ N and x ∈ Z. If x ∈ N, then x n has the combinatorial interpretation of the number of ways to choose n elements out of x elements, and hence surely is an integer. For general x, we note that the statement that x n is an integer is equivalent to the statement that n!|x n , which depends only on the equivalence class of x modulo n!. Hence, it suffices to check that x n for n! consecutive values of x, which we have already done.
Remark 3.13. The assumption of commutativity is essential for our considerations. It is natural to ask if the theory can be extended to a non-commutative setting. There seems to be little hope of developing a theory for general non-commutative (semi)groups. However, Leibman [Lei02] proposed a fairly successful theory of polynomials in general nilpotent groups. We do not go into more details on this matter, because for our applications the commutative context is more than sufficient.
We will now introduce the symmetric discrete derivative. Although the standard discrete derivative is more natural, the following variation will be more useful for our purposes.
We take time to develop some algebraic properties before we move on to applications in the consecutive sections.
Definition 3.14 (Symmetric finite derivative). For a function f : X → Y from a semigroup (X, +) to a group (Y, +), we define for a ∈ X the symmetric discrete derivative Moreover, we define the k-fold symmetric discrete derivative: If R is a characteristic 0 domain and f ∈ R[x], then ∆ a f ∈ R[x] for any a, so we reserve the right to refer to ∆ a f as a polynomial in this situation. Moreover, it is true that Observation 3.15. The symmetric discrete derivatives commute: The following observation justifies the used terminology and motivates the above definition.
Observation 3.16. The k-fold symmetric discrete derivative ∆ k f : X k → Y is symmetric (i.e. invariant under the permutation of arguments).
Proof. Because the operators ∆ x i commute, the value of ∆ k f (x 0 , x 1 , . . . , x k ) is invariant under the permutation of x 1 , x 2 , . . . , x k . From the definition of ∆ it also follows that for any a, b ∈ X and g : X → X we have ∆ a g(b) = ∆ b g(a). Applying this rule to under swapping of x 0 and x 1 . Since any permutation can be expressed as a composition of permutations already considered, the claim follows.
It is possible to derive an explicit formula for the k-fold finite difference. Having an explicit formula is often useful; in particular, it can be used to re-derive some of the previous two observations immediately.
Proposition 3.17 (Explicit finite difference). The symmetric finite difference is given by the formula: Proof. We prove the claim by induction on k. If k = 0, then the claim clearly holds.
Suppose we want to prove the claim for k, while we know it holds for k − 1. We can explicitly transform: This formula is the one we were aiming for, which finishes the proof of the inductive claim.
Having derived an explicit formula for k-fold symmetric finite difference, our next step is to find a relation to the standard (non-symmetric) finite difference. This is established in the following lemma.
Lemma 3.18. If X is a commutative monoid with neutral element 0 X , and f : X → Y is a map to a commutative group Y , then the following relation holds: Proof. For k = 0, 1, the formula can be verified directly. For k ≥ 2, we proceed by induction. Using the claim for 1 and for k − 1, we conclude that: This finishes the inductive proof.
Remark 3.19. The assumption of X being a monoid is not restrictive. If X is merely a commutative semigroup, one can make X into a monoid by artificially adding a neutral element 0 X . One can then extend f by assigning any value to f (0 X ).
i. In particular, it has degree at most deg f − k in any variable x i , and has the constant term equal to 0. Moreover, it holds true that Proof. From Bezout's theorem, it follows that in general that for g ∈ R[x], ∆ y g(x) = g(x + y) − g(x) is divisible by y, as polynomials. From the above lemma, it follows that Since the total degree of this polynomial is at most deg f , the degree in any of the k + 1 variables cannot exceed deg f − k. The last assertion is an immediate consequence of taking k = deg f .
for k ≥ deg f .

Polynomial maps to the torus
Having deepened our understanding of polynomials, we now turn to a simple example of an explicit computation of a generalised limit. We begin with a general case, and then proceed to draw some surprising conclusions. Hence, the above computation leads to: This is equivalent to λ = f (0), which was our claim.
We can make the above result more concrete by applying it to a particular choice of spaces and explicitly describing polynomial maps. Our choice is to investigate polynomials Z → T, but similar considerations are possible for other choices; in particular we can derive multi-dimensional analogues by considering polynomials Z k → T l .
Corollary 3.23. Let p ∈ βZ be a fixed idempotent ultrafilter. For any α ∈ T and polynomial f : Z → Z we have: Moreover, for any α i ∈ T, 1 ≤ i ≤ d, we have: Remark 3.24. The above corollary is a particular property of idempotent ultrafilters as opposed to general ultrafilters. As we will see, limits along arbitrary ultrafilters do not show nearly as much regularity.
A useful consequence of the above results is the following approximation result. It speaks of real valued polynomials, which are a very natural object to study.
Then the set A ε is an IP * -set.
Proof. If π : R → T denotes the standard projection, we have the relation: π(g i )n i . From the above Corollary 3.23, it follows that for any idempotent ultra- π(g i )n i = 0. If follows that the set A ε is p-large for any ε > 0.
Since A ε is p-large, it is an IP * set in view of p being arbitrary.
In all of the above results, we relied on the assumption that the ultrafilter p ∈ βX used for taking limits was an idempotent: p + p = p. It is natural to ask if anything specific can be said about limits along arbitrary ultrafilters. It turns out that for limits these limits can exhibit fairly arbitrary behaviour, as we see shortly.
We will use the following classical equidist results, due mostly to Weyl. Similar results can be proved in more generality. For a derivation of these results, see [EW11a] Theorem 3.26 (Weyl). Let α ∈ R be irrational. Then the sequence nα (mod 1), n ∈ N is equidistributed in T.
More generally, if g : R → R is a polynomial with at least one irrational coefficient except for the constant term, then the sequence g(n) (mod 1), n ∈ N is equidistributed in T.
A generic tool for extending eqidistribution results is the following criterion. In particular, it allows one to generalise results about one dimensional equidistribution into higher dimensioins.
Theorem 3.27 (Weyl equidistribution criterion). Let (α n ) n∈N be a sequence with terms in T d . Then the following conditions are equivalent: 1. The sequence (α n ) n∈N is equidistributed.
2. For any k ∈ Z d one has: Using the above equidistribution results, we are in position to describe make the aforementioned statements about limits along general ultrafilters. The following example can be juxtaposed with Lemma 3.22.
Example 3.28. Let (α i ) i∈[d] ∈ T d be a sequence with at least one irrational entry. By Weyl Theorem 3.26, the sequence φ(n) := d i=1 α i n i is equidistributed in T. In particular, for any fixed γ ∈ T, the sets A ε := {n ∈ Z : d(φ(n), γ) < ε} are nonempty for ε > 0, and hence the family of set A := {A ε : ε > 0} trivially has the finite intersection property. Applying Lemma 1.14, we conclude that A is contained in some ultrafilter p, for which we necessarily have p-lim n φ(n) = γ.
The above result concerns a single polynomial of arbitrary degree. Even more can be said for linear polynomials. It is clear that for a fixed ultrafilter p the map λ p : T ∋ α → p-lim n nα ∈ T is additive, in the sense that λ p (α + β) = λ p (α) + λ p (β), α, β ∈ T. We have shown that for idempotent p, the map λ p is identically 0. Similar statement is true if p = βf (q) for polynomial f : Z → Z with f (0) = 0, which is a consequence of Lemma 3.22. It is natural to ask if any additional restriction can be placed on λ p for arbitrary p. It turns out this is not the case, as the below observation shows.
Proof. Let Γ α := {p ∈ βZ : λ p (α) = φ(α)}. The claim is equivalent to existence of p, such that p ∈ Γ α for all α, hence it will suffice to show that α∈T Γ α = ∅. Because the map p → λ p (α) is continuous for any fixed α, the sets Γ α are closed. Thus, because βZ is compact, it will be enough to show that the finite intersections of the form α∈A Γ α , with A ⊂ T and A -finite, are non-empty.
LetÃ ⊂ [0, 1) ⊂ R denote the set corresponding to A under the natural identification 3 of T and [0, 1). Consider the Q-linear space V := lin Q Ã ∪ {1} . LetÃ 0 ⊂ R be a basis of V , so that 1 ∈Ã 0 and any element ofÃ is a Q-linear combination of elements ofÃ 0 .
Finally, let us writeÃ 1 =B ∪ {1/N }, and let B ⊂ T be the projection ofB. At is clear that Γ 1/N ∩ α∈B Γ α ⊂ α∈A Γ α , so it will suffice the former set is non-empty. Because Hence, there exists a sequence (m t ) t∈N such that lim t→∞ (N m t +k)β j = φ(β j ) for allj ∈ J.
It follows that any ultrafilter p for which {N m t + k : t ∈ N} is p-large, belongs to Γ 1/N ∩ α∈B Γ α . Since such ultrafilters clearly exists, this finishes the proof.
The above lemma shows that the class of the maps α → p-lim n nα for p ∈ βZ is rather rich: Any map T → T which satisfies the necessary condition of being additive can be represented in this form for some p.
A natural question arises as to the richness of the class of additive maps T → T. The obvious examples are "multiplication" maps α → kα for some fixed k ∈ Z. It is difficult to think of a different example, and there is a good reason for this. We state the following proposition without the proof, which can be obtained by the suitable adaptation of the classical reasoning for Cauchy functional equation.
Proposition 3.30. Let φ : T → T be an additive map. Then, the following conditions are equivalent: 1. The map φ is Lebesgue measurable.
2. The map φ is continuous.
3. The map φ is of the form φ(α) = kα for some k ∈ Z.
Of course, the condition 3 implies 1. The implication from 2 to 3 is relatively straightforward, and can be deduced from the similar fact for additive maps R → R. The implication from 1 to 2 is an example of a more widely discussed phenomenon known as automatic continuity. Much research into this area was done by Frechét, Sierpiński and Steinhaus, and more recently by Weil, as is well discussed for example by Rosendal in at α = 1 2 we see that this naive hope is not realised. However, a slightly weaker statement is true, as shown in the following result. Proof. Define Γ i := {p ∈ βZ : p-lim n f (n)α i = β i }. It is clear that Γ i are closed, and that the claim will follow once we prove that i∈I Γ i = ∅. Because βZ is compact, it will suffice to show that the finite intersections i∈I 0 Γ i (I 0 ⊂ I, finite) are non-empty.
Once again, Theorem 3.26 ensures that (f (n)α i ) i∈I 0 ∈ T I 0 is equidistributed, hence dense. It follows that there exists a sequence (n t ) t∈N such that lim t→∞ f (n t )α i = β i and consequently there exists an ultrafilter p with p-lim t f (n t )α i = β i for i ∈ I 0 . This ultrafilter p lies in i∈I 0 Γ i , which finishes the proof. Given a a non-constant polynomial map f , and an addive map φ : T → T, and a set C ⊂ T such that 1 does not lie in Q-linear span 5 of C, we can find an ultrafilter p such that p-lim Somewhat regrettably, we cannot take C = T in the above statement.
To close this section, we use the results obtained so far to obtain somre results about the group structure and cardinality of βN, foreshadowing the latter developements. We begin by re-deriving the formula for the cardinality of βN is a short way, and show that the idempotent ultrafilters constitute a very small part of βN in certain sense.
Example 3.33. Let A = {α i } i∈I ⊂ T be such that 1 ∪ A is Q-linearly independent, and #A = c. We can consider the map from Φ : βN → T I , given by p → p-lim n α ι n i∈I , which can easily be verified to be a morhphism of compact commutative semigroups.
Let us consider the image of Φ, Φ(βN). Proposition 3.31 asserts that for any choice of β i ∈ T, i ∈ I there exists p ∈ βN such that p-lim n α i n = β i . It follows that for this choice of p we have Φ(p) = (β i ) i∈I . Since β i were chosen arbitrarily, we conclude that Φ is surjective: Φ(βN) = T I . In particular, we see that #βN ≥ #T I = c c = 2 c . Because the reverse inequality is obvious, we have #βN = 2 c . By Lemma 3.22, it holds for any idempotent p ∈ βN and integer polynomial f with f (0) = 0 that: On the other hand, let us consider Γ := {p ∈ βN : Φ(p) = 0}. Because the map Φ is continuous, Γ is compact. Because Φ is a semigroup homomorphism and {0} is a semigroup, Γ is a semigroup. Moreover, Γ contains the idempotent ultrafilters, and even ultrafilters of the form βf (p) for f -polynomial with 0 → 0. (We will see that the function f in the last statement can be chosen from an even richer family.) In particular, Γ contains the smallest compact semigroup that contains the idempotents.
We will call a subset of T ⊂ βN a generalised translate of Γ if it is equal to Γ, or if it consists of a single ultrafilter p ∈ βN, or if it is of the form T 1 + T 2 where T 1 , T 2 are generalised translates of Γ constructed earlier. Hence, we are considering sets like Γ + p, p + Γ, p + Γ + q, p + Γ + q + Γ, and so on. It is easily shown by structural induction that if T is a generalised translate of Γ, then the image Φ(T ) consists of a signle element.
It follows by a short argument that βN cannot be covered by less than 2 c generalised translates of Γ. hope to generalise is Polynomial SzemerédiTheorem (see for example [BL96]), which itself is a generalisation of the classical SzemerédiTheorem for arithmetic progressions. It is fairly natural to search for a generalisation of the notion of a polynomial which preserves some of the regularity used in the proofs of these results.

Almost polynomials
In this section, we introduce the notion of "almost polynomials" to formalise the idea that a function shows similar behaviour to a polynomial with respect to taking finite differences, but relativised with respect to a chosen ultrafilter p. An almost polynomial is essentially synonymous with p-VIP system (modulo a constant term and possibly the generality of definition), but we prefer to use a name that has an intuitive content.
Additionally, we take a different point of departure, and only later will it become apparent that our definition is closely related to the classical one. We begin by building some general theory, which will mostly be applied to maps Z → Z.
The following definition is inspired by Definition 3.9.
Definition 3.34 (Almost polynomials). Let (X, +) be a commutative semigroup, and let (Y, +) be commutative group, and let p ∈ βX be an ultrafilter. We define the family of p-almost polynomials X → Y inductively, as follows: p-almost all a ∈ X, the map ∆ a f is an almost polynomial of degree at most d − 1.
We denote the collection of all p-almost polynomials by A p (X, Y ). If f ∈ A p (X, Y ), then deg p f denotes the degree of f as p-almost polynomial. If f ∈ A p , then we define Convention 3.35. Throughout this section, X = (X, +) will stand for a commutative semigroup, (Y, +) will stand for a commutative group, and p ∈ βX will stand for an ultrafilter on X, unless specified otherwise. We abbreviate the notation A p (X, Y ) to A p or even A when no confusion is possible. Likewise, we omit p in deg p f and similar expressions.
We have seen that the constant term plays an essential role for properties of ordinary polynomials. The following definition gives the right generalisation of the constant term for the almost polynomials. Definition 3.36. For a map f : X → Y , ultrafilter p ∈ βX, and integer d ∈ N we define: with the understanding that the topology of Y is discrete, and if the limit does not exist in Y , then C p d (f ) remains undefined. If p is understood from the context, we skip the upper index and write simply C d (f ).
We now prove several results which show why C d (f ) is an interesting object. Proof. The first part of the statement follows from the observation that: which is the same as the definition of C d (f ), up to renaming variables and using the symmetry of ∆ d f . Because Y is given the discrete topology, we for p-a.a. it holds that −C d−1 (∆ a f ) = C d (f ), assuming either limit exists.
For the second part of the statement, we use induction. The case d = 0 is clear, so let us suppose d ≥ 1. Then, for p-a.a. a ∈ X, the statement that deg p f ≤ d is equivalent Lemma 3.38. If f ∈ A and deg f ≤ d, and p ∈ βX is idempotent, then C d (f ) = Proof. We will show that for d ≥ deg f it holds that C d+1 (f ) = C d (f ). Once this is shown, the rest of the claim follows by simple induction.
We begin by writing out the formula for C d+1 (f ). It will be convenient to distinguish two of the variables by giving them different names. Note that we may shuffle the variables at the first step because of the symmetry of ∆ d+1 f .
Note that in the first of the three resulting summands, a and b occur only in the expression a + b, so using the idempotence of p, this can be condensed to: The remaining two limits are equal to C d (f ), because the limits over non-occurring variables can be cancelled. The claim follows: Remark 3.39. Note that the proof relies on the idempotence of p already for deg f = 0.
Indeed, we have: which is not the same as C p 0 (f ) in general, unless p + p = p. For a concrete example, take X = N, Y = Z and f (n) = n · χ 2N (n) (that is f (2m) = 2m and f (2m + 1) = 0), and let p be such that p ∈ 2N + 1. Then, f = 0 p-a.e., so deg f = −∞ and C p 0 (f ) = 0. However, because (p + p) ∈ 2N, we have f (n) = n for (p + p)-a.a. n. Hence f is definitely not constant almost everywhere with respect to p + p, and C p 1 (f ) = −C p+p 0 (f ) remains undefined.
Convention 3.40. From this point on we assume that p is idempotent, except when explicitly mentioned otherwise.
The above lemma shows that C d (f ) does not depend on d, provided that d is large enough for C d (f ) to be defined. Hence, we shorten the notation to C(f ) when d is immaterial.
Polynomials which map 0 to 0 exhibit particularly nice properties with respect to recurrence. The following is the analogue for almost polynomials.  Proof. This is a direct consequence of how ∆ a acts on constants, and linearity of C. Note that for i ∈ I, the expression whose limit we are taking is independent of m i , and thus the operation of taking p-lim m i is just the identity, and may thus be dropped.
Using the symmetry, we may assume that I = {0, 1, . . . , r} for some r, which reduces the problem to showing that: Using the idempotence of p, we see that this is equivalent to: q-lim n (f (n) − g(n)) = 0, or, more naturally, f = g q-a.e., where q = p + p + · · · + p, where r copies are in place.
Thanks to the fact that p is idempotent, we have q = p, so we arrive at the assumption.
Hence, the claim holds.
Remark 3.45. If it was not the case that p is idempotent, we would need a much stronger condition, of f and f ′ being equal p-a.e., (p + p)-a.e., and generally (p + p + · · · + p)a.e. for any number of repetitions of p. It should be taken as a strong hint that in our considerations, the assumption of idempotence cannot be weakened. and Proof. Let d := max{deg f, deg f ′ }. It is clear from the previous considerations that: Hence, the claim follows.
Observation 3.47. Suppose that f ∈ A(X, Y ) is an almost polynomial and g ∈ Hom(Y, Z) is a morphism of commutative groups. Then g • f ∈ A(X, Z) is again an almost polyno- Proof. It is clear that for d := deg f we have: Hence, the claim follows.
Proof. We begin by considering a few special cases. In the case when deg f = −∞ or , and hence f · f ′ ∈ A(X, Z) and deg f · f ′ = −∞.
In the case when deg f = 0, there exists a constant c ∈ Y such that f = c for p-a.e.. It follows that f · f ′ = c · f ′ p-a.e.. Because the map y ′ → c · y ′ is a morphism, the claim follows from the above observation. The same reasoning applies when deg f ′ = 0.
For the general case, we use induction on the degrees (deg f, deg f ′ ). Proving the theorem for f, f ′ , we may assume that the claim holds for g, g ′ with deg g +deg g ′ < deg f +deg f ′ .
Because of the above considerations, we may assume that deg f > 0 and deg f ′ > 0.
To show that f · f ′ ∈ A(X, Z), it will suffice to check that ∆ a (f · f ′ ) ∈ A for p-a.a. values of a. Directly by writing out the formulas, one can verify that: From the inductive Definition 3.34, it follows that for p-a.a. values of a we have the expected bounds for degrees: This means that the inductive assumption can be applied to each of the three products in equation (3.4). It follows that f · f ′ ∈ A(X, Z). More precisely, we have: which proves one part of the claim.
For the final part of the claim, we again use equation (3.4) and the inductive assumption.
Note that we have: and likewise C(∆ a f ′ + f ′ ) = 0. This identity, together with the inductive assumption, allow us to perform the following computation: Corollary 3.49. Suppose that (Y, +, ·) is a ring. If f, f ′ ∈ A 0 and g ∈ A, then f + f ′ ∈ A 0 and f · g ∈ A 0 . In other words, A 0 constitutes an ideal in A.

Proof. By previous results we have
To finish our considerations on almost polynomials, we cite a fundamental structure theorem for such maps. The following result is taken from [BM10], and needs to be modified slightly to fit our treatment. We denote by P d (S) the family of non-empty subsets of S with cardinality at most d.
Theorem 3.50. Let X be a commutative semigroup and Y -a commutative group, let p ∈ βX be idempotent, let f : X → Y be a map, and fix d ∈ N. Then, the following conditions are equivalent: 1. The map f is an almost polynomial with degree at most d: f ∈ A p 0 (X, Y ) and deg p f ≤ d.
2. There exists a map u : P d (X) → Y and a constant c ∈ Y such that the following formula is satisfied for any r ∈ N: . This allows us to compute the limit p-lim using the explicit formula from Lemma 3.17. Once we prove that the above limit exists, it will follow from previous considerations that f ∈ A p 0 with deg p f ≤ d, and the value of the limit equals (−1) d C p (f ). For brevity of notation, let u(∅) := c.
We can compute that: The restriction I = ∅ in the above sum is awkward, but we can dispose of it by artificially adding the term (−1) d+1 c to both sides. After that, we can easily change the order of summation, leading to: For a fixed α the inner sum over I can be computed explicitly. If we allow I(α) := {i : x i ∈ α} then the sum can be rewritten as: If we denote m := d+1−#I(α) and group the terms in the above sum with respect to j := #J, we see that: Note that we rely on m > 0, which is a consequence of #α ≤ d. Hence, the previously considered limit trivialises: This leads to the desired formula, finishing the proof of this implication: The above result can lead to shorter proofs of some of our claims, most notably Lemma 3.48. We choose a different perspective, relying more on induction than explicit structure theorems. The function u in the above theorem is sometimes referred to as the generating function for f . One of the consequences of the implication we proved is a practical way of verifying that a given function f is an almost polynomial: it suffices to find the corresponding generating function u and check the relation in 2. A word of warning is due at this point: it is not the case that for an arbitrary choice of the function u : P d (X) → Y one can find a corresponding almost polynomial f ∈ A 0 (X, Y ).

Integer almost polynomials
We now turn to applications of the previously introduced theory to maps Z → Z. Similar results can be obtained for multivariate polynomials Z k → Z l , but we sacrifice some of the generality for the sake of simplicity.
Our goal is to generalise previous results about integer-valued polynomials. We would like, in particular, to allow for non-rational coefficients. Since multiplication on the torus by a non-integer is not well defined, we need to incorporate a notion of the integral part.
It seems to be the most morally justified to use the "closest integer" function, rather that the "floor" function, since the former is better behaved, as shall be seen in the considerations below.
Definition 3.51. For x ∈ R by x we denote the closest integer to x, given by x := x + 1 2 . By x we denote the "fractional part": The following result is the aforementioned generalisation of Lemma 3.22 to the context of generalised polynomials. Hence, the above computation leads to: Thus, λ = αC(f ), as claimed.
Corollary 3.53. For any scalars α i ∈ R, and any almost polynomials f i of degree d i , where i = 1, 2, . . . , N , consider the function g : Z → R given by the formula: Then, we have: Proof. From the previous theorem, we know that both p-lim n g(n) and N i=1 α i C(f i ) represent the same element of T, and lie in (− 1 2 , 1 2 ). Hence, they are equal.
The above Proposition 3.52 describes behaviour of limits of almost polynomials. However, it does not give any description of A other than the somewhat indirect one in Definition 3.34. We shall now give an operation that can be used to obtain almost polynomials that are not ordinary polynomials.
Lemma 3.54. For arbitrary scalars α i ∈ R, and functions f i ∈ A, where i = 1, 2, . . . , N , consider the function g : Z → R given by the formula: Then, g ∈ A and deg g ≤ max i d i . What is more, if additionally we assume that Proof. Let us denote d := max i deg f i ; we will apply induction with respect to d. The i it holds that f i = C(f i ) p-a.e., and hence: Thus, g is constant p-a.e., and so is g . It follows that g ∈ A and deg g = 0.
For the inductive step with d ≥ 1, let us note that: a. m (provided that deg f i ≥ 1) the inductive assumption can be applied to conclude that ∆ m g ∈ A and deg ∆ m g ≤ d − 1. Moreover, because for any m it holds (pointwise) that ∆ m g < 3 2 , we conclude that ∆ m g ∈ {−1, 0, 1}, and consequently ∆ m g ∈ A with deg ∆ m g ≤ 0. Therefore, we have for p-a.a. m: Hence g ∈ A and deg g = deg ∆ m g + 1 ≤ d.
Let us now suppose that the additional assumption holds, so that we have Thanks to the above Corollary 3.53, we have p-lim n g(n) = γ. We can then compute: Because |γ| < 1 2 , the closest integer map · is continuous at γ, and thus: Hence, for p-a.a. m we have ∆ m g ∈ A 0 . (Let us remark that this part of the proof works under a weaker assumption N i=1 For the other term, we notice that for p-a.a. m it holds that C(∆ m f i ) = −C(f i ), and hence the the additional assumption also implies that ∆ m g ∈ A 0 . Therefore: Corollary 3.55. For any constants α i ∈ R with i = 0, 1, . . . , N , the function f : Z → Z given by: is an almost polynomial. Moreover, f is an admissible almost polynomial, provided that Corollary 3.56.
1. The class of almost polynomial is closed under taking sums, products, and the operation f → αf + β for α, β ∈ R.
2. The class of admissible almost polynomial is closed under sums, multiplication by an almost polynomial, and the operation f → αf + β for α, β ∈ R with |β| < 1 2 .
3. Any function constructed by applying these operations, starting with ordinary polynomials, is an (admissible) almost polynomial regardless of the choice of the idempotent ultrafilter p. In particular, if f : Z → Z is thus constructed admissible almost polynomial and α ∈ R is a constant, then the set is IP * for all ε > 0.
Remark 3.57. In the above results, it was essential that if f is admissible then so is αf + β for α, β ∈ R, provided that |β| < 1 2 . It is natural to inquire what happens in the case of more general values of β. If β = b + β 0 , with |β 0 | < 1 2 and b ∈ Z, then αf + β = αf + β 0 + b, so although αf + β is not admissible, it can be made admissible by subtracting a constant. This essentially reduces the question to β = 1 2 , or equivalently to considering the almost polynomial ⌊αf ⌋. It is clear from above considerations that, for a fixed idempotent p, either ⌊αf ⌋ is admissible, or ⌊αf ⌋ + 1 is admissible. It is, however, not the case that one of those functions is admissible for any idempotent p. This is an obstacle to sets of recurrence or good approximation being IP * .
Example 3.58. Let α ∈ R be irrational. Then there exist two idempotent ultrafilters p and q, such that n → ⌊αn⌋ = αn − 1 2 is admissible with respect to p, and n → ⌈αn⌉ = αn + 1 In particular, for any constants β ∈ R \ Z, c ∈ {0, 1}, and ε > 0, the set of n ∈ Z such that β (⌊αn⌋ + c) is ε-close to an integer: Proof. The key observation is that αn approaches 0 along idempotent ultrafilters, and the limit value can be approached either from above or from below.
More precisely, note that since α is irrational, a standard result shows that the sequence { αn } n∈N is equidistributed in T. For a sequence (ε i ) i∈N with ε i > 0 and i ε i < 1 2 , we may choose n i ∈ N such that αn i ∈ (0, ε i ). For n ∈ FS (n i ) i∈N we then have αn ∈ (0, i ε i ) ⊂ 0, 1 2 . By Lemma 2.12, there exists an idempotent p such that FS (n i ) i∈N ∈ p, and in particular αn ∈ 0, 1 2 for p-a.a. n. It follows that αn − 1 2 = αn for p-a.a. n, and hence the function n → αn − 1 2 is admissible with respect to p.
Likewise, repeating the construction, but choosing ε i < 0 with i ε i > − 1 2 , we arrive at an idempotent q such that αn + 1 2 = αn for q-a.a. n. Hence, the function n → αn + 1 2 is admissible with respect to q.
The claim about either of the functions αn ± 1 2 being admissible is a direct consequence of the observation that for any n either αn − 1 2 = αn or αn + 1 2 = αn .
Another question that naturally comes to mind is whether the recurrence properties that have been considered so far are a special feature of (almost) polynomials, or if there is a wider class of functions for which analogous results hold. We will show that for a function increasing more slowly than linear, there always exists an idempotent p such that the limit p-lim n αf (n) is in general non-zero. We extract the following technical lemma before we proceed with the proof.
Lemma 3.59. Let ε i and m i be sequences such that 2ε i Proof. Let B k := i≤k A i . We claim that B k contains an interval of length 2ε k m k . For k = 0, this is clear. Suppose for some k the claim holds. Then, B k+1 = B k ∩ A k+1 . From the form A k+1 has, it is immediate that T can be partitioned into m k+1 intervals I 1 , I 2 , . . . , I m k of length 1 m k+1 such that J s := A k+1 ∩ I s is an interval of length 2ε k+1 m k+1 . By inductive assumption, B k contains an interval of length at least 2ε k m k > 3 m k+1 . This means that there exists s such that B k ⊃ I s ⊃ J s , and the claim follows.
Because B k is a descending family of compact non-empty sets, i∈N A i = k∈N B k = ∅. Proposition 3.60. Let f : N → R be such that lim n→∞ f (n) = ∞. Suppose additionally that lim n→∞ f (n) − f (n + 1) = 0; for example f (n) = o(n) and f is increasing.
Then, there exists an idempotent p such for any γ ∈ T there exists α ∈ T such that p-lim n α f (n) = γ. Moreover, α can be chosen in any interval of positive measure.
Proof. Let us fix a sequence ε i with lim i→∞ ε i = 0. Because of the assumption on f , it is easy to construct an increasing sequence of integers n i such that f is constant on [n i , n i + n i−1 + · · · + n 1 ]. What is more, n i can also be chosen to be increasing steeply enough so that the assumptions of the Lemma above are satisfied for m i := f (n i ) .

Under this assumption, it is clear that
, as in the lemma above, and let Hence, for any p such that FS (n i ) i∈N ∈ p, we have p-lim n αf (n) = γ.
We conjecture that similar results should be true for f with any order of growth which is polynomially bounded, but different than polynomial. More precisely, if f : N → R is an increasing function such that for some integer k we have 7 f = ω(n k ) and f = o(n k+1 ), we believe that there exist α ∈ T an idempotent p ∈ βN such that p-lim n α f (n) = 0 (possibly under some additional assumption, such as f being restriction to N of a function which is analytic, or belongs to a Hardy field).
To close this section, we compare our considerations with more well-established notions, and offer some examples. The class of (admissible) almost polynomials is, as the perspicacious reader might have already observed, closely related to the more classical notions of (admissible) generalised polynomials. Definition 3.61 (Generalised polynomials). The family of generalised polynomials is the smallest family G of maps Z → Z such that the following are satisfied: • generalised polynomials extend ordinary polynomials: Z[x] ⊂ G; • generalised polynomials form an algebra: if g, h ∈ G then g · h, g + h ∈ G; • generalised polynomials are closed under the floor map: if (g i ) i∈[n] ∈ G n and (α i ) i∈[n] ∈ R then ⌊ i∈[n] α i g i ⌋ ∈ G. 7 We say that a function f has order of growth ω(g) if limn→ ∞ f (n) g(n) = ∞. Likewise, we say that f has order of growth o(g) if limn→ ∞ f (n) g(n) = 0. These definitions are normally only applied to positive and monotonous g. Assuming thatt f and g are positive and monotonous, the conditions f = ω(g) and g = o(f ) are equivalent. Definition 3.62 (Admissible generalised polynomials). The family of admissible generalised polynomials is the smallest family G a ⊂ G of maps Z → Z such that the following are satisfied: • polynomials vanishing at 0 are admissible: xZ[x] ⊂ G a ; • admissible generalised polynomials form an ideal in G: if g ∈ G a , h ∈ G then g · h ∈ G a , and if g, h ∈ G a then g + h ∈ G a ; • generalised polynomials are closed under a "shifted" floor map: if ε ∈ (0, 1), Thanks to Lemma 3.48, it is visible that generalised polynomials are almost polynomials, and admissible generalised polynomials are admissible almost polynomials. Hence, our results naturally yield results in the more classical terms.
One might wonder whether the classes we define here are really more general. It turns out that they indeed are, as the following examples show. We stress that the following ideas are strongly inspired by IP-systems, and more generally VIP-systems, whose domain is the the family of finite sets of natural numbers, P fin (N). More detailed discussion of such examples can be found in [BHKM06].
Example 3.63 (Base change). Consider the map f : N → N defined by the condition that for α ∈ P fin (N 0 ) we have: Note that the above definition makes sense, because each integer has a unique binary expansion. Descriptively, f (n) is the value one obtains by writing n base 2, and then reinterpreting this as an expansion base 3. For n ∈ N, let α(n) denote the unique set for which we have n = i∈α(n) 2 i , so that we have the relation: It is easy to see that we have the linear relation: provided that α(n) ∩ α(m) are disjoint. Note that this condition is satisfied as soon as idempotent p: As a consequence, deg p f = 1 for arbitrary idempotent p.
Above, we exploited the uniqueness and existence of the binary expansion. Below we show how the same idea can be applied to more general bases. Additionally, there was nothing special about base 3: we could have selected an arbitrary sequence (b i ) i in place of 3 i i . Because the only allowable digits base 2 are 0 and 1, above we could conveniently identify binary expansion of a number with a set of its non-zero digits; for general bases we need to proceed differently.
Example 3.64. Suppose that we are given a sequence (a i ) i∈N 0 and a sequence (d i ) i∈N 0 , such that each n ∈ N has unique expansion: Concretely, one can take a i := a i and d i := a for some a ≥ 2, leading to the expansion base a. Consider an arbitrary sequence (b n ) n∈N 0 and a define the map f : N → N given by the formula: Assume additionally that the sets A i := {n ∈ N : µ i (n) = 0} are IP * . It is easy to verify that this condition is satisfied if for all i we have a i < a i+1 and a i |a i+1 . Then, for a fixed m and n belonging to the IP * -set i:µ i (m) =0 A i it holds that for any i either µ i (m) = 0 or µ i (n) = 0. Consequently, for such m, n we have µ i (n + m) = µ i (n) + µ i (m) for all i, We can yet another example of class of almost polynomials, which is based on a somewhat more peculiar positional system. While the previous examples are well known, to the best of our knowledge the following example new.
Example 3.65 (Fibonacci base). Let f i be the i-th Fibonacci number (starting with It is a classical fact attributed to Zeckendorf (cf. [Zec72]) that any integer n can be represented in the form: where µ i (n) ∈ {0, 1} and for no i does it hold that µ i (n) = µ i+1 (n) = 1. Such representation is often referred to as Fibonacci base or Zeckendorf expansion, and has been studied in some detail, see for example [HCB73] or [GKP94,.
Suppose that we can show that A i := {n ∈ N : µ i (n) = 0} are IP * . Using the same arguments as previously, we can check that given an idempotent p and a fixed m, for p-many n it holds that µ i (n + m) = µ i (n) + µ i (m) for all i. Consequently, we can derive that any function of the form i µ i · b i is almost polynomial of degree 1.
We now show that the sets A i indeed are IP * . For a proof by contradiction, suppose that B is an IP-set with A k ∩ B = ∅, i.e. such that µ k (n) = 1 for all n ∈ B. Fix a sufficiently large integer j, and for n ∈ N let t(n) denote the "tail" of n, obtained by restricting to the j terminal digits: Let p be an arbitrary idempotent in B. Because t(n) takes only finitely many values, the limit a := p-lim n t(n) exists. Because p is idempotent, we can easily find n, m ∈ B such that t(n) = t(m) = t(n + m) = a. We can write n = n ′ + a, m = m ′ + a, n + m = s ′ + a, where t(n ′ ) = t(m ′ ) = t(s ′ ) = 0. We then have the relation: It is not difficult to convince oneself that µ i (n ′ + m ′ ) = 0 if i < j − 2, so we can write n ′ + m ′ = r ′ + b with t(r ′ ) = 0 and b having at most one non-zero digit at position j − 1 or j − 2. Consequently, we have the relation: Using the relation f i + s−1 t=0 f i+1+2t = f i+2s , we conclude that µ i (s ′ −b) = 0 for i < j −3. On the other hand, µ k (r ′ +a) = 1, which leads to a contradiction, provided that j > k+3.
This finishes our considerations for the Fibonacci base.
We conjecture that similar reasonings should work for more general positional systems.
In particular, some recursively defined sequences other than the Fibonacci sequence can be used to construct other positional systems in analogous manner.
We can go yet a step further and construct a fairly general class of "automatic" functions, which turn out to be degree 1 almost polynomials. We need a preliminary concerning automata. The following definition is taken from [AS03].
Definition 3.66. A deterministic finite automaton with output A (DFAO or automaton, for short) over a finite finite alphabet Σ, consists of the following data: 1. set of states Q, with a distinguished initial state q init ; 2. transition function τ : Q × Σ → Q;

output function
The intuition behind an automaton is the following. The automaton starts in the state q init . A sequence α 0 , α 1 , α 2 , . . . of symbols from Σ is provided on input. The automaton accepts them one by one, and if it accepts a symbol α when it is in state q, then it passes to state q ′ = τ (q, α). After each such transition, the symbol λ(q, α) is produced on output.
Let a, b ∈ N 2 be fixed bases, and for n ∈ N, let n = ∞ i=0 µ i (n)a i be the unique decomposition of n in base a. Suppose that A = (Q, τ, λ) is an automaton over the alphabet Σ = [a]. We can think of A as generating a function f A : N → N in the following way. We begin by indentifying n with a sequence of its digits base a, then we apply A and interpret the result as a number base b. More formally, let us fix n ∈ N with expansion n = ∞ i=0 µ i a i ; we will define f A (n). First, we denote the consecutive steps q 0 := q init and q i+1 := τ (q i , µ i ). Next, we denote the outputs λ i := λ(q i , µ i ); note that λ i depends implicitly on n. Finally, we put: We call a function f : N → Z an automatic function if it is of the form f A for some automaton A.
We leave the following result without proof, which is not difficult, but rather technical.
Proposition 3.67. Let A = (Q, q init , τ, λ) be an automaton, and let f be the corresponding function. Suppose that the map τ (·, a) : Q → Q is bijective for any a ∈ Σ. Then f is an almost polynomial with degree at most 1 with respect to any idempotent p.
As the reader might have noticed, we do not actually prove that the almost polynomials we just presented are not generalised polynomials. Because generalised polynomials are always polynomially bounded while functions constructed above need not be, one can show that not all of these almost polynomials presented are generalised polynomials. We believe that in general none of the above almost polynomials are generalised polynomials, except for some degenerate cases, but we have no way of showing this rigorously.
The examples presented above are somewhat far-fetched: it is not clear that anyone would be interested in thus defined functions in the first place. There turn out to be more natural examples of admissible almost polynomials that are not admissible generalised polynomials. Note that the proof of Lemma 3.48 in fact shows that for a fixed g ∈ G, there are just finitely many values that C p (g) can take, depending on the idempotent p.
It follows that for (g i ) i∈[n] ∈ G and (α i ) i∈[n] ∈ R we have i∈[n] α i g i ∈ A p 0 for all p, provided that |α i | are small enough that for any p we have i∈[n] α i C p (g i ) < 1 2 . For an explicit example, ⌊ ⌊πn⌋ 43 + 1 2e ⌋ lies in A p 0 for any p, but probably not in G a . That being said, for ε ∈ (0, 1), the map ⌊ ⌊πn+ε⌋ 43 + 1 2e ⌋ lies in G a , so the difference does not appear to be very significant.
To close the discussion about almost polynomials, we stress some pitfalls and oddities that one can encounter. In particular, it may well be that deg p f = deg q f and C p (f ) = C q (f ) for p = q.
In fact, given two different idempotents p and q and arbitrary almost polynomials f p ∈ A p , f q ∈ A q , one can construct f ∈ A p ∩ A q such that f (n) = f p (n) for p-a.a. n and f (n) = f q (n) for q-a.a. n. This can be achieved quite simply. Note that there exist a set A which is p-large but not q-large, as well as a set B which is q-large but not p-large.
Taking f := χ A · f + χ B · g we can easily verify that f has the mentioned relation to f p and f q .
Another aspect we wish to stress is that it is not the case that almost polynomials have the order of growth expected of polynomials. Of course, this is not much of a surprise, given that we can modify a member of A p on a p-small set without changing its properties as an almost polynomial. At this point, one might yet be hoping that some notion of order of growth relative to p would work. However, even with naturally defined almost polynomials which can be approximated by ordinary polynomials up to a constant factor, this hope fails. For example, the map given by i µ i a i → i µ i b i from Example 3.64 has degree 1, but has the order of growth 8 Θ n ln b/ ln a , instead of the expected Θ(n). The almost polynomial given by the formula f (n) = αn βn with α, β ∈ R \ Q is clearly 9 O(n) and one can even check that for any idempotent p we have p-lim n f (n) n = 0.
However, explicit computation of ∆f shows that deg p f = 2, so f is far from satisfying the expected approximation Θ(n 2 ).

Dynamical applications
We shall now see how theory developed so far can be applied to measure preserving preserving systems. For this purpose, we will be considering averages of powers of operators on Banach spaces. The link between Banach spaces and dynamical systems uses the Koopman operator given by U T (f ) = f • T . Mostly, we will be interested in the Hilbert spaces L 2 , but for the time as as far as it is possible we use develop our methods in the most general context.
Definition 3.68. Let E be a reflexive Banach space, let (A n ) n∈X ∈ B(E) X an bounded sequence of (continuous linear) operators on E, indexed by a set X, and let p ∈ βX be an arbitrary ultrafilter. By the standard symbol p-lim n A n we denote the generalised limit taken in the weak topology. The limit exists because of reflexivity of E and Banach-Alaoglu theorem.
Since strong convergence implies weak convergence, we do not intorduce additional symbol for the strong limit. When convergence is strong, we will note this explicitly.
We prove some basic properties of limits related to commutativity. In particular, if (A n ) n∈Z is a uniformly bounded sequences of operators on a Hilbert space H, and A n is normal for each n, then the limit p-lim n A n is normal. 8 We say that a function f has the order of growth Θ(g) if there exist constants C1, C2 > 0 such that C1g(n) < f (n) < C2g(n) for sufficiently large n. 9 We say that a function f has the order of growth O(g) if there exist a constant C > 0 such that f (n) < Cg(n) for sufficiently large n. In particular, f is Θ(g) if and only if f is O(g) and g is O(f ).
Proof. Let L := p-lim n A n and M := p-lim n B n . By direct computation, using separate weak continuity of operator multiplication, we check that: Because the adjoint is continuous in the weak topology, the additional claim follows by applying the previous part with E = H and B n = A * n .
We now discuss a very special case of theorems that shall be considered afterwards.
The obtained result is not of much interest on its own, but serves as a motivation for what follows. In applications, we will be mostly interested in the limits of powers of the Koopman operator of a dynamical system.
Proposition 3.70. Let A ∈ B(E) be a power-bounded 10 operator on a reflexive Banach space E, and let p ∈ βN be an idempotent ultrafilter. Then P := p-lim n A n is idepotent: In particular, if A ∈ B(H) is a normal operator on a Hilbert space H with A ≤ 1, then P := p-lim n A n is an orthogonal projection.
Proof. Using idempotence of P , we first transform: Using the fact that operator multiplication is separately continuous in the weak topology, we can transform further: Therefore, P = P 2 , as required.
For the additional part of the claim, note that is A is normal, then so is P , thanks to Lemma 3.69. Hence, P is an orthogonal projection thanks to the well-known criterion.
The following lemma shows how to transform statements like the above into more concrete results about recurrence. We give the most general formulation first, and then apply it to the situation at hand. To begin with, we briefly recall the relevant definitions.
Definition 3.71. A measure preserving system is a quadruple X = (X, M, µ, T ) where X is a compact topological space, M is a σ-algebra on X, µ is a probability measure on M and T : X → X is a measure preserving transformation. The Koopman operator U T ∈ B(L 2 (X, µ)) associated to T is the operator given by U T (f ) = f • T . In general, Lemma 3.72. Let (X, M, µ) be a measure space. Let (T n ) n∈X be a family of measure preserving invertible transformations, and let U n ∈ B(L 2 (X, µ)) be the associated Koopman operators. Suppose that the limit P := p-lim n U n is a projection. Finally, let A ∈ M be such that µ(A) > 0. Then: Proof. Let 1 A denote the characteristic function of A, let 1 X denote the constant function 1. Note that U n 1 X = 1 X , and thus also P 1 X = 1 X . We can now translate the statements about measures of sets into statements about scalar products, in particular µ(A) = 1 A , 1 X and µ(A ∩ T −1 n A) = 1 A , U n 1 A . It follows that: Corollary 3.73 (Khintchine). Let (X, M, µ, T ) be a measure preserving system, let A ∈ M be such that µ(A) > 0, and let p ∈ βZ be an idempotent ultrafilter. Then: In particular, we have: Moreover, for any ε > 0, the set of return times: is p-large, and therefore is an IP * set.
Proof. The first statement is an immediate application of the above preparatory Lemma 3.70. The additional parts of the statement are just equivalent ways of expressing the convergence, and quantifying over all idempotents p.
Our next goal is to give more general theorems describing when the operators of the form p-lim n U f (n) are projections. We will need some preliminary results.
The following decomposition is a classical theorem. It will be important for applications of minimal ultrafilters. A detailed proof and discussion can be found in Eisner's [Eis10].
With the theory on compact semigroups developed in Chapter 1 we could re-derive it without too much work, but it would take us too far afield, so we merely cite it instead.
Theorem 3.74 (Jacobs-Glicksberg-de Leeuw decomposition). Let E be a reflexive Banach space, and let A ∈ B(E) be an operator with A ≤ 1. Then, E decomposes into the direct sum E r ⊕ E s , where: The minimal idempotent Q in the semigroup generated by A is the orthogonal projection onto E r .
The above decomposition allows us to consider the operator limits of powers of A on the two spaces E r and E s independently. The situation of E r is especially simple, as the following observation shows.
Observation 3.75. Let p ∈ βZ, and f ∈ A p 0 (Z, Z) be such that f > 0 p-a.e.. Let E be a reflexive Banach space, let A ∈ B(E) be an operator with A ≤ 1, and let E = E r ⊕ E s be the Jacobs-Glicksberg-de Leeuw decomposition of E with respect to A. Then the limit P := p-lim n A f (n) , restricted to E r , is the identity operator I Er .
Proof. We first note that for f ∈ E such that Af = γf with |γ| = 1, we have P f = f . This is true because A f (n) x = γ f (n) x, and by assumption on f and Lemma 3.52 we have p-lim n γ f (n) = 1. Because such f span E r , it follows that P | Er = I Er .
It follows form the above observation that the situation on E r is clear in the most generality we can hope for. On E s we only have the simple result provived by Proposition 3.70. This is as much as we are able to say for general (reflexive) Banach spaces.
To make further progress we need to restrict to Hilbert spaces, which allows us to use the version of van der Corput Lemma for generalised limits. This lemma is of vital importance for many inductive arguments.
Lemma 3.76 (van der Corput, [Sch07]). Let H be a Hilbert space, let (X, +) be a semigroup, and let (x n ) n∈X ∈ H X be a bounded family indexed by elements of X, and let p ∈ βX be an idempotent ultrafilter. Suppose additionally that p-lim m p-lim n x n+m , x n = 0. Then it also holds true that p-lim n x n = 0.
Proof. Let us denote y := p-lim n x n . As an immediate application of idempotence of p, we notice that for any positive interger s we have can also express y as: y = p-lim n 1 ,...,ns x n 1 +···+ns .
It allows us to simplify the above expression: Because N was chosen arbitrarily and p-lim n x n 2 is a constant independent of N , it follows that y has to be equal to 0. Thus, y = 0, as desired.
With this tool we are able to obtain a general result on limits along minimal idempotents.
Under some additional assumptions, we are able to identify the limit quite explicitly as the minimal projection. Somewhat surprisingly, the case of degree 1 almost polynonials seems to be the most problematic. The following lemma is somewhat unsatisfactory -in a sense, it formalises an induction procedure, but does not secure the basic step.
To avoid repetition, we introduce the situation which will be common in a number of consecutive results.
Convention 3.77. We let H denote a Hilbert space, p ∈ βZ an ultrafilter, and U a fixed unitary operator on H. Let Q denote the minimal projection generated by U , as in Theorem 3.74. Finally, let the class of maps F p be defined by: Proposition 3.78. Assume notation as in B:situation:Fp, and suppose that f ∈ A p 0 is such that for p-a.a. a we have ∆ a f ∈ F p . Then f ∈ F p .
Proof. Denote P := p-lim n U f (n) ; our goal is to show that P = Q. It is clear that P is normal, as a limit of normal operators, thanks to Lemma 3.69. What is more, all operators that appear throughout the proof arise as limits of powers of U , and hence by Lemma 3.69 they commute with one another. We will use this fact without further mention.
By Corollary 3.75, we already know that Q| Hr = I Er . Hence, it will suffice to show that Q| Hs = O Hs .
Let us consider a fixed x ∈ H s ; our goal is to show that p-lim n U f (n) x = 0. Using van der Corput Lemma 3.76, it will suffice to show that p-lim This can be established easily enough by algebraic manipulation: The above result shows that once we identify members f ∈ F p with deg p f = 1, we are given a criterion for members of F p with higher degrees. More precisely, it becomes evident that if f ∈ A p 0 and ∆ deg f −1 a 1 ,a 2 ,... f ∈ F p for p-a.a. a 1 , a 2 , . . . , then f ∈ F p . We start with a result in this direction.
Lemma 3.79. With notation as in 3.77, suppose that p is minimal, and let f : Z → Z be the identity map f (n) = n. Then f ∈ F p .
Proof. Consider the semigroup morphism βN → B(H) given by p → p-lim n U n . Let S be the image of βN. It is clearly a semigroup, it is compact, and the semigroup {U n : n ∈ N} is dense in it. It is a consequence of previously shown results that S is commutative. Let K := K(S) be the minimal (two-sided) ideal. A relatively simple arguemnt shows that K = QS and that K is a group with Q as the identity; see [Eis10] for details.
Let I ⊂ βN be the set of those ultrafilters q for which q-lim n U n ∈ K. Because q → q-lim n U n is a morphism of compact semigroups and K is a two-sided ideal, it follows that I is a two-sided ideal. This means that K(βN) ⊂ I.
Let us return to the minimal idempotent p, and denote P := p-lim n U n . Because p is idempotent, we already know that P | Hr = I Hr . Because p ∈ K(βN), the above considerations show that P ∈ QS, so P | Hs = O Hs . Hence, P = Q. Proof. We proceed by induction on k, with the case k = 1 being trivially satisfied.
Let us additionally denote by S(V ) the compact semigroup generated by V . We notice that we have the following decomposition of S(V ): The inclusion V l S(V k ) ⊂ S(V ) is clear. For the reverse inclusion we first note that: where S 0 (V ) denotes the (non-compact) semigroup generated by V , and then take closures of both sides.
From the above observation, it follows that for some 0 ≤ l < k we have Q(V ) ∈ V l S(V k ).
Corollary 3.81. With notation as in 3.77, assume that p is minimal, and let f : Z → Z be the linear map f (n) = kn, k ∈ N. Then f ∈ F p .
Proof. From the above Lemma 3.80, it follows that: Hence, the claim follows.
Proposition 3.82. With notation as in 3.77, assume that p is minimal, and let f : Z → Z be the base-changing map described in Example 3.64, defined for some fixed where |µ i | < a and all µ i have the same sign 11 . Then f ∈ F p , provided that we have: Proof. Let H := k∈N a k Z ⊂ βZ. Note that H is compact, because it is the intersection of compact sets. Moreover, is is a semigroup, because a k Z are all semigroups by Proposition 1.86. If m ∈ Z is fixed then for n divisible by a sufficiently large power of a (dependent on m) we have: It follows that for q ∈ H and arbitrary p we have: Denote Φ(p) := p-lim n U f (n) for p ∈ βZ. The above shows that for q ∈ H we have: In particular, Φ restricted to H is a morphism of semigroups.
Let q ∈ βZ be such that Φ(q) ∈ QS, which exists by the additional assumption. For any k we can find c k such that q k := q + c k ∈ a k Z. It is clear that Φ(q k ) ∈ QS, and hence a simple compactness argument shows that Φ(H) ∩ QS = ∅. Consequently the minimal ideal in the semigroup Φ(H) is QΦ(H).
We know that H contains all the idempotents. Hence, if q is a minimal idempotent, we have Φ(q) ∈ QΦ(H). Finally, because Q is the only idempotent in the QΦ(H), we conclude that Φ(q) = Q. But this means precisely that q ∈ F p .
Having characterised some degree 1 polynomials in F p for p -minimal idempotent, we are able to derive a description elements of F p of higher degrees.
Theorem 3.83. With notation as in 3.77, for p minimal idempotent the following are true: 1. If f : Z → Z is a standard polynomial with f (0) = 0, then f ∈ F p .
2. If f ∈ F p and g ∈ A p 0 are such that deg f < deg g, then f + g ∈ F p . 3 4. If f : Z → Z is a "weighted sum of digits" as in Proposition 3.82 and g : Z → Z is a standard polynomial, the f • g ∈ F p .
If fact, we have not been able to find an example of an admissible almost polynomial such outside F p . This leads us to state the following conjecture, for which the above results constitute a motivation.
Conjecture 1. If p is a minimal idempotent then F p = A p 0 .
The reason for interest in the above considerations is that we can apply them to general measure-preserving systems. The resulting theorem is similar to Khintchine's, except it speaks of recurrence along (generalised) polynomials. It is the immediate consequence of the above Theorem 3.83 together with Lemma 3.72.
Corollary 3.84. Let (X, M, µ, T ) be a measure preserving system, and A ∈ M be such that µ(A) > 0, and let p ∈ βZ be a minimal idempotent, and let f ∈ F p . Then: In particular, we have: Moreover, for any ε > 0, the set of return times: belongs to p, and is therefore is an C * set 12 .

Some classical results
Let us compare the above result with that of Schnell [Sch07], which in turn is largely inspired by results of Bergelson et al. [BHKM06]. A special case of the main theorem of [Sch07] is the following: Our argument is essentially a variation on the methods employed by Schnell. Let us consider the still more specialised case of the result, with m = d = 1. On one hand, our result is weaker insofar as it needs the ultrafilter to be minimal in addition to being idempotent. On the other hand, it is also stronger insofar as it identifies the limit explicitly, and works for generalised polynomials.
Other results which deserve a mention involve IP-limits. These limits are extensively used in ergodic theory, most notably in [BHKM06], [FK85], [BFM96]. As we will see, these limits are strongly related to ultrafilter limits along idempotents.
For brevity, and to establish a better correspondence with existing literature, we denote F := P fin (N). We turn F into a semigroup by taking the group operation to be the set union, as usual. Additionally, we assume the topology of F to be discrete, wherever relevant. Recall that the notation α < β for α, β ∈ F is a shorthand for max α < min β.
We are now in position to define the IP-limit. Definition 3.86 (IP-limit). Let Z be a topological space, and let (x α ) α∈F be a sequence of elements of Z, indexed by F. Then we say that IP−lim α x α = y if and only if for any U ∈ Top Z with y ∈ U there exists α 0 ∈ F such that for any α ∈ F with α > α 0 it holds that x α ∈ U .
To make the notion of IP-limit useful, one needs to define a proper way of passing to subsequences. Note that to extract a subsequence from a sequence (x i ) i∈N , one normally begins by choosing a sequence of indices (i n ) n∈N with i n < i n+1 for all n ∈ N, and then looks at the sequence x i j j∈N . The following definition provides the right index set for the subsequence of a set-indexed sequence.
Definition 3.87 (IP-ring). A family F 1 ⊂ F is said to be an IP-ring if and only if it is of the form: F 1 = FU(α) for some sequence α = (α n ) n∈N with α n < α n+1 for all n ∈ N, where FU(α) denotes the set of finite unions.
Given an IP-ring F 1 = FU(α), there is a natural way to identify F 1 with F, much like there is a natural identification between N and a subsequence (i n ) n∈N . The correspondence is given by the map β → α β := i∈β α i . Note that the surjectivity is simple, while injectivity relies on the condition that α n < α n+1 for all n. This identification leads to the natural extension of Definition 3.86.
Definition 3.88 (IP-limit along IP-ring). Let Z be a topological space, and let (x α ) α∈F be a sequence of elements of Z, indexed by F. Suppose that F 1 = FU(α) is an IP-ring.
Then we define the IP limit of x α along F 1 to be: with the understanding that if the expression on the right is undefined then so is the expression on the right.
An important consequence of Hindman's Theorem is that IP-limits of sequences in a compact space behave much like ordinary limits, as exemplified by the following proposition.
Proposition 3.89. Let Z be a compact metrizable space, and let (x α ) α∈F be a sequence of elements of Z, indexed by F. Then there exists an IP-ring F 1 such that the limit Sketch of proof. We show that given an open cover C ⊂ Top Z, we can construct an IP-ring F ′ such that there exists U ∈ C such that x α ∈ U for all α ∈ F ′ . First, because of compactness, we may assume without loss of generality that C is finite. Next, we may consider for each U ∈ C the set A U := {α ∈ F : x α ∈ U }. Clearly, A U for U ∈ C form a finite partition of F. Hence, by Hindman's Theorem 2.20 we find that one of the cells of this partition, say A V , contains an IP-ring, say F ′ . Directly by construction, x α ∈ V for all α ∈ F ′ , as desired.
We leave it to the reader to apply the above procedure to construct the IP-ring mentioned in the assertion. One can do it inductively, by considering the covers consisting of balls with radii descending to 0.
There is a natural link between IP-sets in N, IP-limits and idempotent ultrafilters. To begin with, we introduce an alternative way of viewing IP-sets, which is in the author's humble opinion a major motivating factor for the study of IP-limits. Recall that for a sequence x with elements in an additive group, the set FS(x) can be described as the values of the i∈α x i for α ∈ F. This motivates the following definition.
Definition 3.90 (IP-systems). Let X be a commutative semigroup. An IP-system in X is a map x : It is clear that IP-sets in X are precisely the sets of values of IP-systems. Considering IP-systems gives a clearer understanding of the structure, and is slightly more general, since a given IP-set can potentially correspond to different IP-systems.
Possibly the most frequent and probably the most basic way in which IP-limits occur is in the expressions of the type where n is an IP-system and F 1 is an IP-ring. Such limits are essentially equivalent to limits along idempotent ultrafilters, as shown in the following proposition. (1) There exists an IP-ring F 1 such that IP−lim α∈F 1 x n(α) = y.
(2) There exists an idempotent ultrafilter p ∈ k A k such that p-lim n x n = y.
Proof. (1 ) =⇒ (2 ) Suppose that F 1 = FU(α) is such that IP−lim α∈F 1 x n(α) = y. By Lemma 2.14 there exists an idempotent p such that for any k the set FU σ k α is p-large (where σ k α = (α k+l ) l∈N , as before). It is clear that p-lim n x n = y and that p satisfies the remaining conditions.
Because the sets B k are p-large, an application of Lemma 2.12 shows that one can construct a sequence of integers m = (m i ) i∈N such that FS σ k m ⊂ A ∩ B k for any k. Moreover, because p ∈ A l for any l, we can ensure that m i = j∈α i n(i) with α i < α i+1 for any i. It follows that F 1 := FU(α) is the sought IP-ring.
We have seen that there is ample justification for interest in when limits of unitary operators are projections. We restricted our attention to powers of unitary operators, but in literature one frequently encounters (unitary) actions of general (semi-)groups. The following definition should be construed as a generalisation of the assignment n → U n for a unitary operator U . We could have stated the definition in much more general terms, but for our purposes the following will suffice.
Definition 3.92 (Unitary action). Let X be a commutative semigroup, and let H be a Hilbert space. A unitary action of X on H is a map x → U x , such that for any x, y ∈ X it holds that U x+y = U x U y .
We are now in position to state some noteworthy results. The simplest among them is the following.
Theorem 3.93 ( [FK85]). Let H be a separable Hilbert space, let X be a commutative group, and let x → U x be a unitary action of X on H. Suppose that x : F → X is an IP-system and F 1 is an IP-ring such that the following limit exists: Then, P is an orthogonal projection.
Remark 3.94. In the case of actions of the integers, the above theorem is equivalent to Lemma 3.70, modulo an application of principle 3.91.
Several generalisations of the above result are possible. Firstly, IP-system in the above statement can be replaced by a so called IP-polynomial. We don't define this notion rigorously, but merely remark that the relation in which IP-polynomials stand to IP-systems is similar to the relation of polynomials to linear functions. For a precise definition, see [BHKM06]. IP-ring such that the following limit exists: Then, P is an orthogonal projection.
The above theorem can be generalised further, to allow for FVIP systems in place of IP-polynomials. The relevant theorem is due to Bergelson, Håland Knutson and Mc-Cutcheon. Because definition of FVIP exceeds the scope of our investigation, we do not formulate the the theorem. We refer the reader to [BHKM06].

Chapter 4
Applications in voting & model theory

Voting & Arrow's theorem
Yet another way to view ultrafilters is through the prism of voting procedures. Many strengths of this approach lie more in the intuitively appealing picture than in rigorous results, which should be borne in mind throughout this section. Whenever non-standard terminology is used, the goal is purely expository, and more theoretically inclined reader may disregard these superfluous details.
Let us begin by introducing a situation which will essentially remain fixed throughout this section. We consider a population X (where X is a possibly infinite set, with no extra structure), which is voting on candidates from a set C (again, no additional structure is required; in practical applications C is finite, but we don't make this restriction). Each voter x ∈ X has some preference between the candidates, which are expressed by a total order ≺ x , i.e. a ≺ x b if and only if x prefers b to a. Note that we do not include any notion of strength of preference in our picture, nor do we allow a voter to be undecided between two options. Moreover, we assume each voter to be rational to have preferences that form a total order: if for a voter x a candidate b is preferable to candidate a, and candidate c is preferable to b, then c is also preferable to a.
The goal of the vote is to establish an aggregated preference. More precisely, a social welfare function (also known as preference aggregation rule) is a function that assigns to the family of preferences (≺ x ) x∈X a total order ≺ soc which we consider to be the outcome of the vote, i.e. the preference of the society as a whole, or the aggregated preference of the voters.
There are several conditions that a preference aggregation rule could be expected to satisfy: (M) Monotonicity (also known as Positive Association of Social and Individual Values) -if a candidate moves up in individual rankings, then his final position does not fall. Formally, let a ∈ C be a candidate, and (≺ x ) x∈X , (≺ ′ x ) x∈X be two individual preferences. Suppose that for any voter x the following holds: We require that in this situation for any b ∈ C with b ≺ soc a we have b ≺ ′ soc a.
(NI) Non-imposition (also known as Unanimity) -if the vote is unanimous, then the aggregated preference is the same as the individual preference of the voters. Formally, if there is a universal total order ≺ * on C such that for all candidates a, b ∈ C and all voters x it holds that a ≺ x b if and only if a ≺ * b, then also for all candidates a, b it holds that a ≺ soc b if and only if a ≺ * b.
(IIA) Independence of Irrelevant Alternatives -relative ranking of any two given individuals is independent of preferences concerning other individuals. Formally, let a, b ∈ C be two candidates, and let (≺ x ) x∈X , (≺ ′ x ) x∈X be two individual preferences such that for any voter x we have a ≺ x b if and only if a ≺ ′ x b. Then we require that a ≺ soc b if and only if a ≺ ′ soc b.
Note that in presence of (IIA), the conditions (M) and (NI) are equivalent to apparently stronger conditions given below.
(M') If a ∈ C is a candidate and ≺ x and ≺ ′ x are two individual preferences, such that for any other candidate b ∈ C the condition b ≺ x a implies b ≺ ′ x a, then the condition b ≺ soc a implies b ≺ ′ soc a for any b ∈ C.
(NI') If for some two candidates a, b ∈ C and all voters x ∈ X it holds that a ≺ x b, then also a ≺ soc b.
The reason for giving the more complicated and weaker assumptions is that in social choice theory, these are more commonly accepted and easier to justify. In fact, most preference aggregation rules encountered in practice satisfy (M) and (NI), but fail to satisfy (IIA). The cause this state of affairs will become clear as soon as Arrow's theorem is formulated.
A voter x ∈ X is called a dictator if he alone controls the election. More precisely, x is a dictator if and only if for any individual preferences and any pair of candidates a, b ∈ C it holds that a ≺ soc b if and only if a ≺ x b. This means that the social preference is always identical to the preference of x, even if the entire rest of the society holds precisely opposite preferences to x. It is often thought that dictatorship should be avoided, at least on the grounds that in that case voting does not contribute any new information.
The following celebrated theorem due to Arrows shows that, in most practical situations, this can only be accomplished is we sacrifice some of the desirable properties mentioned above. We mostly follow the approach by Galvin [Gal], see also [Tao] and [Tao].
Theorem 4.1. For a finite set of voters X ranking candidates from a set C with #C ≥ 3, any preference aggregation rule that satisfies conditions (IIA), (M) and (NI) is necessarily dictatorial.
We will derive Arrow's theorem from the following more general result, which does not require finiteness of the set of the voters.
Theorem 4.2. Let X be an arbitrary set of voters, ranking candidates from a set C with #C ≥ 3. For a fixed preference aggregation rule, define D to be the family of those sets of voters who have control over the election: If the assumptions (IIA), (M) and (NI) are satisfied, then D is an ultrafilter. Remark 4.4. The assumption #C ≥ 3 in the above theorems is essential, since for #C = 2 and finite X (with odd cardinality) a simple majority vote is non-dictatorial and satisfies (M), (NI) and (IIA). More generally, if #C = 2, one can construct a fairly general weighted voting procedure. For 2 alternatives, there are just two possible preferences, and it will be convenient to label them "YES" and "NO". Let us attach to each voter x ∈ X a weight w x ≥ 0, and define some threshold 0 < t < x∈X w x . We declare that the society chooses "YES" if and only if x∈Y w x > t, where Y is the set of those voters who chose "YES". It is clear that the conditions (M) and (NI) are satisfied, as well as trivially (IIA). As long as w x < t for all x, this scheme is not dictatorial.
We use this opportunity to stress that in the formulation of Arrow's theorem we do not in any way require that voters should be "equal", nor do the candidates have to be treated "equally".
Proof of Theorem 4.2. By the (NI) property together with (IIA), we have X ∈ D. Also, clearly ∅ ∈ D.
If A ∈ D and B ⊃ A, then it is also visible that B ∈ D, since quantifying over B gives a stronger condition than quantifying over A.
We now check that if A, B ∈ D then A ∩ B ∈ D. For a proof by contradiction, suppose that A ∩ B ∈ D. Then, there are some candidates a, b ∈ C, such that for some individual preferences ≺ x we have a ≺ x b for all x ∈ A ∩ B, but the aggregate preference is in favour of a: b ≺ soc a. By (M), we may assume without loss of generality that b ≺ y a for y ∈ X \ A ∩ B, since moving a up on some preference lists cannot harm his final position. Let us now consider another candidate c ∈ C \ {a, b}, whose existence is guaranteed by #C ≥ 3. By (IIA), we can assign any preference between c and a, b (consistent with already existing preferences between a and b) without changing the relation b ≺ soc a.
Let us consider the following assignment of preferences: With this assignment, we have for x ∈ A: a ≺ x c. Since we assumed A ∈ D, it follows that a ≺ soc c. Similarly, we have for x ∈ B: c ≺ x b. Since B ∈ D, it follows that c ≺ soc a.
It follows that a ≺ soc c ≺ soc b, contradicting the assumption b ≺ soc a.
At this point, we have shown that D is a filter. We will now proceed to show the ultrafilter property, namely that for any partition X = A ∪ B with A ∩ B = ∅, either A ∈ D or B ∈ D. For that purpose, we will provide an alternative description of D. For a fixed pair of candidates a, b ∈ D, let D a,b denote the family of those sets of voters who have control the choice between a and b, in the sense that if they prefer b to a, then the collective preference is also in favour of b over a: It is clear by the definition of D that: We claim that all the sets D a,b are in fact equal to one another, and hence also to D.
We first show for a, b, c ∈ C, distinct, that D a,b ⊂ D a,c . For a proof, let us take A ∈ D a,b and show that A ∈ D a,c . We need to prove that for any individual preferences such that a ≺ x c for all x ∈ A, we have a ≺ soc c. Because of (M), we may assume that for x ∈ X \ A we have c ≺ x a. By (IIA), we may assume any preference between a, c and b. Let us consider the following assignment of preferences: Since A ∈ D a,b and for x ∈ A we have a ≺ x b, it follows that a ≺ soc b. Since we have b ≺ x c for all x ∈ X, it follows that b ≺ soc c. Combining these, we conclude that a ≺ soc c, as desired. Because the choice of A was arbitrary, it follows that indeed D a,b ⊂ D a,c .
By a symmetric argument we can also verify the inverse inclusion, so for arbitrary distinct a, b, c ∈ C we have D a,b = D a,c . By the same reasoning, but with preferences inverted, we also find D a,b = D c,b . Finally, we also note that: Hence, we conclude that for any a, b, a ′ , b ′ ∈ C with a = b and a ′ = b ′ (but possibly After this preliminary work, it will suffice to show that D a,b has the property that for any partition X = A ∪ B with A ∩ B = ∅, we have A ∈ D a,b or B ∈ D a,b . But this is relatively simple. Consider the preference such that a ≺ It follows from (M) that if a ≺ soc b, then A ∈ D a,b , and if b ≺ soc a then B ∈ D a,b . Thus, D a,b = D has the ultrafilter property.
Proof of Arrows Theorem 4.1. Under the assumptions of Arrows Theorem 4.1, the conditions of Theorem 4.2 are clearly satisfied, so the family D defined as in the formulation of Theorem is an ultrafilter. Since X is finite, the only possible ultrafilters are the principal ones, so D is the principal ultrafilter F x corresponding to some voter x ∈ X. In particular {x} ∈ D, so x is the sought dictator.
The following result is a converse of Theorem 4.2.
Proposition 4.5. Let U ∈ Ult (X) be an ultrafilter. Define preference aggregation rule by declaring a ≺ soc b to be equivalent to {x ∈ X : a ≺ x b} ∈ U . This gives a well defined preference aggregation rule that satisfies the conditions (IIA), (M) and (NI).
Proof. Let us note that a ≺ soc b ∈ {⊤, ⊥} is given by (a ≺ soc b) = U -lim x (a ≺ x b) (where the limit is taken in {⊤, ⊥} with discrete topology. Equivalently, if one identifies binary relations with elements of {⊤, ⊥} C×C with the natural Tichonoff/pointwise convergence topology, then (≺ soc ) = U -lim x (≺ x ).
We will first check that ≺ soc is indeed a total order. For this, we need to check a number of conditions, namely antisymmetry, transitivity and totality. This can be done directly, but we will pursue a slightly more sophisticated approach. For a, b, c ∈ C, and binary relation ≺ on C denote the sentences A binary relation ≺ on C is a total order if and only if the sentences asym a,b (≺), trans a,b,c (≺) and total a,b (≺) are true for any a, b, c. These are clearly quantifier free sentences in first order logic, true whenever ≺ is a total order. Consider any such sentence φ(≺), viewed as a map from {⊤, ⊥} C×C to {⊤, ⊥}. Since φ(≺) depends only on finitely many "coordinates", it is clearly continuous. From this continuity and the description of ≺ soc it follows that: In particular asym a,b (≺ soc ) , trans a,b,c (≺ soc ) and total a,b (≺ soc ) are true for any a, b, c, and hence ≺ soc is a total order. 1 The condition (M) holds for this preference aggregation rule directly by the definition, relying chiefly on the fact that U is closed under taking supsets. Likewise, the condition (NI) holds, because X ∈ U . Finally, the condition (IIE) holds, because the definition of a ≺ soc b makes no mention of any other candidates.
One can check that the construction of an ultrafilter from a preference aggregation rule in Theorem 4.2 and the construction of a preference aggregation rule from an ultrafilter in Proposition 4.5 are mutually inverse.
Corollary 4.6. For a fixed set of candidates C, with #C ≥ 3, there is a bijective correspondence between ultrafilters on X and preference aggregation rules satisfying for a vote of the population X on candidates from a set C with #C ≥ 3 that satisfy conditions (M), (IIE) and (NI).
The sentiment that ultrafilters can be thought as a voting system is was expressed by Tao in some of his expositor materials []. The subsequent applications in model theory can be thought of as a generalisation of this idea.

Ultrapowers
We give a brief overview of the foundations of model theory. Because we believe the basics of model theory would be familiar to a working mathematician, at least on the intuitive level, we do not go into much detail. For a more detailed discussion, we refer to any number of introductory materials on model theory, such as [Mar02] or [Hod97].
A very accessible treatment, which includes the ultrafilter construction and Łoś theorem roughly in the form presented here, is provided by the lecture notes [Cla].
To express various mathematics, one first need a language: Definition 4.7 (Language). A language L consists of the following data: 1. For each n ∈ N, a family of n-argument function symbols (usually denoted by f (x 1 , x 2 , . . . , x n )).

A family of constant symbols (usually denoted by c).
We stress that a function symbol is not a function, but merely a symbol used to denote a function. Likewise for relations and constants.
The assignment of a meaning to a symbol goes by the name of interpretation, and is formalised as follows. Note that the above allows formulas such as (∀x 1 )((∀x 1 ) φ). The convention is then to bind the variable to the most nested quantifier, so the formula in question is logically equivalent to (∀x 2 )((∀x 1 ) φ), provided that x 2 does not appear in φ. However, we will never use formulas of that kind in practice.
A formula is allowed to contain free variables, i.e. such that are not bound by a quantifier. We will sometimes write φ(x 1 , x 2 , . . . , x k ) instead of φ if x 1 , x 2 , . . . , x k are unbound variables, to highlight this. It follows that formulas cannot yet be assigned a truth or false within any L-structure. Sentences are the type of formulas to which a logical value can be ascribed. Some level of vagueness is allowed, because we do not define what it means for a variable to be bound by a quantifier, relying on the intuitive understanding of the reader. We now give a definition of how sentences are interpreted inside structures. We allow ourselves some vagueness also at this point, because we merely formalise the skill of interpreting formulas that the reader obviously possesses. One point to keep in mind is that the quantifiers are always interpreted to run over the underlying space (hence, no quantification over sets of elements, or elements of some external sets, is possible).
A formal definition uses induction over complexity of formulas, and can be found for instance in [Mar02].
Definition 4.13 (Interpretation). If S is an L-structure and φ is a sentence over L, then φ corresponds to a statement φ S obtained by replacing all function symbols f by the corresponding functions f S , all relation symbols R by the corresponding relations R S , all constant symbols c by the corresponding constants c S , replacing each quantifier of the form ∀x or ∃x, where x is a variable, by ∀x ∈ S or ∃x ∈ S, and (finally) interpreting the logical symbols in the standard way.
If the statement φ S is true, we say that φ is true in S, which we express by writing S |= φ.
More generally, if Φ is a set of sentences, then we say that Φ is true in S if φ is true in S for any φ ∈ Φ; we express this by writing S |= Φ.
Finally, if φ(x 1 , x 2 , . . . , x n ) is a formula in n unbound variables x 1 , x 2 , . . . , x n , then for a 1 , a 2 , . . . , a n ∈ S, we say that φ(a 1 , a 2 , . . . , a n ) is true, or S |= φ(a 1 , a 2 , . . . , a n ), if and only if the substitution procedure just described, combined with replacing x i by a i , yields a true sentence.
Definition 4.14 (Theory). A theory T over the language L is a set of sentences over L. Some authors require theories to be consistent and closed under logical consequence; but we pose no such restriction.
A L-structure S is said to be a model of T if and only if all sentences from T are true in S, i.e. if S |= T. A sentence φ is said to be a consequence of T, which we express by writing T |= φ, if and only if for any L-structure S with S |= T it holds that S |= φ.
To introduce a specific theory, one might proceed as follows. First, specify the language needed to describe the desired properties. Next, specify a set of statements A, referred to as axioms that describe relations between various symbols. It would normally considered a good thing if the list of A is relatively short and effectively generated. Finally, consider the theory T consisting of all logical consequences of the accepted axioms: for a formula φ, we have φ ∈ T if and only if A |= φ.
Before we proceed to discussing some examples, we need to make the following clarification.
Remark 4.15 (Identity). We deliberately did not include the equality symbol "=" as a logical symbol. This goes against the current fashion, but was used for example by Robinson in [Rob65]. In all theories under consideration, there will instead be a binary relation =, corresponding to equality. For this relation to serve as equality, we need to ensure several properties. Firstly, we need it to be an equivalence relation, which is easy to ensure by adding axioms: (∀x) x = x, (∀x)(∀y)x = y =⇒ y = x, (∀x)(∀y)(∀z)x = y ∧ y = z =⇒ x = z.
We refer to these axioms as the axioms of equality. Elements a, b ∈ S with a = S b will be indistinguishable within the theory, but may well be distinct elements of the set S.
A model where the relation = S is interpreted as the equality of set elements is called normal, hence what we said amounts to acceptation of non-normal models.
If S is a non-normal model of some theory T, then there is a natural way to construct a normal model on the set S/ = S . Thus, considering non-normal models does not provide more generality in any real sense. The reason for our treatment is that the ultraproduct construction is more elegant that way. We always assume that the considered theories have the binary relation =, and the axioms mentioned above belong to T.
Example 4.16 (Sets). Let L = {=}, and the let axioms A consist only of the identity axioms (which in this case amounts to the statement that = is an equivalence relation).
Then the corresponding theory describes sets.
Example 4.17. If we take L = {·, =} and impose no additional axioms, except for the ones about identity, than the resulting theory describes groupoids (also known as magmas).
If we add the axiom of connectivity: (∀x, y, z)(x · y) · z = x · (y · z), we get the theory of semigroups.
If we add the axiom of existence of unit: (∃e)(∀x)(ex = x) ∧ (xe = x) then we get the theory of monoids.
Depending on the taste, one could alternatively define monoids by adding a constant symbol for the unit e, and adding the shorter axiom: (∀x)(ex = x) ∧ (xe = x) If we add the axiom that each element has an inverse: (∀x)(∃y)(xy = e) then we get the theory of groups. Note that if we do not decide to add e as a constant, we need to treat this sentence as a shorthand for a sentence similar to: (∃e)((∀x)(ex = x) ∧ (xe = x)) ∧ ((∀x)(∃y)xy = e)).
Example 4.18. Let us take L = {·, <}. We impose, as always, axioms of identity. If we also include the axiom of transitivity: (∀x, y, z) (x < y) ∧ (y < z) =⇒ (x < z), and the axiom of strong asymmetry: (∀x) = (x < x), then the resulting theory describes partial orders. If we add the axiom of totality: (∀x, y) (x < y) ∨ (y < x), then we get the theory of total orders. We may also add axioms for theory of dense orders: (∀x, y) ((x < y) =⇒ (∃z) x < z < y).
The results of the previous section concerned the issue of voting. One could consider each individual preference ≺ x as a model for the theory 2 T of total orders on C, or more precisely as the only piece of data we need to identify such a model. One of the result was that given the individual preferences (or a family of models for T indexed by X) and an ultrafilter U on X, we were able to construct an aggregated preference, which was yet another model of T. We now want to extend this approach to different theories. The case that will be of most interest will be when X = N and the theory T has a specified standard model -the outcome will be an introduction of a non-standard one.
Definition 4.19 (Construction of ultraproducts). Let X be a set, let U be a distinguished ultrafilter on X, and let S x for x ∈ X be an L-structure. Then we define the ultraproduct P := U x∈X S x as follows.
As the underlying set, we take the standard product P := x∈X S x .
For any n-argument function symbol f in L, we define the corresponding function coordinatewise: f P (a 1 , a 2 , . . . , a n ) := f Sx (a 1 x , a 2 x , . . . , a n x x∈X . 2 There is a slight technical difficulty here. It is not difficult to get the theory of total orders: we just need one binary relation ≺ in the language, and axioms of transitivity, asymmetry and totality. We can also impose the condition that C is a subset of the set being ordered by adding a #C constant symbols to the theory, one for each element of C, say (ca) a∈C , and # C 2 axioms ensuring that these constants are different: ¬(ca = c b ). The difficulty lies in ensuring that the universe is not larger. If C is finite, we can add axiom saying that each element is equal to one of the introduced constants: (∀x) a∈C (x = ca) (where is a shorthand for multiple application of ∧). For infinite C, we can't of course form this sentence, and probably we have no way to ensure that there are no extra elements, hence we would be more correct to speak of the theory of orders on supersets of C in this case.
For any n-argument relation R in L, we define R P (a 1 , a 2 , . . . , a n ) := U -lim x R Sx (a 1 x , a 2 x , . . . , a n x ).
(In particular, if L contains a relation symbol =, and its interpretation = Sx is the actual equality of set elements, then = P is the equality on U -many indices, as opposed to equality per se. Hence, P is not normal.) If all structures S x in the product are equal to some fixed structure S, then the product is referred to as an ultrapower of S.
In particular, if φ has no free variables and P, and S x |= φ for all x, then also P |= φ.
If S x = S for some fixed structure S, then S and S model the same sentences. If all structures S x are models of a theory T, then also P is a model of T.
Proof. To keep notation concise, let v = v 1 , v 2 , . . . v n and a = a 1 , a 2 , . . . , a n . We prove the characterisation by structural induction on the formula φ(v). The most primitive possible for of φ is when it is a relation symbol applied to terms. If φ is not of this form, then we may assume it is constructed from simpler formulas using the logical symbols: ∧, ¬ and ∃. We consider the following cases: • Suppose that φ(v) = R(t 1 (v), t 2 (v), . . . , t n (v)) for some relation symbol R and some terms t 1 (v), . . . , t n (v) dependent on v. Then the claim is an immediate consequence of how the interpretation R P is defined.
Let A be the set of x ∈ X such that S x |= α(a x ), and likewise let B be the set of x ∈ X such that S x |= β(a). It is clear that S x |= α(a x ) ∧ β(a x ) = φ(a x ) if and only if x ∈ C.
By the inductive assumption, we have P |= α(a) if and only if A ∈ U . Likewise, P |= β(a) if and only if B ∈ U . Hence, P |= φ(a) if and only if A, B ∈ U . It is a general fact that A, B ∈ U if and only if A ∩ B ∈ U . Therefore, the condition P |= φ(a) is equivalent to A ∩ B ∈ U , which in turn is just another way of stating that S x |= φ(a x ) for U -many x.
• Suppose φ(v) = ¬α(v). By the inductive assumption, the claim holds for α(v). Let A be the set of x ∈ X such that S x |= φ(a x ) if and only if x ∈ A c .
By the inductive assumption, we have we have P |= α(a) if and only if A ∈ U .
Obviously, P |= φ(a) if and only if it is not true that P |= α(a). Hence P |= φ(a) if and only if A ∈ U . By a general rule, A ∈ U if and only if A c ∈ U . Combining these facts, we conclude that P |= φ(a) if and only if S x |= φ(a x ) for U -many x.
• φ(v) = (∃u)α(v, u) for some α. By the inductive assumption, the claim holds for the sentence α (with one more variable).
Suppose that P |= φ(a). Then, there exists b ∈ P such that P |= α(a, b). By the inductive assumption, S x |= α(a x , b x ) for U -many x. Hence, we also have S x |= φ(a x ) for U -many x, as desired.
Suppose conversely that S x |= φ(a x ) for U -many x, say for x ∈ A. Then let b x be such that S x |= α(a x , b x ) for x ∈ A, and let b x be arbitrary for x ∈ A c . Then we have S x |= α(a x , b x ) for U -many x, and by the inductive assumption it follows that P |= α(a, b). In particular, P |= ψ(a), which concludes the proof.
The reason for interest in ultraproducts, and in particular in ultrapowers, is the so called (countable) saturation property.
Corollary 4.21. Let U ∈ Ult (N) be a non-principal ultrafilter, let T be a theory with model S, and let P := x∈X S be the ultrapower of S. Let {φ i (v)} i∈N be a finitely satisfiable sequence of sentences, i.e. for any finite I ⊂ N there exists a ∈ S such that S |= φ i (a) for i ∈ I. Then, there exists a ∈ P such that P |= φ i (a) for all i ∈ N.
Proof. Let a n ∈ S be such that S |= φ i (a n ) for i ≤ n. Let a := (a n ) n∈N ∈ P . We claim that for all i we have P |= φ i (a). Indeed, for a fixed i we know that S |= φ i (a n ) for n ≥ i, so it fails to hold for at most finitely many i. Because U is not principal, it contains no finite sets, and hence S |= φ i (a n ) for U -many n. By Theorem 4.20, it follows that P |= φ i (a).
Example 4.22. Throughout, let U ∈ Ult (N) be a fixed non-principal ultrafilter. Let R be the standard real numbers, and R * be the ultrapower of R with respect to U . It is obvious that any positive integer n, there exists ε ∈ R such that 0 < ε < 1 n . Hence, there exists ε ∈ R * such that 0 < ε < 1 n for any positive integer n. Such ε is often referred to as infinitesimal. It is fairly easy to give an example of such a number, it suffices to take ε = (ε n ) n∈N ∈ R * with lim n→∞ ε n = 0. Usage of infinitesimals is the essence of non-standard analysis.
Note that although ε is infinitesimal, it makes sense to apply all standard operations to it. For instance, it makes sense to form expressions such as 1 + 43ε + ε 2 or 1 ε . Also, if f : R → R is any function, then we have a natural way of extending it to R * by adjoining a corresponding function symbol to the language. Hence, it makes sense to consider expressions like sin ε or f (x+ε)−f (x) ε .

Axiom of Determinacy and Axiom of Choice
Let us recall that the construction of ultrafilters relied on the Axiom of Choice, AC.
Although in most of mainstream mathematics AC is almost unilaterally accepted, there is still noticeable interest in axioms which are incompatible with AC. Moreover, it is worth knowing which parts of theory really depend on Choice, and in which the dependence is only superficial. Throughout this section, we will be working with Zermelo-Fraenkel Axiomatization, ZF, unless explicitly noted otherwise. Most of the results discussed here are apparently a part of mathematical folklore; an exhaustive treatment can be found in [Grä09]. A popular and extremely readable introduction, which was the first contact with ultrafilters for the author, can be found [Par07].
It is by no means obvious that Axiom of Choice is independent of Zermelo-Fraenkel Axioms. In fact, it the proof of independence due to Paul Cohen uses a highly non-trivial method of forcing. A more accessible method of proving independence from Choice is by employing additional axiom which known to be consistent with ZF but false in ZFC, and proving that this statement is not consistent with the result at hand. A possible choice for this purpose is the Axiom of Determinacy which we will now introduce. First, we need a definition, which we form in a slightly informal form.
Definition 4.23 (ω-game). An ω-game is a two-player, perfect information, deterministic game of length ω, played with integers.
In such game, there are two players, say A and B. They take turns choosing integers, starting with A, knowing the choices made in previous turns. There are ω moves made, and hence the choices made by the players result in construction of an infinite sequence of integers, say (a i ) i∈ω , where A chooses a 0 , B chooses a 1 knowing a 1 , and so on. The game is determined by a set X ⊂ ω ω : if (a i ) i∈ω ∈ X then A wins, else B wins.
A strategy (for player A) is a way to assign the next move of A to a given position.
Formally, it is a collection of maps S = (S i ) i∈ω such that S i : ω 2i → ω. We say that A follows the strategy S if at i-th move he chooses a 2i = S i ((a j ) j<2i ). The strategy S is said to be winning if by following S, A wins, regardless of how B plays. Strategies for B are defined analogously.
A game is said to be determined if either of the players has a winning strategy.
In the above definition, the requirement that the moves consist in choosing integers is not as restrictive as it might appear. In practice, it suffices that in each turn, the number of moves is at most countable: it is then possible to enumerate possible moves, and identify the choice of an integer with the choice of the corresponding move.
Example 4.24. Consider a game of chess with the standard rules, but with the threefold repetition rule replaced by the rule that if the game proceeds indefinitely, then black wins.
The resulting game is an ω-game, although admittedly not a very interesting one. The same holds for checkers.
We are now ready to formulate the Axiom of Determinacy.
Definition 4.25. Axiom of Determinacy (AD) is the statement that each ω-game is determined.
Justification of interest in AD lies in the following difficult theorem, which we cite without proof. We will not explicitly use it, but if it wasn't true, much of the subsequent considerations would be moot. The inquisitive reader is referred to [Kan08] and [Jec78] for more details.
Axiom of Determinacy has many surprising consequences, which are in contradiction with the standard result derived with use of the Axiom of Choice. Again, we give not give a proof, nor will we ever use them. Our only aim here is to give the reader a flavour of what mathematics looks like in ZF + AD.
Theorem 4.27. Any of the following is a consequence of the Axiom of Determinacy: 1. Every subset of R is Lebesgue measurable.
2. Every subset of R has the property of Baire.
3. Every subset of R has the perfect set property.
Note that by construction a ′ n = a n+1 for any n ∈ N. In particular, if we denote the sets A ′ , B ′ in analogy to the sets A, B, we find that: [a 2n , a 2n+1 ) = [0, a 1 )∪B As a consequence, the symmetric difference A ′ △B is finite, and does not belong to U .
Because of the assumption that Bob used a winning strategy, we know that he wins the game against Alice. It follows that B ∈ U . Since A ′ △B ∈ U , we also have A ′ ∈ U .
However, this means that Alice ′ wins the game against Bob ′ , who was also assumed to play according to winning strategy. This is a contradiction, proving that the assumption of existence of winning strategy for Bob was false.
Corollary 4.30. Existence of non-principal ultrafilters on N is inconsistent with AD. In particular, it is consistent with ZF that no non-principal ultrafilters exist.
Proof. Assume AD holds, and suppose that U is a non-principal ultrafilter on N. Consider the ultrafilter game described in Example 4.28. On one hand, according to Proposition 4.29, neither of the player has a winning strategy for this game. On the other hand, this is an ω-game, so AD implies the existence of a winning strategy. These two statements are contradictory, so the assumption that a non-principal ultrafilter on N exists is inconsistent with AD.
In particular, we have just re-derived the following clasically known fact. Note that we are not dependent on any consistency results here.
Corollary 4.31. The Axiom of Choice and the Axiom of Determinacy are incompatible within Zermelo-Fraenkel Axiomatization, in the sense that the theory ZF + AC + AD is inconsistent.
A practical consequence of Corollary 4.30 is that there is little hope of an explicit construction of an ultrafilter on N. We will not go into the details of what it precisely means for a construction to be "explicit", but such construction should clearly be possible carry out within ZF. Hence, independence of existence of ultrafilters from ZF offers strong evidence that the construction is impossible 3 .