Ellis enveloping semigroups in real closed fields

We introduce the Boolean algebra of d-semialgebraic (more generally, d-definable) sets and prove that its Stone space is naturally isomorphic to the Ellis enveloping semigroup of the Stone space of the Boolean algebra of semialgebraic (definable) sets. For definably connected o-minimal groups, we prove that this family agrees with the one of externally definable sets in the one-dimensional case. Nonetheless, we prove that in general these two families differ, even in the semialgebraic case over the real algebraic numbers. On the other hand, in the semialgebraic case we characterise real semialgrebraic functions representing Boolean combinations of d-semialgebraic sets.


Introduction
A recurrent matter in real algebraic geometry is attempting to characterize some properties of an algebraic or semialgebraic set defined over a parameter set using a simpler set of parameters.For instance, in [16] (see also [7]) the authors prove that any affine algebraic variety defined over the real field is homeomorphic to a variety defined over the field R alg of real algebraic numbers.They do not achieve this by applying Tarski's transfer principle, but instead by producing a deformation of the coefficients.To accomplish this, they consider sets of the form Z ∩R n alg where Z ⊂ R n is a semialgebraic set defined over R.These sets are known as externally semialgebraic and constitute the central topic of our paper.For example, the set X π := {(x, y) ∈ R 2 alg | y < π • x}.More generally, one can define the notion of externally semialgebraic set for an arbitrary real closed field R 1 .Namely, a subset X of R n 1 is externally semialgebraic if there exists a larger real closed field R 2 and a semialgebraic subset Z ⊂ R n 2 such that X = Z ∩ R n 1 .The problem that we address in this paper is in a certain sense similar to the one described above for real closed fields.We analyse whether any externally semialgebraic subset X of R n 1 can be described in a specific way using a semialgebraic subset from a larger real closed field R 2 .More precisely, whether any externally semialgebraic set X ⊂ R n 1 is d-semialgebraic, that is, if there exists a semialgebraic subset Z ⊂ R n 2 defined over R 1 and a point a ∈ R n 2 such that X = (Z − a) ∩ R n 1 .The objective is to prove for n ≥ 2 that the collection of sets formed by Boolean combinations of d-semialgebraic sets of R n 1 is different from the collection of externally semialgebraic sets of R n 1 .In fact, we show that X π above is not a Boolean combination of d-semialgebraic sets.This is a reasonable statement, since multiplication by π should not be possible to code just via multiplication by real algebraic numbers and translations by transcendental numbers.
Although the problem can be stated in terms of classical semialgebraic geometry, the solution relies in model-theoretic tools.So, since the above notions adapt to definable sets, we shall not only focus on real closed fields and semialgebraic sets, but on arbitrary (o-minimal) structures and definable sets, which are precisely the semialgebraic ones in the real algebraic setting.It is worth noticing that the study of externally definable sets in model theory is a recurrent topic.This goes back to [1] where the authors prove that externally semialgebraic subsets of a real closed field are precisely finite unions of convex subsets, a crucial property in our work.The introduction of d-definable sets and the motivation to show that these two collections of sets are not equal comes from the theory of Ellis enveloping semigroups.In his seminal work [13], Newelski made several connections between model theory and topological dynamics, which has become an active area of research over the past decade, see for instance [3,8,9,10,18,19] and [22] for some further reading.We briefly recall Newelski's construction.Let G be a definable group in a structure M .The group acts naturally by homeomorphisms on the compact Hausdorff space of types S G (M ) concentrated in G (that is, space of ultrafilters of definable subsets of G).A classical construction due to Ellis [5] permits to associate to this action the so-called Ellis enveloping semigroup (E(S G (M )), •), i.e. a compact Hausdorff topological space equipped with a semigroup operation which is continuous in the first coordinate.In [13, pp. 68-69], Newelski gives two abstract conditions to identify the Ellis enveloping semigroup E(S G (M )) with the Stone space S G (M ).Nonetheless, as he points out, these conditions may fail even when G is the additive group of algebraic real numbers and M = R alg .
Later on, Newelski [14] observed that to understand the dynamics of the group action is more convenient to work with externally definable sets, and consider the action of G on the Stone space S ext G (M ) of ultrafilters of externally definable sets of M .In this situation, the semigroup (E(S ext G (M )), •) turns out to be (S ext G (M ), * ) itself, with a well-known model theoretic operation * called coheir product.
Whilst considering the action on S ext G (M ) eases the model-theoretic treatment of the Ellis semigroup, it seems also natural to ask whether E(S ext G (M )) ≃ S ext G (M ) are naturally isomorphic to E(S G (M )) as Ellis semigroups.To the best of our knowledge, there is no example in the literature showing they are different.In fact, the question has been completely neglected, apart from the aforementioned remark due to Newelski.Hence, the primary objective of our paper is to demonstrate that S ext G (M ) and E(S G (M )) are not naturally isomorphic in general.In order to achieve this objective, in Sections 2 and 3 we revisit and refine certain aspects of the framework established by Newelski in his groundbreaking works [13,14] and [15], by studying Ellis semigroups of Stone spaces.As a consequence we obtain the following characterization: Finally, before finishing the introduction, we make some comments on the proof of the last theorem.For the proof of iii) we establish a general statement (Proposition 4.8) that enables us to characterize the real semialgebraic functions representing Boolean combinations of d-semialgebraic sets.Using this proposition, we deduce that X π mentioned above is not a Boolean combination of d-semialgebraic sets.Furthermore, this proposition allows us to demonstrate that many other externally semialgebraic sets (intuitively, any externally semialgebraic set described by a semialgebraic function using the product by transcendental numbers) are also not expressible as such Boolean combinations.The situation in ii) is quite different.We prove that a specific externally definable set is not a Boolean combination of d-definable sets.Although the general technique can be applied to other externally definable sets, the proof depends on certain bounds calculated for the specific example we are considering.Moreover, we show there are examples of externally definable sets that at first sight could seem ddefinable, but are not (see Example 4.7).
Acknowledgments.We thank the referee for the careful reading of the paper and all suggestions made.In particular, we wish to express our gratitude for pointing us the work of Adam Malinowski and Ludomir Newelski, concerning the alternative representation of the Ellis semigroup as Stone spaces in [11,12].

