---
abstract:
- 'Let ${\ensuremath{\mathcal{R}}} ={\langle}{\mathbb{R}}, <, +, \cdot, \dots{\rangle}$ be an o-minimal expansion of the real field, and $P{\subseteq}{\mathbb{R}}$ a dense elementary substructure of ${\ensuremath{\mathcal{R}}}$ or a dense independent set. We prove that if $X{\subseteq}{\mathbb{R}}^n$ is definable in the pair ${\langle}{\ensuremath{\mathcal{R}}},  P{\rangle}$ and contains “many" algebraic points, then it is dense in an infinite semialgebraic set.'
- 'The Pila-Wilkie theorem states that if a set $X{\subseteq}{\mathbb{R}}^n$ is definable in an o-minimal structure R and contains ‘many’ rational points, then it contains an infinite semialgebraic set. In this paper, we extend this theorem to an expansion ${\widetilde{{\ensuremath{\mathcal{R}}}}}={\langle}{\ensuremath{\mathcal{R}}}, P{\rangle}$ of ${\ensuremath{\mathcal{R}}}$ by a dense set $P$, which is either an elementary substructure of ${\ensuremath{\mathcal{R}}}$, or it is independent, as follows. If $X$ is definable in ${\widetilde{{\ensuremath{\mathcal{R}}}}}$ and contains many rational points, then it is dense in an infinite semialgebraic set. Moreover, it contains an infinite set which is ${\ensuremath{\emptyset}}$-definable in ${\langle}\overline {\mathbb{R}}, P{\rangle}$, where $\overline {\mathbb{R}}$ is the real field.'
address: 'Department of Mathematics and Statistics, University of Konstanz, Box 216, 78457 Konstanz, Germany'
author:
- 'Pantelis E. Eleftheriou'
title: 'Counting algebraic points in expansions of o-minimal structures by a dense set'
---

[^1]

Introduction
============

Point counting theorems have recently occupied an important part of model theory, mainly due to their pivotal role in applications of o-minimality to number theory and Diophantine geometry. Arguably, the biggest breakthrough was the Pila-Wilkie theorem [@pw], which roughly states that if a definable set in an o-minimal structure contains “many” rational points, then it contains an infinite semialgebraic set. Pila employed this result together with the so-called Pila-Zannier strategy to give an unconditional proof of certain cases of the André-Oort Conjecture [@pila2]. An excellent survey on the subject is [@scanlon]. Although several strengthenings of these theorems have since been established within the o-minimal setting, the topic remains largely unexplored in more general tame settings. In this paper, we establish the first point counting theorems in tame expansions of o-minimal structures by a dense set. Recall that, for a set $X{\subseteq}{\mathbb{R}}^n$, the *algebraic part* $X^{alg}$ of $X$ is defined as the union of all infinite connected semialgebraic subsets of $X$. Pila in [@pila2], generalizing [@pw], proved that if a set $X$ is definable in an o-minimal structure, then $X{\setminus}X^{alg}$ contains “few" algebraic points of fixed degree (see definitions below and Fact \[pw\]). This statement immediately fails if one leaves the o-minimal setting. For example, the set ${\ensuremath{\mathcal{A}}}$ of algebraic points itself contains many algebraic points, but ${\ensuremath{\mathcal{A}}}^{alg}={\ensuremath{\emptyset}}$. However, adding ${\ensuremath{\mathcal{A}}}$ as a unary predicate to the language of the real field results in a well-behaved model theoretic structure, and it is desirable to retain point counting theorems in that setting. We achieve this goal by means of the following definition.

\[def-alg2\] Let $X{\subseteq}{\mathbb{R}}^n$. The *algebraic trace part* of $X$, denoted by $X^{alg}_{t}$, is the union of all traces of infinite connected semialgebraic sets in which $X$ is dense. That is, $$X^{alg}_t=\bigcup\{X\cap T: \text{$T{\subseteq}{\mathbb{R}}^n$  infinite connected semialgebraic, and $T{\subseteq}cl(X\cap T)$}\}.$$

The density requirement $T{\subseteq}cl(X\cap T)$ is essential: without it, we would always have $X_t^{alg}=X$, as witnessed by $T={\mathbb{R}}^n$.

We first show in Section \[sec-alg\] that the above notion is a natural generalization of the usual notion of the algebraic part of a set, in the following sense.

Suppose $X{\subseteq}{\mathbb{R}}^n$ is definable in an o-minimal expansion of the real field. Then $X^{alg}=X^{alg}_t$.

Then, in Sections \[sec-dense\] and \[sec-indep\], we establish point counting theorems in two main categories of tame structures that go beyond the o-minimal setting: dense pairs and expansions of o-minimal structures by a dense independent set. Indeed, we prove that if $X$ is a definable set in these settings, then $X{\setminus}X^{alg}_t$ contains few algebraic points of fixed degree (Theorem \[main\] below). We postpone a discussion about the general tame setting until later in this introduction, as we now proceed to fix our notation and state the precise theorem. Some familiarity with the basic notions of model theory, such as definability and elementary substructures, is assumed. The reader can consult [@vdd-book; @marker; @pila]. An example of an elementary substructure of the real field is the field ${\ensuremath{\mathcal{A}}}$ of algebraic numbers.

For the rest of this paper, and unless stated otherwise, we fix an o-minimal expansion ${\ensuremath{\mathcal{R}}}={\langle}{\mathbb{R}}, <, +, \cdot, \dots{\rangle}$ of the real field $\overline {\mathbb{R}}={\langle}{\mathbb{R}}, <, +, \cdot{\rangle}$, and let ${\ensuremath{\mathcal{L}}}$ be the language of ${\ensuremath{\mathcal{R}}}$. We fix an expansion $\widetilde{{\ensuremath{\mathcal{R}}}}={\langle}{\ensuremath{\mathcal{R}}}, P{\rangle}$ of ${\ensuremath{\mathcal{R}}}$ by a set $P{\subseteq}{\mathbb{R}}$, and let ${\ensuremath{\mathcal{L}}}(P)={\ensuremath{\mathcal{L}}}\cup \{P\}$ be the language of ${\widetilde{{\ensuremath{\mathcal{R}}}}}$. By ‘$A$-definable’ we mean ‘definable in ${\widetilde{{\ensuremath{\mathcal{R}}}}}$ with parameters from $A$’, and by ‘${\ensuremath{\mathcal{L}}}_A$-definable’ we mean ‘definable in R with parameters from $A$’. We omit the index $A$ if we do not want to specify the parameters. For a subset $A\subseteq {\mathbb{R}}$, we write ${\operatorname{dcl}}(A)$ for the definable closure of $A$ in ${\ensuremath{\mathcal{R}}}$, and ${\operatorname{dcl}}_{{\ensuremath{\mathcal{L}}}(P)}(A)$ for the definable closure in ${\widetilde{{\ensuremath{\mathcal{R}}}}}$. We call a set $X{\subseteq}{\mathbb{R}}$ *${\operatorname{dcl}}$-independent over $A$*, if for every $x\in X$, $x\not\in {\operatorname{dcl}}((X{\setminus}\{x\}) \cup A)$, and simply *${\operatorname{dcl}}$-independent* if it is ${\operatorname{dcl}}$-independent over ${\ensuremath{\emptyset}}$. An example of a ${\operatorname{dcl}}$-independent set in the real field is a transcendence basis over ${\mathbb{Q}}$.

Following [@pila], we define the *(multiplicative) height* $H(\alpha)$ of an algebraic point $\alpha$ as $H(\alpha)=\exp h(\alpha),$ where $h(\alpha)$ is the *absolute logarithmic height* from [@bg page 16]. For a set $X{\subseteq}{\mathbb{R}}^n$, $k\in {\mathbb{Z}}^{>0}$ and $T\in{\mathbb{R}}^{>1}$, we define $$X(k, T)=\{(\alpha_1, \dots, \alpha_n)\in X: \max_i[{\mathbb{Q}}(\alpha_i):{\mathbb{Q}}]\le k, \max_i H(\alpha_i)\le T\}$$ and $$N_k(X, T)=\# X(k, T).$$ We say that *$X$ has few algebraic points* if for every $k\in {\mathbb{Z}}^{>0}$ and $\epsilon\in {\mathbb{R}}^{>0}$, $$N_k(X, T) = O_{X, k, \epsilon}(T^{\epsilon}).$$ We say that it *has many algebraic points*, otherwise.

