  We prove analogues for hypergraphs of Szemer\'edi's regularity lemma and the
associated counting lemma for graphs. As an application, we give the first
combinatorial proof of the multidimensional Szemer\'edi theorem of Furstenberg
and Katznelson, and the first proof that provides an explicit bound. Similar
results with the same consequences have been obtained independently by Nagle,
R\"odl, Schacht and Skokan.