Set-up on Ellis semigroups of Stone spaces
The goal of the section is to give a general framework to study the Ellis enveloping of some spaces of types.It will be convenient to regard these as Stone spaces.So, we fix a very general set-up in terms of Boolean algebras following the approach of Newelski [14, Section 1] and [15, Section 1], see also [4,Section 3].Definition 2.1.An Ellis semigroup is a semigroup (E, •) which is a compact Hausdorff topological space such that • is continuous in the first coordinate, that is, for each y ∈ E the map x → x • y is continuous.
A natural example of Ellis semigroup is the Ellis enveloping semigroup.We recall briefly its construction, see [5].Suppose that S is a G-flow, i.e. let G be a group with the discrete topology acting on a compact Hausdorff space S by homeomorphisms.Thus the action is given by a (continuous) homomorphism G → Homeo(S) ≤ S S with g → ℓ g .The Ellis enveloping semigroup E(S) is the closure of {ℓ g } g∈G in S S , where S S is equipped with the product topology.Now, fix a group G and let A ⊂ P(G) be a Boolean algebra.Consider the Stone space S(A) of A, which recall is the set of ultrafilters on A. This is a compact Hausdorff totally disconnected topological space with the Stone topology, i.e. the topology generated by the family of subsets of the form [X] = {p ∈ S(A) | X ∈ p} where X is an arbitrary element of A. For g ∈ G, we write p A g to denote the principal ultrafilter {X ∈ A | g ∈ X} associated to g. Suppose that A is left-invariant, that is, it is closed under left-translation by elements of G.For g ∈ G define ℓ A g : S(A) → S(A) as Thus, each map ℓ A g is a homeomorphism since for X ∈ A we have For an ultrafilter p ∈ S(A), consider the map This is a homomorphism of Boolean algebras which preserves left-translation.Note that a priori there is no reason why the image of d p is contained in A.
We recall the following definition from [15].
Definition 2.3.Let A ⊂ P(G) be a left-invariant Boolean algebra.We say that A is d-closed if d q X ∈ A for every q ∈ S(A) and X ∈ A.
Remark 2.4.If a left-invariant Boolean algebra A is d-closed, then A is necessarily right-invariant, i.e. it is closed under right-translation by elements of G. Indeed, in general, given X ∈ A and h ∈ G we have that We introduce the following notion, which also appears in [11,Section 2.3] in an equivalent form (see Remark 2.6 below).Definition 2.5.Given a left-invariant Boolean subalgebra A ⊂ P(G) we define A d ⊂ P(G) to be the Boolean subalgebra generated by the sets of the form d p X for p ∈ S(A) and X ∈ A.
Note that by taking h = 1 G in the expression (1) of Remark 2.4 we immediately get that A ⊂ A d , so A = A d whenever A is d-closed.Furthermore, we also have the following.
Remark 2.6.Let A be a left-invariant Boolean algebra.
(1) The Boolean algebra A d is left-invariant because hd q Y = d q hY for any q ∈ S(A), h ∈ G and Y ∈ A. (2) If A ⊂ B are two left-invariant Boolean algebras such that B is d-closed, then A d ⊂ B d .Indeed, given some set X ∈ A ⊂ B and some p ∈ S(A), choose some ultrafilter q ∈ S(B) such that q |A = p.It then follows that Next, we will also see that A d is itself d-closed but before it is convenient to introduce some further notation.The following is a mere translation of [14, Lemma 1.5 (1)] to this general setting (cf.[4,Lemma 3.10]).We give the proof for the sake of completeness.
Fact 2.7.Let A ⊂ B be two left-invariant Boolean subalgebras of P(G) such that A d ⊂ B. For p ∈ S(B), the map p} is well-defined and is the limit of (ℓ A g ) g∈G with respect to the ultrafilter p in the pointwise convergence topology in the space of functions from S(A) to S(A).
Proof.Observe first that the set ℓ A p (q) is well-defined since d q X ∈ A d ⊂ B and p ∈ S(B).Furthermore, the set ℓ A p (q) is an ultrafilter on A. Hence, the map is well-defined.Also, for g ∈ G observe that ℓ A g coincides with the map associated to the principal ultrafilter p B g because Finally, for an ultrafilter p ∈ S(B) and X ∈ A we have that Note that for a left-invariant Boolean algebra A, Fact 2.7 provides a description of the Ellis semigroup (E(S(A)), •) of the G-flow S(A).Indeed, for any B leftinvariant Boolean subalgebra of P(G) with A d ⊂ B we have that , where the second equality holds by considering the restriction map S(B) ։ S(A d ).Henceforth, to easier notation, we omit to write the superscript A in ℓ A p when there is no possible confusion.
In addition, Newelski proved [15, Proposition 2.4] (see also Proposition 2.10 below): Fact 2.8.Let A ⊂ P(G) be a left-invariant d-closed Boolean subalgebra.We have that (S(A), * ) is an Ellis semigroup, where * is defined as p * q := ℓ p (q).Furthermore, the map is an isomorphism of Ellis semigroups.Now we see that A d is d-closed.So, the result above will hold true for A d .
Lemma 2.9.The Boolean algebra A d is the smallest left-invariant d-closed Boolean algebra containing A.
Proof.By Remark 2.6, it remains to prove that A d is d-closed.Since for each p ∈ S(A d ) the map d p : A d → P(G) is a homomorphism of Boolean algebras, it suffices to show that d p X ∈ A d for arbitrary p ∈ S(A d ) and X = d q Y with q ∈ S(A) and Y ∈ A. In that case, and since ℓ A p (q) ∈ S(A) by Fact 2.7, we have As a consequence, it follows from Fact 2.8 that S(A d ) is naturally isomorphic to E(S(A d )) as Ellis semigroups.Furthermore, an inspection of the original proof in [15, Proposition 2.4] yields the following.In fact, it explicitly appears in [11,Theorem 2.24] where it is credited to Newelski.
Proposition 2.10.Let A ⊂ B be two left-invariant Boolean subalgebras of P(G) such that B is d-closed.The map Proof.We first prove that Λ : S(B) → S(A) S(A) is continuous, where S(A) S(A) is equipped with the product topology.It suffices to show that the map S(B) → S(A) given by p → ℓ A p (q) is continuous for every q ∈ S(A).So, let X ∈ A, consider the basic open set [X] and set U ⊂ S(B) to be its preimage under this map.Note that for p ∈ S(B) we have is continuous, as desired.Once we have seen that Λ : S(B) → S(A) S(A) is continuous, we obtain that its image im(Λ) is a closed subset of S(A) S(A) .So, as clearly ℓ g ∈ im(Λ) for g ∈ G, we deduce that E(S(A)) ⊂ im(Λ).Moreover, we get the equality by Fact 2.7.Therefore, we have shown that Λ : S(B) → E(S(A)) is an epimorphism of Ellis semigroups.
For the second part of the statement it is enough to prove that Λ is injective, as S(A d ) is compact and E(S(A)) Hausdorff.Let p 1 , p 2 ∈ S(A d ) be two distinct ultrafilters.So, there is some set Y ∈ A d such that Y ∈ p 1 but Y ∈ p 2 , which we may assume to be of the form d q X for some X ∈ A and q ∈ S(A).Note that . So, we obtain ℓ A p1 = ℓ A p2 and hence the map Λ is injective.
We finish the section by pointing out that A d is the unique Boolean subalgebra that yields a natural isomorphism between (S(A d ), * ) and (E(S(A)), •).3).Also, condition (3) implies (2) by Proposition 2.10.To prove that (2) implies (1), note that Λ : . Indeed, for X ∈ A and q ∈ S(A) we have So, the map r is injective and hence an homeomorphism.