Our main result is the following.

\[main\] Suppose ${\ensuremath{\mathcal{R}}}={\langle}{\mathbb{R}}, <, +, \cdot, \dots{\rangle}$ is an o-minimal expansion of the real field, and $P{\subseteq}R$ a dense set such that one of the following two conditions holds:

1.  $P{\preccurlyeq}{\ensuremath{\mathcal{R}}}$ is an elementary substructure.

2.  $P$ is a ${\operatorname{dcl}}$-independent set.

Let $X{\subseteq}{\mathbb{R}}^n$ be definable in ${\widetilde{{\ensuremath{\mathcal{R}}}}}={\langle}{\ensuremath{\mathcal{R}}}, P{\rangle}$. Then $X{\setminus}X^{alg}_t$ has few algebraic points.

Note that if ${\ensuremath{\mathcal{R}}}=\overline {\mathbb{R}}$, Theorem \[main\] is trivial. Indeed, in both cases (A) and (B), if $X$ is a definable set, then $cl(X)$ is ${\ensuremath{\mathcal{L}}}$-definable ([@egh Section 2]). So, in this case, $cl(X)$ is semialgebraic and hence $X^{alg}_t=X$. In fact, whenever ${\widetilde{{\ensuremath{\mathcal{R}}}}}={\langle}\overline {\mathbb{R}}, P{\rangle}$ satisfies Assumption III from [@egh], the conclusion of Theorem \[main\] holds. An example of such ${\widetilde{{\ensuremath{\mathcal{R}}}}}$ is an expansion of the real field by a multiplicative group with the Mann property.\
The contrapositive of Theorem \[main\] implies that if a definable set contains many algebraic points, then it is dense in an infinite semialgebraic set. We strengthen this result as follows.

\[thm-cor\] Let $X$ be as in Theorem \[main\]. If $X$ has many algebraic points, then it contains an infinite set $Y$ which is ${\ensuremath{\emptyset}}$-definable in ${\langle}\overline {\mathbb{R}}, P{\rangle}$.

Note that such $X$ is dense in $cl(Y)$, which is semialgebraic by [@egh Section 2].

A few words about the general tame setting are in order. As o-minimality can only be used to model phenomena that are locally finite, many authors have early on sought expansions of o-minimal structures which escape from the o-minimal context, yet preserve the tame geometric behavior on the class of all definable sets. These expansions have recently seen significant growth ([@bz; @beg; @bh; @dms1; @vdd-dense; @dg; @gh; @ms]) and are by now divided into two important categories of structures: those where every open definable set is already definable in the o-minimal reduct and those where an infinite discrete set is definable. Cases (A) and (B) from Theorem \[main\] belong to the first category. Further examples of this sort can be found in [@dms1] and [@egh]. Certain point counting theorems in the second category have recently appeared in [@cm]. In both categories, sharp *cone decomposition theorems* are by now at our disposal ([@egh] and [@tycho]), in analogy with the cell decomposition theorem known for o-minimal structures. Expansions ${\ensuremath{\mathcal{R}}}$ of type (A) are called *dense pairs* and were first studied by van den Dries in [@vdd-dense], whereas expansions of type (B) were recently introduced by Dolich-Miller-Steinhorn in [@dms2]. These two examples are representative of the first category and are often thought of as “orthogonal" to each other, mainly because in the former case ${\operatorname{dcl}}({\ensuremath{\emptyset}}){\subseteq}P$, whereas in the latter, ${\operatorname{dcl}}({\ensuremath{\emptyset}})\cap P={\ensuremath{\emptyset}}$. This orthogonality is vividly reflected in our proof of Theorem \[main\]. Indeed, since the set ${\ensuremath{\mathcal{A}}}$ of algebraic points is contained in ${\operatorname{dcl}}({\ensuremath{\emptyset}})$, we have ${\ensuremath{\mathcal{A}}}{\subseteq}P$ in the case of dense pairs and ${\ensuremath{\mathcal{A}}}\cap P={\ensuremath{\emptyset}}$ in the case of dense independent sets. Based on this observation, the proof for (A) becomes almost immediate, assuming facts from [@vdd-dense], whereas the proof for (B) makes an essential use of the aforementioned cone decomposition theorem from [@egh].

The current work provides an extension of the influential Pila-Wilkie theorem to the above two settings. The next step is, of course, to explore any potential applications to number theory and Diophantine geometry. Even though it is currently unclear whether the exact setting of Theorem \[main\] will yield any, the machinery used in our proofs is also available in other settings, or it may be possible to develop therein. Two far reaching generalizations of our two settings are lovely pairs [@bv1] and $H$-structures [@bv2], respectively. Those settings can also accommodate structures coming from geometric stability theory, such as pairs of algebraically closed fields, or $SU$-rank 1 structures, and point counting theorems in them are wildly unknown.

.2cm **Notation.** The topological closure of a set $X{\subseteq}{\mathbb{R}}^n$ is denoted by $cl(X).$ If $X, Z{\subseteq}{\mathbb{R}}^n$, we call $X$ dense in $Z$, if $Z{\subseteq}cl(X\cap Z)$. Given any subset $X\subseteq {\mathbb{R}}^m \times {\mathbb{R}}^n$ and $a\in {\mathbb{R}}^m$, we write $X_a$ for $$\{ b \in {\mathbb{R}}^n \ : \ (a, b) \in X\}.$$ If $m\le n$, then $\pi_m:{\mathbb{R}}^n\to {\mathbb{R}}^m$ denotes the projection onto the first $m$ coordinates. We write $\pi$ for $\pi_{n-1}$, unless stated otherwise. A family ${\ensuremath{\mathcal{J}}}=\{J_g\}_{g\in S}$ of sets is called definable if $\bigcup_{g\in S}\{g\}\times J_g$ is definable. We often identify ${\ensuremath{\mathcal{J}}}$ with $\bigcup_{g\in S}\{g\}\times J_g$. If $X, Y \subseteq {\mathbb{R}}$, we sometimes write $XY$ for $X\cup Y$. By ${\ensuremath{\mathcal{A}}}$ we denote the set of real algebraic points. If $M{\subseteq}{\mathbb{R}}$, by $M {\preccurlyeq}{\ensuremath{\mathcal{R}}}$ we mean that $M$ is an elementary substructure of ${\ensuremath{\mathcal{R}}}$ in the language of ${\ensuremath{\mathcal{R}}}$.

$ $\
**Acknowledgments.** The author wishes to thank Gal Binyamini, Chris Miller, Ya’acov Peterzil, Jonathan Pila, Patrick Speissegger, Pierre Villemot and Alex Wilkie for several discussions on the topic, and the Fields Institute for its generous support and hospitality during the Thematic Program on Unlikely Intersections, Heights, and Efficient Congruencing, 2017.

