  Fox, Gromov, Lafforgue, Naor, and Pach proved a regularity lemma for
semi-algebraic $k$-uniform hypergraphs of bounded complexity, showing that for
each $\epsilon>0$ the vertex set can be equitably partitioned into a bounded
number of parts (in terms of $\epsilon$ and the complexity) so that all but an
$\epsilon$-fraction of the $k$-tuples of parts are homogeneous. We prove that
the number of parts can be taken to be polynomial in $1/\epsilon$. Our improved
regularity lemma can be applied to geometric problems and to the following
general question on property testing: is it possible to decide, with query
complexity polynomial in the reciprocal of the approximation parameter, whether
a hypergraph has a given hereditary property? We give an affirmative answer for
testing typical hereditary properties for semi-algebraic hypergraphs of bounded
complexity.