Translations by external elements
Here we use the set-up established in the previous section to study the Ellis enveloping semigroup of spaces of types, following the approach of [14, Section 2].
Fix a κ-saturated structure M in a language L and let M be an elementary substructure with |M | < κ.Let G = G( M ) ⊂ M n be an M -definable group and write G(M ) for G ∩ M n .Let Def G (M ) be the Boolean algebra of all M -definable subsets of G(M ) ⊂ M n .We denote by S G (M ) the Stone space of Def G (M ), that is, the space of ultrafilters of M -definable subsets of G(M ).Using the correspondence between formulas and definable sets, we can identify an ultrafilter n-type over M with an n-type (i.e. a maximal consistent set of L M -formulas concentrating on G).We recall the notion of externally definable subset.Definition 3.1.We say that X ⊂ G(M ) is externally definable if there exists some We denote the collection of all externally definable subsets of G(M ) by Def ext G (M ) and we write S ext G (M ) to denote its Stone space.Newelski [14, Lemma 1.3] proved that the Boolean algebra of externally definable subsets of G(M ), which is clearly left-invariant under translates of G(M ), is d-closed.
Bearing in mind the results from the previous section, we refine the notion of externally definable.We introduce the following concept: It is clear that every M -definable subset of G(M ) is d-definable, and also that every d-definable is externally definable.Furthermore, we have the following: In particular, the Boolean algebra generated by all d-definable subsets of This yields that the d-definable sets are precisely the sets of the form d q (Z ∩ M ) for some q ∈ S G (M ) and some M -definable subset Z ⊂ G. So, we deduce that the Boolean algebra generated by all d-definable subsets of As a consequence, it follows from Lemma 2.9 that the Boolean algebra generated by the d-definable subsets of G(M ) is left-invariant and d-closed.Hence, combining this with the previous section, we obtain that Proof.Note first that since G is definably connected, it is commutative by [17,Corollary 2.15].So, along the proof we use additive notation.By Corollary 3.4 it suffices to show that every externally definable subset of G(M ) is a Boolean combination of d-definable sets.So, fix an L M -formula ψ(x) concentrated on G.To prove that ψ(M ) is a Boolean combination of d-definable sets, we will heavily rely on the results from [20].We distinguish two cases: Case 1. Suppose that G is not definably compact; thus G is of R-type in the terminology from [20].In this case, there is a definable linear order < G on G such that (G, +, < G ) is an ordered divisible torsion-free abelian group and < G is dense and without endpoints.Moreover, every definable subset of G is a finite union of < G -intervals and points.Hence, we may assume without loss of generality that ψ( M ) is an < G -interval or a point.Since a point is clearly d-definable, we can assume that ψ( M ) is an < G -interval of the form (−∞, b) = {x ∈ G | x < G b} or (a, +∞), which is defined likewise.It then follows that either In both cases the externally definable set is d-definable, as desired.Case 2. Suppose that G is definably compact; thus G is of S 1 -type according to [20].In this case, there exists a definable circular order R(x, y, z) on G such that i) R(x, y, z) implies that x, y, z are distinct, ii) R(x, y, z) implies that R(y, z, x) and R(−z, −y, −x) hold, iii) R(x, y, z) implies that R(x + u, y + u, z + u) holds for any u ∈ G.
Moreover, for any x 0 ∈ G, the relation R(x 0 , y, z) defines a dense linear order without endpoints in G \ {x 0 }.We write < x0 for this binary relation.In addition, every definable subset of G \ {x 0 } is a finite union of < x0 -intervals and points.In particular, a definably connected definable proper subset of G is of the form R(a, M , b) for some a, b ∈ G.
Hence, we deduce that R(a, M, 0) = −R(0, M, −a), which yields that is also a Boolean combination of d-definable sets.Consequently, so is R(0, M, a).This finishes the proof.4.2.Arbitrary dimension in an ℵ 0 -saturated model.The statement does not generalise to arbitrary dimensions, not even in the semialgebraic case.Our next goal is to prove the following.In view of Corollary 3.4, to prove the theorem we only need to find an externally definable subset of M 2 which is not a Boolean combination of d-definable subsets of M 2 .To this purpose it will be convenient to work within the Shelah expansion of the structure, which we next recall.Given a definable subset Z ⊂ M n , defined with parameters from M , introduce an n-relational symbol R Z associated to Z. Define the structure M Sh which expands M together with these new relational symbols R Z , where R Z is interpreted as the externally definable set Z ∩ M n .Shelah's expansion theorem [21] ensures that the structure M Sh has elimination of quantifiers, see also [2,23] for a different proof.In particular, given an externally definable set Y ⊂ M n+1 and x ∈ M n , the fiber of Y over x Y x := {y ∈ M | (x, y) ∈ Y } is also externally definable, by Shelah's quantifier elimination theorem.In the ominimal setting, quantifier elimination was first proven by Baisalov and Poizat [1].Furthermore, as a consequence they deduced that M Sh is weakly o-minimal [1, p. 577].In particular: Fact 4.3.Let M be an o-minimal structure and let X ⊂ M be an externally definable subset.Then X is a finite disjoint union of convex sets.
Our first step towards the proof of Theorem 4.2 is the following very general statement on a specific family of externally definable sets of M n+1 , for arbitrary (and non-necessarily) saturated o-minimal structures.Proposition 4.4.Let h : D → M be an M -definable function, where D ⊂ M n is an M -definable cell, such that for every x ∈ D ∩ M n the type tp(h(x)/M ) is not definable.Let X = {(x, y) ∈ M n+1 | x ∈ D and y < h(x)} and let {C ij } be a finite family of externally definable subsets of M n+1 such that for Y i := r j=1 C ij we have that X = ℓ i=1 Y i .Then there is a family of externally definable subsets {F ij } i,j of D ∩ M n with D ∩ M n = i,j F ij , and for each x ∈ F ij there are y 1 , y 2 ∈ M with y 1 < h(x) < y 2 and (y 1 , y 2 ) ∩ C ij,x = (y 1 , h(x)) ∩ M .
Proof.First note that since each type tp(h(x)/M ) is not definable, for each x ∈ M there is some ε ∈ M >0 such that −ε < h(x) < ε.Moreover, if y ∈ M is such that y < h(x) then the set (y, h(x)) ∩ M is infinite.Indeed, otherwise the type tp(h(x)/M ) would be defined by the formula y > b for some b ∈ M with b < h(x) and (b, h(x)) ∩ M = ∅.Similarly, if y ∈ M is such that y > h(x) then the set (h(x), y) ∩ M is infinite.Now, for each i = 1, . . ., ℓ, consider the set and let π( Ỹi ) denote its projection on the first n coordinates, that is, Both sets are clearly definable in the structure M Sh and therefore they are externally definable.
Proof of Claim 1. Assume otherwise that (y 0 , h(x)) ∩ Y i,x = ∅ whenever y 0 ∈ M and y 0 < h(x).Note that since the set Y i,x is externally definable, it is a finite union of maximal (disjoint) convex sets Z 1 < . . .< Z s by Fact 4.3.Choose some y ′ ∈ Z s .We next show that which will give the desired contradiction since x / ∈ π( Ỹi ).To prove this equality, note first that So, it suffices to see the inclusion ⊃.Let y 0 ∈ (y ′ , h(x))∩M .We have by assumption that (y 0 , h(x)) ∩ Y i,x = ∅, so there is some element y 1 ∈ (y 0 , h(x)) ∩ Y i,x .Now, recall that Y i,x = Z 1 ∪ . . .∪ Z s with Z 1 < . . .< Z s .Also y ′ ∈ Z s and y ′ < y 0 < y 1 with y 1 ∈ Y i,x .Thus, we deduce that y 1 ∈ Z s and therefore by convexity y 0 ∈ Z s ⊂ Y i,x , as required.