The algebraic trace part of a set {#sec-alg}
=================================

In this section, we introduce the notion of the *algebraic trace part* of a set, and prove that it generalizes the notion of the algebraic part of a set definable in an o-minimal structure. We also state a version of Pila’s theorem [@pila], Fact \[pw\] below, suitable for our purposes.

The proof of Theorem \[main\], in both cases (A) and (B), is by reducing it to Pila’s theorem, Fact \[pw\] below. The formulation of that fact involves a refined version of the usual algebraic part of a set, which prompts the following definitions.

Let $A{\subseteq}{\mathbb{R}}$ be a set. An *$A$-set* is an infinite connected semialgebraic set definable over $A$. If it is, in addition, a cell, we call it an *$A$-cell*.

We are mainly interested in ${\mathbb{Q}}$-sets. One important observation is that the set ${\ensuremath{\mathcal{A}}}$ of algebraic points is dense in every ${\mathbb{Q}}$-set. This fact will be crucial in the proofs of Lemma \[dense1\] and Theorem \[main-indep\] below.

\[def-alg1\] Let $X{\subseteq}{\mathbb{R}}^n$ and $A{\subseteq}{\mathbb{R}}$. The *algebraic part of $X$ over $A$*, denoted by $X^{alg_A}$, is the union of all $A$-subsets of $X$. That is, $$X^{alg_A}=\bigcup\{T{\subseteq}X : T \text{ is an $A$-set}\}.$$

It is an effect of the proof in [@pila] that the following statement holds.

\[pw\] Let $X{\subseteq}{\mathbb{R}}^n$ be ${\ensuremath{\mathcal{L}}}$-definable. Then $X{\setminus}X^{alg_{\mathbb{Q}}}$ has few algebraic points.

Let us now also refine Definition \[def-alg2\] from the introduction, as follows.

\[def-alg2b\] Let $X{\subseteq}{\mathbb{R}}^n$ and $A{\subseteq}{\mathbb{R}}$. The *algebraic trace part of $X$ over $A$*, denoted by $X^{alg_A}_t$ is the union of all traces of $A$-sets in which $X$ is dense. That is, $$X^{alg_A}_t=\bigcup\{X\cap T: \text{$T$  an $A$-set, $X$  dense in $T$}\}$$

$ $

\(1) An ${\mathbb{R}}$-set is exactly an infinite connected semialgebraic set. Also, $X^{alg_{\mathbb{R}}}=X^{alg}$ and $X^{alg_{\mathbb{R}}}_t=X^{alg}_t$.

\(2) In Theorems \[main-dense\] and \[main-indep\] below, we prove Theorem \[main\] after replacing $X^{alg}_t$ by $X^{alg_{\mathbb{Q}}}_t$. Since the latter set is contained in the former, these are stronger statements.

\[alternative\] An alternative expression for $X^{alg_A}_t$ is the following: $$X^{alg_A}_t=\bigcup\{Y{\subseteq}X: \text{$cl(Y)$ is  an $A$-set}\}.$$ ${\subseteq}$. Let $T$ be an $A$-set such that $X$ is dense in $T$. Set $Y=X\cap T{\subseteq}X$. Then $T{\subseteq}cl(Y){\subseteq}cl(T)$, and hence $cl(Y)=cl(T)$ is an $A$-set, as required.

$\supseteq$. Let $Y{\subseteq}X$ such that $cl(Y)$ is an $A$-set. Set $T=cl(Y)$. Then $Y{\subseteq}X\cap T$ and $T{\subseteq}cl(X\cap T)$, as required.

The goal of this section is to prove the following proposition. This result is not essential for the rest of the paper, but we include it here as it provides canonicity of our definitions. Observe also that it is independent of the expansion ${\widetilde{{\ensuremath{\mathcal{R}}}}}$ of ${\ensuremath{\mathcal{R}}}$ we consider.

\[alg12\] Let $X{\subseteq}{\mathbb{R}}^n$ be an ${\ensuremath{\mathcal{L}}}$-definable set. Then $$X^{alg}=X^{alg}_t.$$

The main idea for proving $(\supseteq)$ is as follows. Let $Z$ be an ${\mathbb{R}}$-set with $Z{\subseteq}cl(Z\cap X)$. We need to prove that every point $x\in Z\cap X$ is contained in an ${\mathbb{R}}$-set $W$ contained in $X$. If one applies cell decomposition directly to $Z\cap X$, then the resulting cells need not be semialgebraic, as $X$ is not. So we apply cell decomposition only to $Z$, deriving an ${\mathbb{R}}$-cell $Z_0{\subseteq}Z$ with $x\in cl(Z_0)$ and of maximal dimension. We then show that close enough to $x$, the set $T=Z_0{\setminus}X$ has dimension strictly smaller than $\dim Z_0$. We use Lemma \[BZ\] to express this fact properly. Finally, by Lemma \[clZT2\], we find an ${\mathbb{R}}$-set $W_0{\subseteq}Z_0{\setminus}T$ with $x\in {\operatorname{cl}}(W_0)$. We set $W=W_0\cup \{x\}$.

The first lemma asserts that, under certain assumptions, the property of being dense in a set passes to suitable subsets.

\[denseZ0\] Let $X, Z{\subseteq}{\mathbb{R}}^n$ be ${\ensuremath{\mathcal{L}}}$-definable sets, with $Z{\subseteq}cl(Z\cap X)$. Suppose that $Z_0{\subseteq}Z$ is a cell with $\dim Z_0 =\dim Z$. Then $Z_0{\subseteq}cl(Z_0\cap X)$.

Let $x\in Z_0$, and suppose towards a contradiction that $x\not\in cl(Z_0\cap X)$. Then there is an open box $B{\subseteq}{\mathbb{R}}^n$ containing $x$ such that $B\cap Z_0\cap X={\ensuremath{\emptyset}}$. It follows that for every $x'\in B\cap Z_0$, $x'\not\in cl(Z_0\cap X)$. Since $Z{\subseteq}cl(Z\cap X)$, $$B\cap Z_0{\subseteq}cl((Z{\setminus}Z_0)\cap X){\subseteq}cl(Z{\setminus}Z_0)$$ and, hence, $$B\cap Z_0{\subseteq}cl(Z{\setminus}Z_0){\setminus}(Z{\setminus}Z_0),$$ and thus $\dim(B\cap Z_0)<\dim(Z{\setminus}Z_0)$. Moreover, since $Z_0$ is a cell and $B\cap Z_0\ne {\ensuremath{\emptyset}}$, $\dim(Z_0)=\dim (B\cap Z_0)$. All together, $$\dim(Z_0)<\dim (Z{\setminus}Z_0)\le \dim Z,$$ a contradiction.

We will need a local version of Lemma \[denseZ0\]. First, a definition.

Let $Z{\subseteq}{\mathbb{R}}^n$ be an ${\ensuremath{\mathcal{L}}}$-definable set and $x\in Z$. The *local dimension of $Z$ at $x$* is defined to be $$\dim_x(Z)=\min \{\dim (B\cap Z):\text{ $B{\subseteq}{\mathbb{R}}^n$ an open box containing $x$}\}.$$

\[BZ\] Let $X, Z{\subseteq}{\mathbb{R}}^n$ be infinite ${\ensuremath{\mathcal{L}}}$-definable sets with $Z{\subseteq}cl(Z\cap X)$, and $x\in Z$. Suppose $Z_0{\subseteq}Z$ is an ${\mathbb{R}}$-cell with $\dim_x(Z)=\dim Z_0$ and $x\in cl(Z_0)$. Then there is an open box $B{\subseteq}{\mathbb{R}}^n$ containing $x$, such that $B\cap Z_0{\subseteq}cl(Z_0\cap X)$. Moreover, $B\cap Z_0$ is an ${\mathbb{R}}$-cell.

Let $Z{\setminus}Z_0=Z_1\cup \dots  \cup Z_m$ be a decomposition into cells. It is not hard to see from the definition of $\dim_x(Z)$, that there is an open box $B{\subseteq}{\mathbb{R}}^n$ containing $x$, such that for every $1 \le i\le m$, if $B\cap Z_i\ne {\ensuremath{\emptyset}}$, then $\dim_x(Z) \ge \dim B\cap Z_i$. We may shrink $B$ if needed so that $B\cap Z_0$ becomes an ${\mathbb{R}}$-cell. Let $I$ be the set of indices $1\le i\le m$ such that $B\cap Z_i\ne {\ensuremath{\emptyset}}$. Set $$Z':=B\cap Z.$$ Since $Z{\subseteq}cl(Z\cap X)$, we easily obtain that $Z'{\subseteq}cl(Z'\cap X)$. Moreover, since $x\in cl(Z)$, we have $$Z' =(B\cap Z_0)\cup \bigcup_{i\in I} (B\cap Z_i),$$ and hence $\dim Z'=\dim (B\cap Z_0)$. Therefore, by Lemma \[denseZ0\] (for $Z'$ and $B\cap Z_0{\subseteq}Z'$), $$B\cap Z_0{\subseteq}cl(B\cap Z_0\cap X){\subseteq}cl(Z_0\cap X),$$ as needed.

We also need the following lemma.

\[clZT2\] Let $Z{\subseteq}{\mathbb{R}}^n$ be an ${\mathbb{R}}$-cell, $T{\subseteq}Z$ a definable set, and $x\in cl(Z){\setminus}T$. Suppose that $\dim T<\dim Z$. Then there is an ${\mathbb{R}}$-set $W{\subseteq}Z{\setminus}T$ with $x\in cl(W)$.

We work by induction on $n>0$. For $n=0$, it is trivial. Let $n>0$. We split into two cases:

Case I: $\dim Z=n$. Since $\dim T< \dim Z$, it follows easily, by cell decomposition, that there is a line segment $W{\subseteq}Z$ with initial point $x$, staying entirely outside $T$.

Case II: $\dim Z=k< n$. Let $\pi:{\mathbb{R}}^n\to {\mathbb{R}}^k$ be a suitable coordinate projection such that $\pi_{{\ensuremath{\upharpoonright}}Z}$ is injective. Then $\pi(Z)$ is an ${\mathbb{R}}$-cell, $\pi(T){\subseteq}\pi(Z)$, $\dim \pi(T)< \dim \pi(Z)$ and $\pi(x)\in cl(\pi(Z))$. By inductive hypothesis, there is an ${\mathbb{R}}$-set $W_1{\subseteq}\pi(Z){\setminus}\pi(T)$, such that $\pi(x)\in cl(W_1)$. Let $$W=\pi^{-1}(W_1)\cap Z.$$ Then $W$ is clearly an ${\mathbb{R}}$-set with $W{\subseteq}Z{\setminus}T$, and it is also easy to check that $x\in cl(W)$.

We are now ready to prove Proposition \[alg12\].

We need to show $X^{alg}_t{\subseteq}X^{alg}$. Let $Z$ be an ${\mathbb{R}}$-set with $Z{\subseteq}cl(Z\cap X)$. We need to prove that every point $x\in Z\cap X$ is contained in an ${\mathbb{R}}$-set $W$ contained in $X$. By cell decomposition in the real field, there is a semialgebraic cell $Z_0{\subseteq}Z$ over $A$, such that $\dim_x(Z)=\dim Z_0$ and $x\in cl(Z_0)$. By Lemma \[BZ\], there is an open box $B{\subseteq}{\mathbb{R}}^n$ containing $x$, such that $B\cap Z_0$ is an ${\mathbb{R}}$-cell and $B\cap Z_0{\subseteq}cl(Z_0\cap X)$. Let $$T=(B\cap Z_0){\setminus}(Z_0\cap X){\subseteq}cl(Z_0\cap X){\setminus}(Z_0\cap X).$$ Then $$\dim T < \dim (Z_0\cap X)\le \dim Z_0=\dim (B\cap Z_0).$$ Also, $x\in Z{\setminus}T$. Therefore, by Lemma \[clZT2\] (for $Z=B\cap Z_0$), there is an ${\mathbb{R}}$-set $W_0{\subseteq}(B\cap Z_0){\setminus}T$ with $x\in cl(W_0)$. But $$(B\cap Z_0) {\setminus}T=B\cap Z_0\cap X,$$ so $W_0{\subseteq}X$. Since $x\in cl(W_0)$, the set $W=W_0\cup \{x\}$ is connected, and hence the desired ${\mathbb{R}}$-set.

\[XalgQ\] If we specify parameters in Proposition \[alg12\], then the proposition need not be true. Indeed $$X^{alg_{\mathbb{Q}}}\ne X^{alg_{\mathbb{Q}}}_t.$$ For example, fix a ${\operatorname{dcl}}$-independent tuple $a=(a_1, a_2)\in {\mathbb{R}}^2$, and let $$X={\mathbb{R}}^2{\setminus}\{(a_1, y): y>a_2\}.$$ Then $a\in X{\subseteq}X^{alg_{\mathbb{Q}}}_t$, since $cl(X)={\mathbb{R}}^2$ is a ${\mathbb{Q}}$-set. However, $a\not\in X^{alg_{\mathbb{Q}}}$. Indeed, no open box around $a$ can be contained in $X$. Hence if $a\in X^{alg_{\mathbb{Q}}}$, there must be some $1$-dimensional semialgebraic set over ${\ensuremath{\emptyset}}$ that contains $a$, contradicting the ${\operatorname{dcl}}$-independence of $a$. Note that in the proof of Proposition \[alg12\], unless $x\in {\operatorname{dcl}}({\ensuremath{\emptyset}})$, we cannot conclude that $W$ is semialgebraic over ${\ensuremath{\emptyset}}$.

We do not know whether $X^{alg_A}=X^{alg_A}_t$ is true if $X$ is $A$-definable.

The proof of Proposition \[alg12\] uses nothing in particular about the real field. In other words, if we fix an expansion ${\widetilde{{\ensuremath{\mathcal{M}}}}}$ of any real closed field ${\ensuremath{\mathcal{M}}}$, and define the notions of $X^{alg}$ and $X^{alg}_t$ in the same way as in the introduction after replacing ‘semialgebraic’ by ‘M-definable’, and ‘connected’ by ‘M-definably connected’, then for every M-definable set $X$, we have $X^{alg}=X^{alg}_t$.

We conclude this section with an easy fact.

\[union\] Let $X, Y{\subseteq}{\mathbb{R}}^n$ be two definable sets.

1.  If $X{\subseteq}Y$, then $X^{alg_{\mathbb{Q}}}_t{\subseteq}Y^{alg_{\mathbb{Q}}}_t$.

2.  \(a) If $X{\subseteq}Y$ and $Y$ has few algebraic points, then so does $X$.

    \(b) If $X$ and $Y$ have few algebraic points, then so does $X\cup Y$.

3.  If $X{\setminus}X^{alg_{\mathbb{Q}}}_t$ and $Y{\setminus}Y^{alg_{\mathbb{Q}}}_t$ have few algebraic points, then so does $(X\cup Y) {\setminus}(X\cup Y)^{alg_{\mathbb{Q}}}_t $.

\(1) and (2) are obvious. For (3), we have: $$(X\cup Y) {\setminus}(X\cup Y)^{alg_{\mathbb{Q}}}_t {\subseteq}(X{\setminus}(X\cup Y)^{alg_{\mathbb{Q}}}_t) \cup (Y{\setminus}(X\cup Y)^{alg_{\mathbb{Q}}}_t){\subseteq}(X{\setminus}X^{alg_{\mathbb{Q}}}_t)\cup (Y{\setminus}Y^{alg_{\mathbb{Q}}}_t),$$ and we are done by (2).

Dense pairs {#sec-dense}
===========

In this section, we let ${\widetilde{{\ensuremath{\mathcal{R}}}}}={\langle}{\ensuremath{\mathcal{{\mathbb{R}}}}}, P{\rangle}$ be a dense pair. As mentioned in the introduction, since $P{\preccurlyeq}{\ensuremath{\mathcal{R}}}$, we have ${\ensuremath{\mathcal{A}}}{\subseteq}{\operatorname{dcl}}({\ensuremath{\emptyset}}){\subseteq}P$. In this setting, Theorem \[thm-cor\] has a short and illustrative proof, and we include it first.

For every definable set $X$, if $X$ has many algebraic points, then it contains an infinite set which is ${\ensuremath{\emptyset}}$-definable in ${\langle}\overline {\mathbb{R}}, P{\rangle}$.

Since ${\ensuremath{\mathcal{A}}}{\subseteq}P$, $X\cap P^n$ also contains many algebraic points. By [@vdd-dense Theorem 2], there is an ${\ensuremath{\mathcal{L}}}$-definable $Y{\subseteq}{\mathbb{R}}^n$, such that $X=Y \cap P^n$. So $Y$ also contains many algebraic points. By Fact \[pw\], there is a ${\mathbb{Q}}$-set $Z{\subseteq}Y$. Then the set $Z\cap P^n$ is ${\ensuremath{\emptyset}}$-definable in ${\langle}\overline {\mathbb{R}}, P{\rangle}$ and it is contained in $Y\cap P^n=X$. Since the set of algebraic points ${\ensuremath{\mathcal{A}}}^n$ is dense in $Z$, we have $Z{\subseteq}cl(Z\cap {\ensuremath{\mathcal{A}}}^n){\subseteq}cl(Z\cap P^n)$, and hence $Z\cap P^n$ is infinite.

We now proceed to the proof of Theorem \[main\].

\[dense1\] Let $X=Y\cap P^n$, for some ${\ensuremath{\mathcal{L}}}$-definable set $Y{\subseteq}{\mathbb{R}}^n$. Then $$X\cap Y^{alg_{\mathbb{Q}}}{\subseteq}X^{alg_{\mathbb{Q}}}_t.$$

Let $x\in X\cap Y^{alg_{\mathbb{Q}}}$. So $x$ is contained in a ${\mathbb{Q}}$-set $Z{\subseteq}Y$. We prove that $X$ is dense in $Z$. Observe that $Z\cap X= Z\cap P^n$. Since ${\ensuremath{\mathcal{A}}}^n{\subseteq}P^n$, we have $$Z{\subseteq}cl(Z\cap {\ensuremath{\mathcal{A}}}^n){\subseteq}cl(Z\cap P^n)= cl(Z\cap X),$$ and hence $X$ is dense in $Z$.

\[main-dense\] For every definable set $X$, $X{\setminus}X^{alg_{\mathbb{Q}}}_t$ has few algebraic points.

Let $k\in {\mathbb{Z}}^{>0}$ and $\epsilon\in {\mathbb{R}}^{>0}$. We first observe that if the statement holds for $X\cap P^n$, then it holds for $X$. Of course, $X{\setminus}X^{alg_{\mathbb{Q}}}_t{\subseteq}X{\setminus}(X\cap P^n)^{alg_{\mathbb{Q}}}_t$. Since ${\ensuremath{\mathcal{A}}}^n{\subseteq}P^n$, the set $X$ has the same algebraic points as $X\cap P^n$, and hence if $(X\cap P^n){\setminus}(X\cap P^n)^{alg_{\mathbb{Q}}}_t$ has few algebraic points, then so does $X{\setminus}(X\cap P^n)^{alg_{\mathbb{Q}}}_t$, and therefore also $X{\setminus}X^{alg_{\mathbb{Q}}}_t$.

We may thus assume that $X{\subseteq}P^n$. By [@vdd-dense Theorem 2], there is an ${\ensuremath{\mathcal{L}}}$-definable $Y{\subseteq}{\mathbb{R}}^n$, such that $X=Y \cap P^n$. By Fact \[pw\], $Y{\setminus}Y^{alg_{\mathbb{Q}}}$ has few algebraic points. By Lemma \[dense1\], $$X\cap Y^{alg_{\mathbb{Q}}}{\subseteq}X^{alg_{\mathbb{Q}}}_t.$$ Hence $$X{\setminus}X^{alg_{\mathbb{Q}}}_t{\subseteq}X{\setminus}Y^{alg_{\mathbb{Q}}}{\subseteq}Y{\setminus}Y^{alg_{\mathbb{Q}}}$$ has few algebraic points.

Dense independent sets {#sec-indep}
======================

In this section, $P{\subseteq}{\mathbb{R}}$ is a dense ${\operatorname{dcl}}$-independent set. The proof of Theorem \[main-indep\] runs by induction on the *large dimension* of a definable set $X$ (Definition \[def-large\]), by making use of the *cone decomposition theorem* from [@egh] (Fact \[def-cone\]). As mentioned in the introduction, since $P$ contains no elements in ${\operatorname{dcl}}({\ensuremath{\emptyset}})$, we have $P\cap {\ensuremath{\mathcal{A}}}={\ensuremath{\emptyset}}$. The base step of the aforementioned induction is to show a generalization of this fact; namely, that for a *small* set $X$ (Definition \[def-small\]), $X\cap {\ensuremath{\mathcal{A}}}$ is finite (Corollary \[smallA\]).

Cone decomposition theorem {#sec-cone}
--------------------------

In this subsection we recall all necessary background from [@egh]. The following definition is taken essentially from [@dg].

\[def-small\] Let $X{\subseteq}{\mathbb{R}}^n$ be a definable set. We call $X$ *large* if there is some $m$ and an ${\ensuremath{\mathcal{L}}}$-definable function $f:{\mathbb{R}}^{nm}\to {\mathbb{R}}$ such that $f(X^m)$ contains an open interval in ${\mathbb{R}}$. We call $X$ *small* if it is not large.

The notion of a cone is based on that of a supercone, which in its turn generalizes the notion of being co-small in an interval. Both supercones and cones are unions of special families of sets, which not only are definable, but they are so in a very uniform way. Although this uniformity is not fully exploited in this paper, we include it here to match the definitions from [@egh].

\[def-supercone\] A *supercone* $J{\subseteq}{\mathbb{R}}^k$, $k\ge 0$, and its *shell* $sh(J)$ are defined recursively as follows:

-   ${\mathbb{R}}^{0}=\{0\}$ is a supercone, and $sh({\mathbb{R}}^{0})={\mathbb{R}}^{0}$.

-   A definable set $J{\subseteq}{\mathbb{R}}^{n+1}$ is a supercone if $\pi(J){\subseteq}{\mathbb{R}}^n$ is a supercone and there are ${\ensuremath{\mathcal{L}}}$-definable continuous $h_1, h_2: sh(\pi(J))\to {\mathbb{R}}\cup \{\pm\infty\}$ with $h_1<h_2$, such that for every $a\in \pi(J)$, $J_a$ is contained in $(h_1(a), h_2(a))$ and it is co-small in it. We let $sh(J)=(h_1, h_2)_{sh(\pi(J))}$.

Note that, $sh(J)$ is an open cell in ${\mathbb{R}}^k$ and $cl(sh(J))=cl(J)$.

Recall that in our notation we identify a family ${\ensuremath{\mathcal{J}}}=\{J_g\}_{g\in S}$ with $\bigcup_{g\in S}\{g\}\times J_g$. In particular, $cl({\ensuremath{\mathcal{J}}})$ and $\pi_n({\ensuremath{\mathcal{J}}})$ denote the closure and a projection of that set, respectively.

\[def-uniform\] Let ${\ensuremath{\mathcal{J}}} = \bigcup_{g\in S} \{g\}\times J_g{\subseteq}{\mathbb{R}}^{m+k}$ be a definable family of supercones. We call ${\ensuremath{\mathcal{J}}}$ *uniform* if there is a cell $V{\subseteq}{\mathbb{R}}^{m+k}$ containing ${\ensuremath{\mathcal{J}}}$, such that for every $g\in S$ and $0<j\le k$, $$cl(\pi_{m+j}({\ensuremath{\mathcal{J}}})_g)=cl(\pi_{m+j}(V)_g).$$ We call such a $V$ a *shell* for ${\ensuremath{\mathcal{J}}}$.

A shell for a uniform family of supercones ${\ensuremath{\mathcal{J}}}$ need not be unique. Also, one can identify a supercone $J{\subseteq}{\mathbb{R}}^k$ with a uniform family of supercones ${\ensuremath{\mathcal{J}}}{\subseteq}M^{m+k}$ with $\pi_m({\ensuremath{\mathcal{J}}})$ a singleton; in that case, a shell for ${\ensuremath{\mathcal{J}}}$ is unique and equals that of $J$.

\[def-cone\] A set $C{\subseteq}{\mathbb{R}}^n$ is a *$k$-cone*, $k\ge 0$, if there are a definable small $S{\subseteq}{\mathbb{R}}^m$, a uniform family ${\ensuremath{\mathcal{J}}}=\{J_g\}_{g\in S}$ of supercones in ${\mathbb{R}}^k$, and an ${\ensuremath{\mathcal{L}}}$-definable continuous function $h:V \subseteq {\mathbb{R}}^{m+k}\to {\mathbb{R}}^n$, where $V$ is a shell for ${\ensuremath{\mathcal{J}}}$, such that

1.  $C=h({\ensuremath{\mathcal{J}}})$, and

2.  for every $g\in S$, $h(g, -): V_g{\subseteq}{\mathbb{R}}^k\to {\mathbb{R}}^n$ is injective.

We call $C$ a *$k$-$H$-cone* if, in addition, $S{\subseteq}P^m$ and $h:{\ensuremath{\mathcal{J}}}\to {\mathbb{R}}^n$ is injective. An *($H$-)cone* is a $k$-($H$-)cone for some $k$.

The cone decomposition theorem [@egh Theorem 5.1] is a statement about definable sets and functions. Here we are only interested in a decomposition of sets into $H$-cones. Before stating the *$H$-cone decomposition theorem*, we need the following fact.

\[cp\] Let $S{\subseteq}{\mathbb{R}}^n$ be an $A$-definable small set. Then $S$ is a finite union of sets of the form $f(X)$, where

-   $f:Z{\subseteq}{\mathbb{R}}^m\to {\mathbb{R}}^n$ is an ${\ensuremath{\mathcal{L}}}_A$-definable continuous map,

-   $X{\subseteq}P^m\cap Z$ is $A$-definable, and

-   $f: X\to {\mathbb{R}}^l$ is injective.

By [@egh Lemma 3.11], there is an ${\ensuremath{\mathcal{L}}}_A$-definable map $h:{\mathbb{R}}^m\to {\mathbb{R}}^n$ such that $X{\subseteq}h(P^m)$. The result follows from [@egh2 Theorem 2.2].

\[fact-cone\] Let $X{\subseteq}{\mathbb{R}}^n$ be an $A$-definable set. Then $X$ is a finite union of $A$-definable $H$-cones.

By [@egh Theorem 5.12] and [@egh2 Theorem 2.2], $X$ is a finite union of $A$-definable cones $h({\ensuremath{\mathcal{J}}})$ with $h:{\ensuremath{\mathcal{J}}}\to {\mathbb{R}}^n$ injective (such $h({\ensuremath{\mathcal{J}}})$ is called *strong cone* in the above references). By Fact \[cp\], it is not hard to see that $h({\ensuremath{\mathcal{J}}})$ is a finite union of $A$-definable $H$-cones.

We next recall the notion of ‘large dimension’ from [@egh].

\[def-large\] Let $X{\subseteq}{\mathbb{R}}^n$ be definable. If $X\ne \emptyset$, the *large dimension* of $X$ is the maximum $k\in {\ensuremath{\mathbb{N}}}$ such that $X$ contains a $k$-cone. The large dimension of the empty set is defined to be $-\infty$. We denote the large dimension of $X$ by ${\ensuremath{\textup{ldim}}}(X)$.

Some basic properties of the large dimension that will be used in the sequel are the following (see [@egh Lemma 6.11]): for every two definable sets $X, Y{\subseteq}{\mathbb{R}}^n$,

-   if $X{\subseteq}Y$, then ${\ensuremath{\textup{ldim}}}X\le{\ensuremath{\textup{ldim}}}Y.$

-   if $X$ is ${\ensuremath{\mathcal{L}}}$-definable, then ${\ensuremath{\textup{ldim}}}X=\dim X$.

-   $X$ is small if and only if ${\ensuremath{\textup{ldim}}}X=0$.

Point counting
--------------

We now proceed to the proof of Theorem \[main\] (B). We need several preparatory lemmas. First, a very useful fact.

\[op\] For every $A{\subseteq}{\mathbb{R}}$ with $A{\setminus}P$ ${\operatorname{dcl}}$-independent over $P$, we have ${\operatorname{dcl}}_{{\ensuremath{\mathcal{L}}}(P)}(A)={\operatorname{dcl}}(A)$.

Take $x\in {\operatorname{dcl}}_{{\ensuremath{\mathcal{L}}}(P)}(A)$. That is, the set $\{x\}$ is $A$-definable in ${\langle}{\ensuremath{\mathcal{R}}}, P{\rangle}$. By [@egh Assumption III], since $A{\setminus}P$ is ${\operatorname{dcl}}$-independent over $P$, we have that $cl(\{x\})$ is ${\ensuremath{\mathcal{L}}}_A$-definable. But $cl(\{x\})=\{x\}$. So $x\in {\operatorname{dcl}}(A)$.

The following lemma is crucial and relies on the fact that $P$ is ${\operatorname{dcl}}$-independent.

\[S0c\] Let $h:Z{\subseteq}P^m\times {\mathbb{R}}^k\to {\mathbb{R}}^n$ be a definable injective map. Let $B{\subseteq}{\mathbb{R}}$ be a finite set. Then there is a finite set $S_0{\subseteq}P^m$ such that $$h\left(\bigcup_{g\in P^m{\setminus}S_0}\{g\}\times Z_g\right)\cap {\operatorname{dcl}}(B)^n={\ensuremath{\emptyset}}.$$

Suppose $h$ is $A$-definable, with $A$ finite. Let $A_0{\subseteq}A\cup B$ and $P_0{\subseteq}P$ be finite so that $A\cup B{\subseteq}{\operatorname{dcl}}(A_0P_0)$ and $A_0$ is ${\operatorname{dcl}}$-independent over $P$. Suppose $q=h(g, t)$, where $g\in P^m$, $t\in Z_g$ and $q\in {\operatorname{dcl}}(B)$. By injectivity of $h$, all coordinates of $g$ are in $${\operatorname{dcl}}_{{\ensuremath{\mathcal{L}}}(P)}(A q){\subseteq}{\operatorname{dcl}}_{{\ensuremath{\mathcal{L}}}(P)}(AB){\subseteq}{\operatorname{dcl}}_{{\ensuremath{\mathcal{L}}}(P)}(A_0P_0)={\operatorname{dcl}}(A_0P_0).$$ Since $P$ is ${\operatorname{dcl}}$-independent, there can be at most $|A_0|$ many such $g$’s, and hence so can $q$’s.

Two particular cases of the above lemma are the following (recall, ${\ensuremath{\mathcal{A}}}{\subseteq}{\operatorname{dcl}}({\ensuremath{\emptyset}})$).

\[S0\] Let $C=h\left(\bigcup_{g\in S}\{g\}\times J_g\right)$ be an $H$-cone. Then there is a finite set $S_0{\subseteq}S$ such that $h\left(\bigcup_{g\in S{\setminus}S_0}\{g\}\times J_g\right)$ contains no algebraic points.

\[smallA\] Every small set contains only finitely many algebraic points.

By Lemma \[S0c\], for $k=0$, and Fact \[cp\].

The key lemma in the inductive step of the proof of Theorem \[main-indep\] is the following.

\[Fdim0\] Let $J{\subseteq}{\mathbb{R}}^k$ be a supercone with shell $Z$, and $B{\subseteq}{\mathbb{R}}$ finite. Then there is an ${\ensuremath{\mathcal{L}}}$-definable set $F{\subseteq}Z$ with $\dim(F)<k$, such that $$Z\cap {\operatorname{dcl}}(B)^k{\subseteq}J\cup F.$$

By induction on $k$. For $k=0$, the statement is trivial. For $k>0$, assume $J =\bigcup_{g\in \Gamma}\{g\}\times J_g$, where $\Gamma{\subseteq}{\mathbb{R}}^{k-1}$ is a supercone. By inductive hypothesis, there is $F_1{\subseteq}\pi(Z)$, such that $$\pi(Z)\cap {\operatorname{dcl}}(B)^{k-1}{\subseteq}\Gamma\cup F_1.$$ Since $\dim (F_1\times {\mathbb{R}})<k$, it suffices to write $\left(\bigcup_{g\in \Gamma}\{g\}\times Z_g\right)\cap {\operatorname{dcl}}(B)^k$ as a subset of $J\cup F_2$, for some $F_2{\subseteq}Z$ with $\dim(F_2)<k$. Let $$X=\bigcup_{g\in \Gamma} \{g\}\times (Z_g{\setminus}J_g).$$ So we need to prove that $X\cap {\operatorname{dcl}}(B)^k$ is contained in an ${\ensuremath{\mathcal{L}}}$-definable set $F_2{\subseteq}Z$ with $\dim(F_2)<k$. By [@egh2 Theorem 2.2] and [@egh Corollary 5.11], $X$ is a finite union of sets $X_1, \dots, X_l$, each of the form $$X_i=f\left(\bigcup_{g\in S}\{g\}\times U_g\right),$$ where

-   $f:V{\subseteq}{\mathbb{R}}^{m+k-1}\to {\mathbb{R}}^k$ is an ${\ensuremath{\mathcal{L}}}$-definable continuous map,

-   $U{\subseteq}(S\times \Gamma)\cap V$ is a definable set, and

-   $f_{{\ensuremath{\upharpoonright}}U}$ is injective.

Using Fact \[cp\], we may further assume that $S{\subseteq}P^m$. By Lemma \[S0c\], for $h=f$, there is a finite set $S_0{\subseteq}P^m$ such that $$f\left(\bigcup_{g\in S{\setminus}S_0}\{g\}\times U_g\right)\cap {\operatorname{dcl}}(B)^k={\ensuremath{\emptyset}}.$$ For each $i=1, \dots, l$, and $X_i$ as above, set $$D_i=f\left(\bigcup_{g\in S_0}\{g\}\times U_g,\right).$$ Then $F_2=\bigcup_{i=1}^l D_i$ satisfies the required properties.

\[Fdim\] Let $C=h(J){\subseteq}{\mathbb{R}}^n$, where $J{\subseteq}{\mathbb{R}}^k$ is a supercone with shell $Z$, and $h:Z\to {\mathbb{R}}^n$ an ${\ensuremath{\mathcal{L}}}$-definable and injective map. Then there is a definable set $F{\subseteq}Z$ with $\dim(F)<k$, such that all algebraic points of $h(Z)$ are contained in $h(J\cup F)$.

Suppose $h$ is ${\ensuremath{\mathcal{L}}}_B$-definable, and take $F$ be as in Lemma \[Fdim0\]. Let $x=h(y)\in h(Z)$ be an algebraic point. In particular, $x\in {\operatorname{dcl}}({\ensuremath{\emptyset}})$. Since $h$ is ${\ensuremath{\mathcal{L}}}$-definable and injective, $y\in {\operatorname{dcl}}(B){\subseteq}J\cup F$.

\[main-indep\] For every definable set $X$, $X{\setminus}X^{alg_{\mathbb{Q}}}_t$ has few algebraic points.

Let $X{\subseteq}{\mathbb{R}}^n$ be a definable set. We work by induction on the large dimension of $X$. If ${\ensuremath{\textup{ldim}}}(X)=0$, then $X$ is small and the statement follows from Corollary \[smallA\]. Assume ${\ensuremath{\textup{ldim}}}(X)=k>0$. By Facts \[fact-cone\] and \[union\](3), we may assume that $X$ is a $k$-$H$-cone, say $h({\ensuremath{\mathcal{J}}})$ with ${\ensuremath{\mathcal{J}}}{\subseteq}{\mathbb{R}}^{m+k}$. By Corollary \[S0\], we may further assume that $\pi_m({\ensuremath{\mathcal{J}}})$ is a singleton, and hence, that $X=h(J){\subseteq}{\mathbb{R}}^n$, where $J{\subseteq}{\mathbb{R}}^k$ is a supercone. Let $Z$ be the shell of $J$, and $F{\subseteq}Z{\setminus}J$ as in Corollary \[Fdim\]. We have that $X{\subseteq}h(Z{\setminus}F)\cup h(F)$. By Fact \[union\](3), it suffices to show the statement for each of $X\cap h(Z{\setminus}F)$ and $X\cap h(F)$.\
$X\cap h(F)$. We have $${\ensuremath{\textup{ldim}}}(X\cap h(F))\le {\ensuremath{\textup{ldim}}}\, h(F)=\dim h(F)<k,$$ and hence we conclude by inductive hypothesis.\
$X\cap h(Z{\setminus}F)$. Observe that $$h(Z{\setminus}F)^{alg_{\mathbb{Q}}}{\subseteq}(X\cap h(Z{\setminus}F))^{alg_{\mathbb{Q}}}_t.$$ Indeed, let $T{\subseteq}h(Z{\setminus}F)$ be a ${\mathbb{Q}}$-set. We need to show that $T{\subseteq}cl(X\cap T)$. By the conclusion of Corollary \[Fdim0\], $T\cap {\ensuremath{\mathcal{A}}}^n{\subseteq}T\cap X$. Since the set of algebraic points ${\ensuremath{\mathcal{A}}}$ is dense in $Y$, we obtain that $$T{\subseteq}cl(T\cap{\ensuremath{\mathcal{A}}}^n){\subseteq}cl(T\cap X),$$ as required. Hence, by Fact \[pw\], the sets $$(X\cap h(Z{\setminus}F)){\setminus}(X\cap h(Z{\setminus}F))^{alg_{\mathbb{Q}}}_t{\subseteq}h(Z{\setminus}F){\setminus}h(Z{\setminus}F)^{alg_{\mathbb{Q}}}$$ has few algebraic points.

We now turn to the proof of Theorem \[thm-cor\]. Note that Theorem \[main-indep\] implies that if a definable set $X$ contains many algebraic points, then it is dense in an infinite semialgebraic set. However, the last conclusion by itself does not guarantee that $X$ contains an infinite set definable in ${\langle}\overline {\mathbb{R}}, P{\rangle}$. For example, let ${\ensuremath{\mathcal{R}}}={\langle}\overline {\mathbb{R}}, \textup{exp}{\rangle}$ and $X=e^P$. Then $X$ is definable (in ${\langle}{\ensuremath{\mathcal{R}}}, P{\rangle}$), and dense in ${\mathbb{R}}$. Suppose, towards a contradiction, that it contains an infinite set $Y$ definable in ${\langle}\overline {\mathbb{R}}, P{\rangle}$. Then $Y$ must be small in the sense of ${\langle}\overline {\mathbb{R}}, P{\rangle}$. Indeed, $e^P$ is small in the sense of ${\widetilde{{\ensuremath{\mathcal{R}}}}}$, and smallness is preserved under reducts, by [@egh Corollary 3.12]. Now, since $Y$ is small in the sense of ${\langle}\overline {\mathbb{R}}, P{\rangle}$, by [@el-small], there is a semialgebraic $h:{\mathbb{R}}^n\to {\mathbb{R}}$ and $S{\subseteq}P^n$, such that $h_{{\ensuremath{\upharpoonright}}S}$ is injective and $h(S)=Y{\subseteq}e^P$. We leave it to the reader to verify that this statement contradicts the ${\operatorname{dcl}}$-independence of $P$.

We need two preliminary lemmas.

\[containS\] Let $J{\subseteq}{\mathbb{R}}^k$ be a supercone. Then there is $b\in {\ensuremath{\mathcal{A}}}^k$, such that $$(b+P^k)\cap sh(J){\subseteq}J.$$ In particular, $J$ contains an infinite set which is ${\ensuremath{\emptyset}}$-definable in ${\langle}\overline {\mathbb{R}}, P{\rangle}$.

Denote $Z=sh(J)$. We work by induction on $k$. For $k=0$, $J=P^{0}={\mathbb{R}}^{0}=\{0\}$, and the statement holds. Now let $k>1$. By inductive hypothesis, there is $b_1\in {\ensuremath{\mathcal{A}}}^{k-1}$, such that $$(b_1+P^{k-1})\cap \pi(Z){\subseteq}\pi(J).$$ Let $S=(b_1 +P^{k-1})\cap \pi(Z)$. For every $t\in S$, the set $(Z_t {\setminus}J_t)-P$ is small, and hence $\bigcup_{t\in S} (Z_t {\setminus}J_t)-P$ is also small. By Lemma \[smallA\], the last set contains only finitely many algebraic points. So there is $$b_2\in {\ensuremath{\mathcal{A}}}{\setminus}\bigcup_{t\in S} ((Z_t{\setminus}J_t) - P).$$ But then for every $p\in P$ and $t\in S$, if $b_2+p\in Z_t$, then $b_2+p\in J_t$. That is, $(b_2+P)\cap Z_t{\subseteq}J_t.$ Therefore, for $b=(b_1, b_2)\in {\ensuremath{\mathcal{A}}}^k$, we have that $$(b+P)\cap Z{\subseteq}J.$$

For the “in particular" clause, let $B{\subseteq}sh(J)$ be any ${\ensuremath{\emptyset}}$-definable open box, and $b$ as above. Then $(b+P^k)\cap B{\subseteq}J$ is ${\ensuremath{\emptyset}}$-definable in ${\langle}\overline {\mathbb{R}}, P{\rangle}$. It is also infinite, by density of $P$ in ${\mathbb{R}}$.

Let $J{\subseteq}{\mathbb{R}}^k$ be a supercone. Does $J$ contain a set which is ${\ensuremath{\emptyset}}$-definable in ${\langle}\overline {\mathbb{R}}, P{\rangle}$ and has large dimension $k$?

\[QsetA\] Let $X{\subseteq}{\mathbb{R}}^n$ be a definable set and $T{\subseteq}{\mathbb{R}}^n$ a ${\mathbb{Q}}$-set, such that ${\ensuremath{\mathcal{A}}}^n\cap T{\subseteq}X$. Then ${\ensuremath{\textup{ldim}}}(X\cap T)=\dim T$.

Clearly, ${\ensuremath{\textup{ldim}}}(X\cap T)\le {\ensuremath{\textup{ldim}}}T= \dim T$. Let $k=\dim T$. The set $X\cap T$ is a finite union of $H$-cones. By Corollary \[S0\], there are finitely many cones $h_i(J_i)$ contained in $X\cap T$ and containing all algebraic points of $X\cap T$. Since ${\ensuremath{\mathcal{A}}}^n\cap T{\subseteq}X$, ${\ensuremath{\mathcal{A}}}^n\cap T$ is contained in the union of those cones. So $$T{\subseteq}cl({\ensuremath{\mathcal{A}}}^n\cap T){\subseteq}\bigcup_i cl(h_i (J_i)),$$ implying that for some $i$, $\dim cl( h_i(J_i))\ge k$. Therefore, some $J_i$ is a supercone in ${\mathbb{R}}^k$, implying that ${\ensuremath{\textup{ldim}}}(X\cap T)\ge k$.

Let $X{\subseteq}{\mathbb{R}}^n$. If $X$ contains many algebraic points, then it contains an infinite set which is ${\ensuremath{\emptyset}}$-definable in ${\langle}\overline {\mathbb{R}}, P{\rangle}$.

The beginning of the proof is similar to that of Theorem \[main-indep\], and thus we are brief. We work by induction on ${\ensuremath{\textup{ldim}}}(X)=0$. If ${\ensuremath{\textup{ldim}}}X=0$, then $X$ is small and the statement holds trivially by Corollary \[smallA\]. For ${\ensuremath{\textup{ldim}}}X=k>0$, we may assume that $X=h(J)$ is a $k$-cone, with $J{\subseteq}{\mathbb{R}}^k$. Let $Z$ be the shell of $J$, and $F{\subseteq}Z{\setminus}J$ as in Corollary \[Fdim\]. So one of $X\cap h(F)$ and $X\cap h(Z{\setminus}F)$ must contain many algebraic points. If the former one does, then we can conclude by inductive hypothesis. If the latter one does, then by Fact \[pw\], there is a ${\mathbb{Q}}$-cell $T{\subseteq}h(Z{\setminus}F)$. By the conclusion of Corollary \[smallA\], ${\ensuremath{\mathcal{A}}}^n\cap T{\subseteq}X$. By Lemma \[QsetA\], ${\ensuremath{\textup{ldim}}}X\cap T=\dim T$. Also, $$T{\subseteq}{\operatorname{cl}}({\ensuremath{\mathcal{A}}}^n \cap T){\subseteq}cl(X\cap T),$$ and hence if follows easily that $$\dim cl(X\cap T) ={\ensuremath{\textup{ldim}}}X\cap T.$$ Now, if $T$ is open, then ${\ensuremath{\textup{ldim}}}X\cap T=n$, and hence $X\cap T$ contains a supercone in ${\mathbb{R}}^n$ (by [@egh Theorem 5.7(1)]). By Lemma \[containS\], $X\cap T$ contains an infinite set which is ${\ensuremath{\emptyset}}$-definable in ${\langle}\overline {\mathbb{R}}, P{\rangle}$. Suppose $T=\Gamma(f)$ and let $\pi:{\mathbb{R}}^n\to {\mathbb{R}}^k$ be a coordinate projection that is injective on $T$. Then ${\ensuremath{\textup{ldim}}}\pi(X\cap T)=k$ and hence $\pi(X\cap T)$ contains a supercone in ${\mathbb{R}}^k$, and thus, by Lemma \[containS\], an infinite set $S$ which is ${\ensuremath{\emptyset}}$-definable in ${\langle}\overline {\mathbb{R}}, P{\rangle}$. Then $\Gamma(f_{{\ensuremath{\upharpoonright}}S})$ is contained in $X$ and is as desired.

We conclude with a remark that goes also beyond the scope of this section.

Let $X{\subseteq}{\mathbb{R}}^n$ and $P{\subseteq}{\mathbb{R}}$ be as in Theorem \[main\]. Define $$X^{alg}_P=\bigcup \{Y{\subseteq}X : \text{$Y$  infinite ${\ensuremath{\emptyset}}$-definable in ${\langle}\overline {\mathbb{R}}, P{\rangle}$}\}.$$ It is natural to ask whether $X{\setminus}X^{alg}_P$ has few algebraic points. An affirmative answer to this question would strengthen Theorem \[main\], and its contrapositive would imply Theorem \[thm-cor\]. For the case of dense pairs, it is actually not too hard to adjust the proofs of Lemma \[dense1\] and Theorem \[main-dense\] and obtain an affirmative answer. For the case of dense independent sets, the question is open, and it is possible that an affirmative answer to Question \[QsetA\] could be relevant.

[999999]{}

O. Belegradek, B. Zilber, [*The model theory of the field of reals with a subgroup of the unit circle*]{}, J. Lond. Math. Soc. (2) 78 (2008) 563-579.

A. Berenstein, C. Ealy and A. Günaydin, [*Thorn independence in the field of real numbers with a small multiplicative group*]{}, Annals of Pure and Applied Logic 150 (2007), 1-18.

A. Berenstein, E. Vassiliev, [*On lovely paris of geometric structures*]{}, Annals of Pure and Applied Logic 161 (2010), 866-878.

A. Berenstein, E. Vassiliev, *Geometric structures with a dense independent subset*, Selecta Math. N.S. 22 (2016), 191-225.

G. Boxall, P. Hieronymi, [*Expansions which introduce no new open sets*]{}, Journal of Symbolic Logic, (1) 77 (2012) 111-121.

E. Bombieri and W. Gubler, [Heights in Diophantine Geometry]{}, Cambridge Univ. Press, Cambridge, 2006.

G. Comte and C. Miller, [*Points of bounded height on oscillatory sets*]{}, Preprint (2016).

A. Dolich, C. Miller, C. Steinhorn, [*Structures having o-minimal open core*]{}, Trans. AMS 362 (2010), 1371-1411.

A. Dolich, C. Miller, C. Steinhorn, [*Expansions of o-minimal structures by dense independent sets*]{}, APAL 167 (2016), 684-706.

L. van den Dries, [*Dense pairs of o-minimal structures*]{}, Fundamenta Mathematicae 157 (1988), 61-78.

L. van den Dries, [Tame topology and o-minimal structures]{}, Cambridge University Press, Cambridge, 1998.

L. van den Dries, A. Günaydin, [*The fields of real and complex numbers with a small multiplicative group*]{}, Proc. London Math. Soc. 93 (2006), 43-81.

P. Eleftheriou, [*Small sets in dense pairs*]{}, Preprint (2017).

P. Eleftheriou, A. Günaydin and P. Hieronymi, [*Structure theorems in tame expansions of o-minimal structures by dense sets*]{}, Preprint, upgraded version (2017).

P. Eleftheriou, A. Günaydin, and P. Hieronymi, [*The Choice Property in tame expansions of o-minimal structures*]{}, Preprint (2017).

A. Günaydin, P. Hieronymi, [*The real field with the rational points of an elliptic curve*]{}, Fund. Math. 215 (2011) 167-175.

D. Marker, [Model Theory: an Introduction]{}, Springer (Graduate Texts in Mathematics 217).

C. Miller, P. Speissegger, [*Expansions of the real line by open sets: o-minimality and open cores*]{}, Fund. Math. 162 (1999), 193-208.

J. Pila, [*On the algebraic points of a definable set*]{}, Selecta Math. N.S. 15 (2009), 151-170.

J. Pila, [*O-minimality and the André-Oort conjecture for $\mathbb C^n$*]{}, Ann. Math. 173 (2011), 1779–1840.

J. Pila and A. J. Wilkie, [*The rational points of a definable set*]{}, Duke Math. J. 133 (2006), 591–616.

T. Scanlon, [*Counting special points: logic, Diophantine geometry, and transcendence theory*]{}, Bull. Amer. Math. Soc. (N.S.), 49(1):51–71, 2012.

M. Tychonievich, [*Tameness results for expansions of the real field by groups*]{}, Ph.D. Thesis, Ohio State University (2013).

[^1]: Research supported by a Research Grant from the German Research Foundation (DFG) and a Zukunftskolleg Research Fellowship.
