Let${\mathbb M}$ be an affine variety equipped with a foliation, both defined over a number field ${\mathbb K}$. For an algebraic $V\subset {\mathbb M}$ over ${\mathbb K}$, write $\delta _{V}$ for the maximum of the degree and log-height of V. Write $\Sigma _{V}$ for the points where the leaves intersect V improperly. Fix a compact subset ${\mathcal B}$ of a leaf ${\mathcal L}$. We prove effective bounds on the geometry of the intersection ${\mathcal B}\cap V$. In particular, when $\operatorname {codim} V=\dim {\mathcal L}$ we prove that $\#({\mathcal B}\cap V)$ is bounded by a polynomial in $\delta _{V}$ and $\log \operatorname {dist}^{-1}({\mathcal B},\Sigma _{V})$. Using these bounds we prove a result on the interpolation of algebraic points in images of ${\mathcal B}\cap V$ by an algebraic map $\Phi $. For instance, under suitable conditions we show that $\Phi ({\mathcal B}\cap V)$ contains at most $\operatorname {poly}(g,h)$ algebraic points of log-height h and degree g.
We deduce several results in Diophantine geometry. Following Masser and Zannier, we prove that given a pair of sections $P,Q$ of a nonisotrivial family of squares of elliptic curves that do not satisfy a constant relation, whenever $P,Q$ are simultaneously torsion their order of torsion is bounded effectively by a polynomial in $\delta _{P},\delta _{Q}$; in particular, the set of such simultaneous torsion points is effectively computable in polynomial time. Following Pila, we prove that given $V\subset {\mathbb C}^{n}$, there is an (ineffective) upper bound, polynomial in $\delta _{V}$, for the degrees and discriminants of maximal special subvarieties; in particular, it follows that the André–Oort conjecture for powers of the modular curve is decidable in polynomial time (by an algorithm depending on a universal, ineffective Siegel constant). Following Schmidt, we show that our counting result implies a Galois-orbit lower bound for torsion points on elliptic curves of the type previously obtained using transcendence methods by David.