Claim 2
Now, recall that each Y i = r j=1 C ij where each C ij ⊂ M n+1 is a externally definable subset.Given i = 1, . . ., ℓ and j = 1, . . ., r, define the set which is externally definable.To finish the proof, it is enough to prove that By Claim 2 there is some i = 1, . . ., ℓ with x ∈ π( Ỹi ).Thus, there is an element y 1 ∈ M with y 1 < h(x) such that (y 1 , +∞) ∩ Y i,x = (y 1 , h(x)) ∩ M .Since Y i = r j=1 C ij , for all j = 1, . . ., r we have (y 1 , h(x)) ∩ M ⊂ C ij,x and hence since C ij,x ⊂ M .Therefore, we need only prove that there exist some j = 1, . . ., r and some y 2 ∈ M with h(x) < y 2 for which (y

we first claim:
Claim 3.There exists some j ∈ {1, . . ., r} such that for every ξ ∈ M with ξ > h(x) we have Proof of Claim 3. Otherwise, for each j there is some ξ j ∈ M with ξ j > h(x) such that (h(x), ξ j ) ∩ M ⊂ C ij,x .Set ξ ′ := min{ξ 1 , . . ., ξ r } and note then that where the last equality holds by the choice of y 1 .However, the above is clearly a contradiction.
In particular, once we know that (h(x), y 2 ) ∩ M ⊂ Z 1 , it follows that and so This finishes the proof.Now, we introduce some notation.Let M denote an o-minimal expansion of a real closed field.Denote by inf + M (R) the set of positive elements of M which are infinitesimal with respect to R, that is n for all n ∈ N \ {0} .Consider the unique type p id (x) ∈ S 1 (M ) determined by the set of formulas . The subscript id stands for idempotent, since the type p id is idempotent in the space of types with respect to the semigroup operation induced by addition.Now, Theorem 4.2 is a straightforward consequence of Corollary 3.4 and the following proposition.Remark 4.6.The underlying intuition behind the above statement is clear: the multiplication map x → e • x cannot be equal to a map of the form where f is some M -definable map and c, d ∈ M .In fact, the latter is clear: if e • x = g(x) = f (x + c) + d for all x ∈ M>0 then f (x) = e(x − c) − d and since f is M -definable then it is easy to deduce that e ∈ M , which is a contradiction.However, our situation is completely different: what we really have to show is that the map x → tp(e • x/M ) cannot be equal to a map x → tp(g(x)/M ) where g(x) is as above.If such is the case then essentially tp(g ′ (x)/M ) = tp(e/M ) and therefore g(x) = e • x + k for some k ∈ M , from where we obtain easily another contradiction.The two words in emphasis are far from clear, see Example 4.7 below.
In the proof of Proposition 4.5 we try to make sense of the above intuition through a case-by-case development via the mean value theorem (see [6,Ch. 7]).
Proof of Proposition 4.5.In an o-minimal structure, each definable set over a set of parameters is a finite disjoint union of cells defined over the same set of parameters.Thus, a Boolean combination of d-definable sets of (M 2 , +) is a Boolean combination of d-definable cells, i.e., sets of the form C = C + (c, d) ∩ M 2 where C is an M -definable cell and (c, d) ∈ M 2 .Suppose that the given set X is a Boolean combination of d-definable cells.We can write it as X = i Y i , where Y i := r j=1 C ij for some d-definable cells C ij .We first see that we may reduce to the case when X is a specific single d-definable cell, after possibly shrinking the set X. We prove: Claim 1.There are some a ∈ M with a > 0, an M -definable function f : I → M with I an open interval, and elements c, d ∈ M such that M >a ⊂ I − c and Proof of Claim 1.Note that tp(e/M ) is not definable, and therefore for every x ∈ M >0 we have that tp(e • x/M ) is neither definable.Hence, by Proposition 4.4, there is a family of externally definable subsets {F ij } of M >0 such that M >0 = F ij , and for each x ∈ F ij there are y 1 , y 2 ∈ M with y 1 < e • x < y 2 and (y 1 , y 2 ) ∩ C ij,x = (y 1 , e • x) ∩ M .Note that we can choose y 1 with y 1 > 0. Each F ij is a finite union of convex sets, by Fact 4.3.Therefore there exist a pair (i, j) and an element a ∈ M >0 such that M >a ⊂ F ij .Denote C := C ij .So, for all x ∈ M >a there exist some y 1 ∈ (0, e • x) ∩ M and some y 2 ∈ (e • x, +∞) ∩ M with By definition, the d-definable cell C equals to ( C + (−c, d) ∩ M 2 for some element (−c, d) ∈ M 2 and some 2-dimensional cell where I ⊂ M is an open interval, defined over M , and f 1 , f 2 : I → M are two M -definable functions.Note that In particular, it follows that y 1 < f 2 (x + c) + d and f 1 (x + c) + d ≤ e • x < y 2 .So, taking the union with the interval (0, y 1 ] ∩ M in the above equalities, we get Hence, to finish the proof it is enough to contradict Claim 1.In other words, we need to show that there cannot exist a ∈ M >0 and c, d ∈ M and an M -definable function f : I → M satisfying (ME).The term ME stands for main equality.
Let a ∈ M , c, d ∈ M and f : I → M be given by Claim 1.Note that we are assuming that we can evaluate f in x + c for each x ∈ M >a , since we have M >a ⊂ I − c.Claim 2. We can assume that I ⊂ M is an open interval definable over M satisfying that: • either f > 0 or f < 0 holds, and • it holds f ′ > 0 and in particular f is strictly increasing.
Proof of Claim 2. Indeed, by o-minimality there are open disjoint subintervals I 1 , . . ., I s of I, all definable over M , with Since J i is convex, either there is an element b ∈ M >a such that J i ⊂ M <b , in which case we will say that J i is bounded, or there is some b ∈ M >a such that M >b ⊂ J i .Thus, as M >a ⊂ I − c, we have that and therefore there is a 1 ∈ M >a such that M >a1 ⊂ s i=1 J i .In particular, not all J i can be bounded.So, there are an i = 1, . . ., s and some a 2 ∈ M >a1 such that M >a2 ⊂ J i .In particular, in (ME) we can replace a by a 2 and f by f | Ii , as required as we will see next.Note that in (ME), the case f = 0 is not allowed.Moreover, the case f ′ ≤ 0 is also excluded.To see the latter, consider the M -definable function g(x) := f (x + c) + d, which is differentiable over its domain I − c.By the mean value theorem, for all However, for a fixed . Thus, we have that ex 1 < x 1 < y < e • x 2 .So, we get by (ME) that y < g(x 2 ) but x 1 < y < g(x 1 ), a contradiction.

Claim 2
Henceforth, we define g(x) which is a differentiable over its domain I − c and it is definable over M .Moreover, note that for all x ∈ M >a we have that 0 < g(x), by (ME).
From now on, we will use the mean value theorem without explicit reference.
Claim 3. We can assume that the interval I is of the form (i, +∞) for some i ∈ M or of the form (−∞, i) for some i ∈ M .Moreover, in the former case we have that c > i − (a + 1) and in latter case we have c < M .
Proof of Claim 3. Note first that c < M whenever I ⊂ (−∞, i) for some i ∈ M , since in this case M >a ⊂ I − c and hence M < i − c.Also, if I ⊂ (i, +∞) for some i ∈ M , then c > i − (a + 1).After observing this, note also that the interval I cannot be of the form (i 1 , i 2 ) for some i 1 , i 2 ∈ M with i 1 < i 2 , as otherwise we would have i 1 − (a + 1) < c < M , a contradiction.Hence, it remains to consider the case when I = (−∞, +∞).In that case, if there is some c 1 ∈ M such that c 1 < c then for every x ∈ M >a we have that a+c 1 < x+c.In which case, we set I ′ = (a + c 1 , +∞).Otherwise, we would have that c < M and set I ′ = (−∞, 0).In either case we have that I ′ satisfies that M >a ⊂ I ′ − c.Hence, we can replace I by I ′ , obtaining the claim.

Claim 3
From now on we assume that I is of the form given in Claim 3. To get the desired contradiction, now we study how the derivative of f behaves on I.
Claim 4.There is some M -definable unbounded open interval J ⊂ I such that f ′ (x) < e for every x ∈ J ∩ M .In particular, for every natural number n ≥ 1 and every x ∈ J we have that f ′ (x) < 1 n .Proof of Claim 4. Since f ′ is an M -definable function on I ⊂ M , we have that The two disjoint sets from the right hand side of the equality are externally definable.So, both equal a finite union of convex sets by Fact 4.3.This yields that only one of them can be unbounded.In particular, there exists some unbounded open M -definable interval J ⊂ I such that f ′ | J∩M < e or f ′ | J∩M > e.
Suppose, to get a contradiction, that f ′ (x) > e for every x ∈ J ∩ M .As f ′ and J are both definable over M , it follows by ℵ 0 -saturation of M that there is some natural number n 0 ≥ 1 such that f ′ (x) > 1 n0 for every x ∈ J, since clearly Now, choose some x 1 , x 2 ∈ M >a with x 2 = 2x 1 .Furthermore, by Claim 3 we can choose them so that [x 1 + c, x 2 + c] ⊂ J. Indeed, if I is of the form (−∞, i) then by Claim 3 we know that c < M and so both x i + c ∈ J, since J is of the form (−∞, j) for some j ∈ M with j < i.On the contrary, if I is of the form (i, +∞) with i ∈ M , then J = (j, +∞) for some j ∈ M >i and also c < M by Claim 3. So, if M < c then choose any x 1 ∈ M >a .Otherwise, it suffices to choose x 1 > a + |j − c| to ensure that x 1 , x 2 ∈ M >a and that x 1 + c and so x 2 + c belong to J.As x 1 < x 2 , there is an element where the inequality holds since x + c ∈ J. Thus g(2x 1 ) > g(x 1 ) + x1 n0 .Now, fix some m ∈ M such that 0 < m < e.Since m • x 1 < e • x 1 , we have by (ME) that m • x 1 < g(x 1 ) and therefore So, again by (ME) we obtain that m • x 1 + 1 n0 • x 1 < e • 2x 1 and hence 1 2 (m + 1 n0 ) < e, which is a contradiction.This yields the claim.

Claim 4
Now, let J ⊂ I be the open interval given by Claim 4. This is unbounded and definable over M .Since the function f ′ is definable over M , by Claim 2 and 4 the limit ℓ = lim |x|→+∞ f ′ (x) belongs to M and satisfies that 0 < ℓ < e.Thus, for every ε ∈ M with 0 < ε there is some unbounded open interval J ε ⊂ J, definable over M , such that |f ′ (x) − ℓ| < ε for every x ∈ J ε .
Fix ε = ℓ.Let x 1 ∈ M >a be such that x 1 + c ∈ J ℓ ; this is possible arguing as in the proof of Claim 4. Let now m ∈ M be with 0 < m < e and set x 2 = x 1 • m −1 , which is also an element of M >a with x 1 < x 2 .It follows as in the proof of Claim 3 that x 2 + c ∈ J ℓ .Hence, there is some x ∈ M with x 1 < x < x 2 , and so x + c ∈ J ℓ , such that On the other hand, for y and therefore by (ME) it follows that y < g(x 2 ).Thus, we obtain which yields that x 1 < g(x 1 ).So, again by (ME) we have that x 1 < e • x 1 , a contradiction as e < 1.This final contradiction finishes the proof.
Finally, let us point out that there are externally definable sets that may not seem a Boolean combination of d-definable, but actually are.which sends an element x ∈ Fin R ( R) to the unique element st(x) ∈ R such that x ∈ st(x) + inf R ( R).More generally, given a natural number n ∈ N with n ≥ 1 we define st : Fin n R ( R) → R n , x = (x 1 , . . ., x n ) → st(x) := (st(x 1 ), . . ., st(x n )).Note that given x ∈ Fin n R ( R), the tuple st(x) ∈ R n is the unique one in R n such that x belongs to all its semialgebraic open neighborhoods defined over R.
Proof.Note first that if h(x) = r for some r ∈ R, then the statement is clear by setting s = 1, I 1 = I, f 1 = 0, c 1 = 0 and d 1 = r.Therefore, we may assume that h : I → R is not a constant function.So, by o-minimality we can assume that h : I → R is strictly monotone and C 1 .By Proposition 4. We first note that since J is defined over R alg we have where cl(−) denotes the topological closure.Since both I and J are open intervals defined over R, we obtain that (2) Assume c ∈ R with R < c.In this case we may assume that J is an interval of the form (j, +∞) for some j ∈ R alg .If I( R) denotes the R-points of I, we can consider the R-semialgebraic function which is also strictly monotone and C 1 .Recall that g(x) ∈ Fin R ( R) for every x ∈ I ∩ R alg = I( R) ∩ R alg .Considering the derivatives functions, we have that g ′ (x) = f ′ (x + c) for every x ∈ I ∩ R alg .
We distinguish two cases depending on whether the limit of f ′ (x) exists or not: But by assumption there must exists some non-negative δ ∈ R such that for all x ∈ R with x > δ we have that |f ′ (x)| > n.So, since x 0 + c > δ, we get |f ′ (x 0 + c)| > n, a contradiction.Once we have seen that |g ′ (x)| = |f ′ (x + c)| > R for every x ∈ I( R) ∩ Fin R ( R), we choose some x 1 , x 2 ∈ I ∩ R alg with x 1 < x 2 .We have that g(x 2 ), g(x 1 ) ∈ Fin R ( R).Now, by the mean value theorem there is an element x ∈ I( R) with x 1 < x < x 2 such that g(x 2 ) − g(x 1 ) = g ′ (x) • (x 2 − x 1 ).
Thus g ′ (x) ∈ Fin R ( R) for every x ∈ I( R)∩Fin R ( R) and we obtain that st(g ′ (x)) = ℓ, as claimed.Next, fix some x 1 ∈ I ∩ R alg .By the mean valued theorem, for every x 2 ∈ I ∩ R alg with x 1 < x 2 there is some element x ∈ I( R) such that x 1 < x < x 2 and g(x 2 ) − g(x 1 ) = g ′ (x) • (x 2 − x 1 ).
It then follows that the function k := h(x)−ℓ•x ∈ R is constant for every x ∈ I ⊂ R, and so h(x) = ℓ • x + k.Finally, we consider the semialgebraic function f : R → R given by x → ℓ • x, which is clearly defined over R alg .Hence, we obtain that h(x) = f (x + 0) + k for all x ∈ I, as required.
(3) Assume finally that c ∈ R with c < R.This case is a straightforward adaptation of the latter case.This finishes the proof.Remark 4.9.
(1) Note that if X ⊂ R m alg is an externally semialgebraic set then there is a saturated real closed field R and a semialgebraic subset Y ⊂ R m such that X = Y ∩ R m alg .Since we can assume that R contains the real field R, and types over R are definable, we deduce that Z := Y ∩ R m is a real semialgebraic set with X = Z ∩ R m alg .Thus, externally semialgebraic sets of R m alg are Boolean combinations of sets as in the statement of Proposition 4.8.
(2) The proof of Proposition 4.8 goes through for any o-minimal structure R alg whose universe is the field of real algebraic numbers R alg and such that it has an elementary extension R R alg whose universe is the real field R.
Finally, we prove: However, evaluating in any two distinct real algebraic numbers of I + c we deduce that π ∈ R alg , a blatant contradiction.Remark 4.11.It is possible to refine the above result in order to find a definably compact example.Indeed, consider G := (R 2 alg , +) and G 1 = [0, 1), + 1 2 where [0, 1) ⊂ R alg and + 1 denotes the sum mod 1.Note that the underlying definable set of G 1 is a definable subset of G, and therefore the (externally) definable subsets of G 1 are (externally) definable subsets of G.Note also that G 1 is definably compact and isomorphic to the quotient of G by Z × Z.Let X ⊂ G 1 be an externally definable subset such that X is a Boolean combination of d-definable in the sense of G 1 .We claim that X is a Boolean combination of d-definable in the sense of G. To ease the reading, we denote by M the field R alg and let M be an |M | + -saturated elementary extension of M .Assume first that C ⊂ G 1 is a d-definable in the sense of G 1 , and let us show that C is a Boolean combination of d-definable sets in the sense of G.By definition, C = (Z + 1 y) ∩ M for some M -definable set Z ⊂ G 1 ( M ) and y ∈ G 1 ( M ).We show for F := Z × Z ∩ (−2, 1) 2 that C = (Z + y) ∩ M + F ∩ [0, 1) 2 .
Theorem A (Corollary 3.4).Let M be an arbitrary structure.The Ellis semigroups S ext G (M ) and E(S G (M )) are canonically isomorphic if and only if every externally definable subset of G(M ) is a (positive) Boolean combination of d-definable sets.In Section 4 we then focus in the o-minimal context.Note that if the universe of M is the (Dedekind complete) real field R then S ext G (M ) = S G (M ).Therefore, to find an example where S ext G (M ) is not E(S G (M )) it is natural to consider either M an ℵ 0 -saturated o-minimal structure, or M = R alg .We prove the following result: Theorem B (Theorem 4.1 and 4.2, Corollary 4.10).Let M be an o-minimal structure and let G be a definable group.The following hold: i) If dim(G) = 1, then (S ext G (M ), * ) and (E(S G (M )), •) are naturally isomorphic as Ellis semigroups.ii) If M is an ℵ 0 -saturated expansion of a real closed field and G = (M 2 , +), then (S ext G (M ), * ) and (E(S G (M )), •) are not naturally isomorphic as Ellis semigroups.iii) If M is an expansion of the field R alg and G = (R 2 alg , +), then (S ext G (M ), * ) and (E(S G (M )), •) are not naturally isomorphic as Ellis semigroups.In addition, in Remark 4.11 we also construct an example of a definably compact group G for which (S ext G (M ), * ) and (E(S G (M )), •) are not naturally isomorphic as Ellis semigroups.

