  This paper is a part of our programme to generalise the Hardy-Littlewood
method to handle systems of linear questions in primes. This programme is laid
out in our paper Linear Equations in Primes [LEP], which accompanies this
submission. In particular, the results of this paper may be used, together with
the machinery of [LEP], to establish an asymptotic for the number of four-term
progressions p_1 < p_2 < p_3 < p_4 <= N of primes, and more generally any
problem counting prime points inside a ``non-degenerate'' affine lattice of
codimension at most 2.
  The main result of this paper is a proof of the Mobius and Nilsequences
Conjecture for 1 and 2-step nilsequences. This conjecture is introduced in
[LEP] and amounts to showing that if G/\Gamma is an s-step nilmanifold, s <= 2,
if F : G/\Gamma -> [-1,1] is a Lipschitz function, and if T_g : G/\Gamma ->
G/\Gamma is the action of g \in G on G/\Gamma, then the Mobius function \mu(n)
is orthogonal to the sequence F(T_g^n x) in a fairly strong sense, uniformly in
g and x in G/\Gamma. This can be viewed as a ``quadratic'' generalisation of an
exponential sum estimate of Davenport, and is proven by the following the
methods of Vinogradov and Vaughan.
