may be smaller).

\[thm-manyrichlines\] For all $d \geq 1$ there exists constants $C_d,C_d'$ such that the following holds. Let $V \subset \C^d$ be a set of $n$ points and let $r \geq 2$ be an integer. Suppose that for some $\alpha\ge 1$, $$|\cL_r(V)|\ge C_d\cdot\alpha\cdot \frac{n^2}{r^{d}}.$$ Then, there exists a subset $\tilde V \subset V$ of size at least $C_d'\cdot\alpha\cdot \frac{n}{r^{d-2}}$ contained in a $(d-1)$-flat. We can take the constants $C_d,C_d'$ to be $d^{cd},d^{c'd}$ for absolute constants $c,c'>0$.

Notice that the theorem is only meaningful when $r \gg d$ (otherwise the factor $r^d$ in the assumption will be swallowed by the constant $C_d$). On the other hand, if $r \gg n^{1/(d-1)}$ then the conclusion always holds. Hence, the theorem is meaningful when $r$ is in a ‘middle’ range. Notice also that for $d=2,3$ and $r$ sufficiently small, the condition of the theorem also cannot hold, by the Szemeredi-Trotter theorem. However, when $d$ becomes larger, our theorem gives non trivial results (and becomes closer to optimal for large $d$). The proof of Theorem \[thm-manyrichlines\] actually shows (Lemma \[lem-findpoly\]) that, under the same hypothesis, most of the rich lines must be contained in a hypersurface of degree smaller than $r$. This in itself 