Corollary 2 . 11 .
Let A ⊂ B be two left-invariant Boolean subalgebras of P(G) such that B is d-closed.The following are equivalent: (1) The natural restriction r : S(B) ։ S(A d ) is an homeomorphism.(2) The map Λ : S(B) → E(S(A)), given by Λ(p) = ℓ A p , is an isomorphism of Ellis semigroups.(3) It holds that B = A d .Proof.Notice first that the natural restriction r : p → {X ∈ A d | X ∈ p} is welldefined, continuous and surjective.If in addition r is an homeomorphism, since any basic open set in S(B) is also closed, we deduce that such a basic open set is a finite union of basic open subsets of S(B) of the form [X] for X ∈ A d .In particular, it follows that B = A d .Hence, we obtain the equivalence between (1) and ( always an epimorphism of Ellis semigroups, by Proposition 2.10.Furthermore, we have: Corollary 3.4.The function Λ : S ext G (M ) → E(S G (M )), given by p → ℓ p , is an isomorphism of Ellis semigroups if and only if every externally definable subset of G(M ) is a (positive) Boolean combination of d-definable sets.Proof.Observe first that the complement of a d-definable set is again d-definable.So, a Boolean combination of d-definable sets is indeed a positive Boolean combination.Hence, we obtain the result by Lemma 3.3 and Corollary 2.11.4.Ellis envelopes in o-minimal structuresFix an o-minimal structure M and let G be a definable group.Throughout the section, we shall work within an |M | + -saturated elementary extension M of M .4.1.One-dimensional groups.In this setting, we state and prove the following: Theorem 4.1.Let G be a definably connected one-dimensional definable group.Then (S ext G (M ), * ) and (E(S G (M )), •) are naturally isomorphic as Ellis semigroups.

Theorem 4 . 2 .
Let M be a ℵ 0 -saturated o-minimal expansion of a real closed field, and let G = (M 2 , +).Then, the continuous function Λ :S ext G (M ) → E(S G (M ))is not an isomorphism of Ellis semigroups.

Proposition 4 . 5 .
Let M be an ℵ 0 -saturated o-minimal expansion of a real closed field.Let M be an |M | + -saturated extension of M and let e ∈ M be a realization of p id .The externally definable subset X = {(x, y) ∈ M 2 | 0 < x and 0 < y < e • x} of the additive group (M 2 , +) is not a Boolean combination of d-definable sets.

Proposition 4 . 8 .
Let R alg denote the field of real algebraic numbers with the field structure.Let I ⊂ R be an open interval and let h : I → R be a semialgebraic function.If the externally semialgebraic subsetX = {(x, y) ∈ (I ∩ R alg ) × R alg | y < h(x)}of the semialgebraic group (R 2 alg , +) is a Boolean combination of d-definable sets, then there are finitely many disjoint open subintervals I 1 , . . ., I s ⊂ I such that I \ (I 1 ∪ • • • ∪ I s ) is finite and for each i = 1, . . ., s there are a semialgebraic map f i : J i → R defined over R alg , with J i an open interval, and elements 4 and similarly as in the proof of Claim 1 of Proposition 4.5, we can further assume that there is a saturated real closed field extension R of R and a semialgebraic map f : J → R definable over R alg with J ⊂ R an open interval and c, d ∈ R such that I ∩ R alg ⊂ J − c andX = {(x, y) ∈ (I ∩ R alg ) × R alg | y < f (x + c) + d}.Again by o-minimality we can assume that f is strictly monotone and C 1 , as in Claim 2 of Proposition 4.5.Note that I ∩ R alg ⊂ J − c implies I ⊂ J − c, by density.Moreover, since h(x) ≡ R alg f (x + c) + d for all x ∈ I ∩R alg , we have that f (x+c)+d ∈ Fin R ( R) and so st(f (x+c)+d) = h(x) for all x ∈ I ∩ R alg .Note by monotonicity of f that we also have f (x + c) + d ∈ Fin R ( R) for all x ∈ I ⊂ R. Now, we distinguish three cases.(1) Assume c ∈ Fin R ( R), so clearly also d ∈ Fin R ( R). Set c ′ := st(c) and d ′ := st(d).
and so f (x + c ′ ) + d ′ = h(x) for all x ∈ I ∩ R alg .If the latter holds true, then we clearly obtain thath(x) = f (x + c ′ ) + d ′ for all x ∈ I ⊂ R, since both f |J∩R : J ∩ R → Rand h : I → R are continuous, as required.Fix x 0 ∈ I ∩ R alg and let U be a semialgebraic open neighborhood of f (x 0 + c ′ ) + d ′ defined over R. We must show that f (x 0 + c) + d ∈ U .Consider the semialgebraic map h : (J − x 0 ) × R → R, (y, z) → f (x 0 + y) + z which is continuous and defined over R alg .Thus, h−1 (U ) is an open semialgebraic set defined over R. Since (c ′ , d ′ ) ∈ h−1 (U ) and st(c, d) = (c ′ , d ′ ) we deduce that (c, d) ∈ h−1 (U ) and so f (x 0 + c) + d ∈ U .

Corollary 4 . 10 .
Let R alg be the field of real algebraic numbers and let G = (R 2 alg , +).The continuous map Λ :S ext G (R alg ) → E(S G (R alg )) is not an isomorphism.Proof.By Theorem 3.4 it is enough to show that the externally definable set{(x, y) ∈ R 2 alg | y < π • x} is not d-definable.Otherwise, by Proposition 4.8 there is an open interval I of R and there are a semialgebraic map f : J → R defined over R alg and some elements c, d ∈ R such that π • x = f (x + c) + d for all x ∈ I.In particular, setting z = x + c ∈ I + c we readily obtain f (z) = π • (z − c) − d = π • z − (π • c + d).
as required.In particular, if B is d-closed then A d ⊂ B.
p X for p ∈ S(A) and X ∈ A.