AbstractThere has been much recent progress in the study of arithmetic progressions in various sets, such as dense subsets of the integers or of the primes. One key tool in these developments has been the sequence of Gowers uniformity norms $U^d(G)$, $d=1,2,3,\dots$, on a finite additive group $G$; in particular, to detect arithmetic progressions of length $k$ in $G$ it is important to know under what circumstances the $U^{k-1}(G)$ norm can be large.The $U^1(G)$ norm is trivial, and the $U^2(G)$ norm can be easily described in terms of the Fourier transform. In this paper we systematically study the $U^3(G)$ norm, defined for any function $f:G\to\mathbb{C}$ on a finite additive group $G$ by the formula\begin{multline*} \qquad\|f\|_{U^3(G)}:=|G|^{-4}\sum_{x,a,b,c\in G}(f(x)\overline{f(x+a)f(x+b)f(x+c)}f(x+a+b) \\ \times f(x+b+c)f(x+c+a)\overline{f(x+a+b+c)})^{1/8}.\qquad \end{multline*}We give an inverse theorem for the $U^3(G)$ norm on an arbitrary group $G$. In the finite-field case $G=\mathbb{F}_5^n$ we show that a bounded function $f:G\to\mathbb{C}$ has large $U^3(G)$ norm if and only if it has a large inner product with a function $e(\phi)$, where $e(x):=\mathrm{e}^{2\pi\ri x}$ and $\phi:\mathbb{F}_5^n\to\mathbb{R}/\mathbb{Z}$ is a quadratic phase function. In a general $G$ the statement is more complicated: the phase $\phi$ is quadratic only locally on a Bohr neighbourhood in $G$.As an application we extend Gowers's proof of Szemerédi's theorem for progressions of length four to arbitrary abelian $G$. More precisely, writing $r_4(G)$ for the size of the largest $A\subseteq G$ which does not contain a progression of length four, we prove that$$ r_4(G)\ll|G|(\log\log|G|)^{-c}, $$where $c$ is an absolute constant.We also discuss links between our ideas and recent results of Host, Kra and Ziegler in ergodic theory.In future papers we will apply variants of our inverse theorems to obtain an asymptotic for the number of quadruples $p_1\ltp_2\ltp_3\ltp_4\leq N$ of primes in arithmetic progression, and to obtain significantly stronger bounds for $r_4(G)$.