                                            LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER
                                                               FIELDS
arXiv:2306.16983v3 [math.NT] 26 Dec 2023




                                                                               WATARU KAI

                                                            To the memory of Prof. Noriyuki Suwa (1955–2022)


                                                Abstract. We prove that the von Mangoldt function ΛK of a number ﬁeld K
                                                is well approximated by its Cramér/Siegel models in the Gowers norm sense.
                                                Via the inverse theory of Gowers norms, this is achieved by showing that the
                                                diﬀerence of ΛK and its model is asymptotically orthogonal to nilsequences. To
                                                prove the asymptotic orthogonality, we use Mitsui’s Prime Number Theorem
                                                as the base case and proceed by upgrading Green–Tao’s type I/II computation
                                                to the general number ﬁeld. As an application, we prove a number ﬁeld analog
                                                of the Green–Tao–Ziegler theorem on simultaneous prime values of aﬃne-linear
                                                forms of ﬁnite complexity. This in turn can be used to prove a Hasse principle
                                                result for certain ﬁbrations X → P1 over a number ﬁeld K extending a result
                                                of Harpaz–Skorobogatov–Wittenberg which was only available over Q.




                                                                                Contents
                                           1. Introduction                                                                         2
                                           2. Outline of proof                                                                     5
                                           3. Norm-length compatible bases                                                        11
                                           4. Nilsequences                                                                        13
                                           5. The Cramér model                                                                   16
                                           6. The Siegel model                                                                    23
                                           7. The Cramér and Siegel models are close                                             29
                                           8. Vaughan’s decomposition (a.k.a. the Type I/II sums)                                 34
                                           9. The orthogonality theorem—equidistributed, average 0 case                           39
                                           10. The orthogonality theorem                                                          55
                                           11. The von Mangoldt function and its models are close                                 60
                                           12. Simultaneous prime values of affine-linear forms                                   63
                                           13. Hasse principle of rational points for certain fibrations                          67
                                           Appendix A. Results from the nilsequence theory                                        70
                                           Appendix B. Elementary inequalities                                                    78
                                           Appendix C. The pseudoradom majorant                                                   80
                                           Appendix D. Supplements from algebraic number theory                                   83
                                           Appendix E. Lattice points in a subset                                                 86
                                           Appendix F. The von Neumann theorem for the Gowers norms                               88
                                           Appendix G. Verification of the localized variant of main results                     102
                                           References                                                                            109

                                           Date: December 29, 2023.
                                                                                      1
2                                      WATARU KAI


                                   1. Introduction
   Schinzel and Sierpinski [27] conjectured that if finitely many irreducible Z-coefficient
polynomials f1 , . . . , ft ∈ Z[X] satisfy the condition that there is no prime p that
divides the product f1 (n) · · · ft (n) for all n ∈ Z (the so-called Bouniakowsky condi-
tion), then there should be infinitely many n ∈ Z such that the values f1 (n), . . . , ft (n)
are simultaneously prime (positive or negative). Bateman and Horn [1] give the
conjectural asymptotic frequency of this event: on the interval [1, N] ⊂ N it should
happen
                                                                     
                             Cf1 ,...,ft          N             N
                                              ·         +o
                       deg(f1 ) . . . deg(ft ) (log N)t      (log N)t

times, where letting 0 ≤ ω(p) ≤ p be the number of elements a ∈ Fp such that
Qt
  i=1 fi (a) = 0 in Fp , we define

                                       Y  p t    ω(p)
                                                         
                        Cf1 ,...,ft :=           1−        .
                                       p
                                          p−1        p

Their conjectures extend the older conjectures by Dickson [4] and by Hardy and
Littlewood [16] about the case where fi all have degree 1. The twin prime conjecture
is a special case of these conjectures, f1 = X, f2 = X + 2. The only known case of
these conjectures is when t = 1 and f1 (X) = aX + b where a 6= 0, b ∈ Z are coprime.
   It becomes easier to attain simultaneous prime values when more variables are
allowed. A landmark theorem of Green–Tao–Ziegler [15, 11, 14] affirms the multi-
variable version of the Hardy–Littlewood conjecture under a “finite complexity”
assumption: namely, they established an asymptotic formula for how frequently
finitely many degree 1 polynomials ψ1 , . . . , ψt ∈ Z[X1 , . . . , Xd ] attain simultaneous
prime values under the additional condition that their linear parts ψ̇i (obtained by
discarding the constant term) are pairwise linearly independent, which requires at
least two variables.
   In this paper, we establish an analog of the theorem of Green–Tao–Ziegler for
number fields K. To discuss the asymptotic aspect of the problem, fix a linear norm
k−k : K → R≥0 in the sense that it satisfies the triangle inquality, non-degeneracy
and kaxk = |a|·kxk for all a ∈ Q and x ∈ K, where |a| is the absolute value as a real
number (not any p-adic). For example one can consider the l∞ -norm associated
to any chosen Q-linear basis K ∼   = Qn , and consider the associated l∞ -norm, or
consider the canonical norm k−kcan discussed in §3. By adding a subscript

                                      OK,≤N ⊂ OK

let us mean the set of elements x satisfying kxk ≤ N. Recall that the von Mangoldt
function ΛK for K associates to an element x ∈ OK the value log N(p) if the ideal
(x) is a power of a non-zero prime ideal p with exponent ≥ 1, and 0 if not. As usual,
the contribution from prime powers of exponents ≥ 2 is asymptotically negligible.
In particular, one can consider the usual von Mangoldt function Λ(N((x))) of the
norm of the principal ideal (x) if they prefer.
   A thumbnail version of our main result is the following:
              LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                             3


Theorem 1.1 (Theorem 12.1 and Remark 12.5). Let ψ1 , . . . , ψt ∈ OK [X1 , . . . , Xd ]
be polynomials of degree 1 such that their linear parts ψ̇i are pairwise linearly inde-
pendent over K. Then we have an asymptotic formula as N → +∞:
                        t
                                     !
               X       Y
                          ΛK (ψi (x)) = Cψ1 ,...,ψt · |OK,≤N |d + o(Nnd ),
              x∈Od       i=1
                 K,≤N

where Cψ1 ,...,ψt is a constant depending on ψ1 , . . . , ψt , which is positive if the follow-
ing condition is satisfied: for every prime ideal p ⊂ OK , there is a vector xp ∈ OdK
such that ψi (xp ) 6∈ p for all 1 ≤ i ≤ t. (Another equivalent condition is that for
every prime number p, there is a vector xp ∈ OdK such that the norms N(ψi (xp ))
are prime to p for all 1 ≤ i ≤ t.)
   In down-to-earth terms, Theorem 1.1 says for example that if we are given a
finite set of degree 1 polynomials in two variables
(1.1)                   ai X + bi Y + 1 ∈ OK [X, Y],     i = 1, . . . , t
such that any two vectors (ai , bi ), (aj , bj ) are linearly independent in K2 , then
there are (x, y) ∈ O2K such that the values ai x + bi y + 1 are all prime elements,
and the number of such x ∈ O2K,≤N is asymptotically positively proportional to
N2n /(log N)t . By taking the norm OK → Z noting that prime ideals of degree
≥ 2 are negligibly few, Theorem 1.1 gives a family of cases where the multivariate
version of the Bateman–Horn conjecture holds (dn variables (d ≥ 2), degree n,
number of polynomials t ≥ 1).
   In our earlier joint work [20], we considered polynomials (1.1) in the case where
ai = 1 for all i. This previous result is stronger in this particular case in that we
can find prime-attaining pairs (x, y) from a smaller set OK × (Z \ {0}) (though the
asymptotic frequency has been identified only up to a mutiplicative constant), but
our current result allows more general coefficients including the constant terms.
   An outline of the proof of Theorem 1.1 is given in §2.
1.1. Applications. Harpaz, Skorobogatov and Wittenberg [17] used the Green–
Tao–Ziegler theorem for the case of ai X + bi Y + ci ∈ Z[X, Y] to study Q-raional
points on algebraic varieties. Their technique allows one to show that a Q-variety
X fibered over the projective line π : X → P1Q satisfies the Hasse principle (in that
the Brauer–Manin obstruction is the only obstruction) if generic fibers are known
to satisfy the honest Hasse principle and one has control over finitely many bad
fibers of π. Their results include:
Theorem 1.2 (Harpaz–Skorobogatov–Wittenberg [17, Corollary 3.4]). Let X be
a smooth proper geometrically integral variety over Q equipped with a morphism
π : X → P1Q . If the generic fiber of π is a Severi-Brauer variety and if all the fibers
that are not geometrically integral are Q-fibers, then the Brauer–Manin obstruction
is the only obstruction for the non-emptiness of X(Q).
   This theorem is a somewhat immediate consequence of their main theorem [17,
Theorem 3.1], which is also limited to (geometrically integral) varieties over Q. In
§13 we indicate how to extend it to the general number field K. For this purpose
we need a variant of Theorem 1.1 where we can verify under similar assumptions
that a given finite set of affine-linear maps into OK [S−1 ] attain values which are
simultaneously prime elements of OK [S−1 ] (Theorem 13.1).
4                                    WATARU KAI


   In different directions, a Möbius version of the techniques in this paper will likely
help give affirmative answers to some of the questions raised by Sun [28, Question
1.20] concerning specific cases of a generalized form of Sarnak’s conjecture.
   The error term in Theorem 1.1 does not genuinely depend on the family ψ1 , . . . , ψt
but only on the sizes of their coefficients. As in [15, Examples 1 (p. 1760)], this
allows one e.g. to deduce a positive solution to an appropriately termed ternary
Goldbach problem for “large enough” elements in OK . The case of Gaussian in-
tegers OK = Z[i] has been worked out independently by Giannitsi, Krause, Lacey,
Mousavi and Rahimi [6] by a different method.
Acknowledgments. I thank Joni Teräväinen for answering numerous questions
about his work [30] with Terence Tao, and Federico Binda, Hiroyasu Miyazaki and
Rin Sugiyama for fruitful discussions. During this work, I was supported by Japan
Society for the Promotion of Science (JSPS) through JSPS Grant-in-Aid for Young
Scientists (JP18K13382 and JP22K13886) and JSPS Overseas Research Fellowship,
which funded my long-term visit to University of Milan. My colleagues in Milan
have always been immensely helpful both mathematically and non-mathematically.
1.2. Notation and conventions. K is a number field of degree n := [K : Q].
Let s ∈ N be the degree of the Gowers norm we consider, which will be equal to
the degree of nilpotency of the Lie group G and to the complexity of the set of
affine-linear forms in the context of Theorem 1.1.
1.2.1. General notation. When X is a positive quantity and a, b, c, . . . are some
parameters, the expression Oa,b,c,...(X) means a complex number quantity whose
magnitude is bounded by Ca,b,c,... · X where Ca,b,c,... > 0 is a positive number which
can be written as a function in a, b, c, . . . . The expressions Y = Oa,b,c,..., (X) and
Y ≪a,b,c,... X mean that Y is an Oa,b,c,...(X). An assertion of the form
        “If Y ≪a,b,c,... X, then Y′ ≪a′ ,b′ ,c′ ,... X′ ”
means that there are constants Ca,b,c,... > 0 (typically small) and Ca′ ,b′ ,c′ ,... > 0
(typically large) which make the following true:
        “If |Y| < Ca,b,c,... X, then |Y′ | < Ca′ ,b′ ,c′ ,... X′ .”
   For us, N > 0 is the main integer parameter and we will make constant use of
the quantity
                                            √
(1.2)                           Q = Qs = e log N/Os (1)
where Os (1) > 10s is a sufficiently large positive number depending only on s.
                                                                                η
If the dependence on s is annoying, one could alternatively choose Q = e(log N)
with any 0 < η < 1/2. This change forces one to modify the exponents in some
                                    c
pseudopolynomial quantities e(log N) in this paper, but otherwise our results are
not affected.
   Let
                                     0 < cs,n < 1
be the exponent in Theorem 2.2 on which we keep adding smallness requirements
depending on s, n until its proof will be completed towards the end of §11. For a
positive number z, let
                                            Y
                                  P(z) :=       p
                                            0<p<z
            LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                      5


be the product of all positive prime numbers smaller than z. As in this case,
                                                                          P Q    the
letter p is reserved for positive prime numbers. In particular, symbols      p ,   p
will mean sums and products over positive prime numbers (often obeying some
additional conditions) even when not explicitly so mentioned.
   When P(−) is a condition, the indicator function 1P(−) is defined to take value
1 when the condition holds and 0 if not. Sometimes we write it as 1[P(−)] for
legibility.

1.2.2. Cubes in Euclidean spaces. For a finite-dimensional R-vector space V ∼
                                                                            = Rn
with a chosen basis, we write
                              [a, b]nV , (a, b]nV , · · · ⊂ V
for cubes with respect to the basis. For a finite-rank free abelian group a ∼
                                                                            = Zn
with a chosen basis, we write
                               [a, b]na := a ∩ [a, b]na⊗R
and so on. The subscripts will be omitted when there is not so much risk of
confusion. We use the shorthand symbol [±N] to mean [−N, N].

1.2.3. Ideals. We assume that the reader is familiar with the very basics of algebraic
number theory as in [24, Chapter I]. This includes objets like OK , Cl(K) and the
theory of fractional ideals. We write
                    IdealsK := {a ⊂ OK | a is a non-zero ideal}
for the multiplicative monoid of non-zero ideals of OK .
   We will make routine use of norm-length compatible bases of ideals, which are
explaind in §3.
   Lower case German letters a, b, c, d, n, q are used to denote non-zero fractional
ideals of OK . The letter p is exclusively usedPto mean
                                                    Q     non-zero prime ideals. In
particular, sums and products of the form p , p are always those over prime
ideals, often with some additional conditions indicated. The adjective “non-zero”
might be omitted from time to time.
   An element x ∈ a of a fractional ideal and an ideal q ⊂ OK are said to be coprime
in a if we have xOK + qa = a. We say x ∈ a and α ∈ OK are coprime if x and (α)
are.
   See §D.3 for some conventions related to Hecke characters such as ψ a (the re-
striction of a Hecke character to a fractional ideal) and C(q) (the mod q idèle class
group).

                              2. Outline of proof
   We broadly follow the overall plan of Green–Tao [15] and incorporate simplifi-
cations by Tao–Teräväinen [30], which are powered by more modern combinatorial
machinery. With OK , additive combinatorics gets a little more complicated because
the geometry of Rn is richer than R. Algebra gets more complex as well because
unlike in Z, elements and ideals are two very different notions—the multiplicative
structure is cleaner in the framework of ideals, but we have to make sure that they
get along with the additive combinatorics concepts which only see elements and
additive subgroups at best.
6                                                   WATARU KAI


   The central combinatorial tool is the Gowers Us+1 -norm, where s ≥ 0 is an
integer, which will eventually be set to be the complexity of the set ψ̇1 , . . . , ψ̇t of
linear maps.
Definition 2.1 (Gowers norm). Let A be a finite abelian group and f : A → C be
a function. The Gowers Us+1 -norm kf kUs+1 (A) ≥ 0 is defined by
                                                                         
                      2s+1                                     Y                                    s+1
                                                                                                       X          
                                                                                                                 
        kf kUs+1 (A)           :=            E                                 Cω1 +···+ωs+1 f (x +       ωi hi ) ,
                                             x∈A                                                      i=1
                                                                                                                  
                                    (h1 ,...,hs+1 )∈As+1    (ω1 ,...,ωs+1 )
                                                             ∈{0,1}s+1

where C is the complex conjugate operation. Henceforth, for h = (h1 , . . . , hs+1 ) ∈
As+1 and ω = (ω1 , . . . , ωs+1 ) ∈ {0, 1}s+1 , it is convenient to write |ω| := ω1 + · · · +
ωs+1 and
                                                               s+1
                                                               X
                                                 ω · h :=            ω i hi .
                                                               i=1
  Also, if A is a finite subset of an abelian group Z and f : A → C is a function,
we define kf kUs+1 (A) ≥ 0 by
                                                                         
                      2s+1                      Y
          kf kUs+1 (A)       :=      E                 C|ω| f (x + ω · h) .
                                                    x∈Z
                                                  h∈Zs+1               ω∈{0,1}s+1
                                                 such that
                                                 x+ω·h∈A
                                            for all ω∈{0,1}s+1

We will use this norm mainly for A = OK,≤N ⊂ OK .
  See [15, Appendix B] for a comprehensive introduction to the theory of Gowers
norms.
2.1. The von Neumann theorem.        Qt Neumann theorem of Gowers norms
                              P The von
(Appendix F) says that the sum x∈Od    i=1 ΛK (ψi (x)) will change little if we
                                                           K,≤N

replace the function ΛK by another function which is close in the Us+1 (OK,≤N )-
norm, at least if we define OK,≤N using the l∞ -norm associated with a Z-basis
OK ∼= Zn . Our choice of the replacement for ΛK is its Cramér model ΛCramér , for
which the sum is computable (§5).1 This reduces the problem to showing that
kΛK − ΛCramér kUs+1 (OK,≤N ) is small (= decays fast enough as N → +∞):
Theorem 2.2 (Theorem 11.1). We have
                       kΛK − ΛCramér kUs+1 (OK,≤N ) ≪s,K,k−k (log log N)−cs,n
for some small 0 < cs,n < 1.
   This result alone could be of theoretical importance in its own right.
   As an aside, let us mention that the von Neumann theorem is not naively ap-
plicable here because the values of ΛK and ΛCramér are not uniformly bounded for
varying N > 1 (they can be as large as O(log N)). To remedy this, we have to
   1To be precise, the deﬁnition of the Cramér model involves the choice of a parameter Q growing
with the scale N, but we ignore it in Introduction. Similarly for the Siegel model which appears
below.
            LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                      7


assure that their absolute values are bounded by a pseudorandom weight function,
which we can prove only after the so-called W-trick. This means that Theorem 1.1
does not literally follow from Theorem 2.2, but rather from its W-tricked variant
(Lemma 12.2). In this Introduction we do not further discuss this issue. That the
W-tricked ΛK is bounded by a pseudorandom weight function is a key computa-
tion from our previous joint work [20] with Mimura, Munemasa, Seki and Yoshino,
which is explained in Appendix C.

2.2. Siegel model. When K = Q, Green–Tao [10] directly compared Λ and ΛCramér .
Tao–Teräväinen [30] clarified that it is more efficient to introduce an intermediate
model, the Siegel model ΛSiegel (§6), and try to show separately that
             kΛ − ΛSiegelkUs+1 ([N])   and   kΛSiegel − ΛCramér kUs+1 ([N])
are small. Green–Tao’s computations can be used to show a faster decay of the
first difference, while the second difference can be bounded by utilizing the Weil
bounds for character sums. This separation allows one to prove much faster decay,
breaking the “sound barrier” so to speak, which makes the remaining procedure
substantially simpler.
    The Weil bound argument easily carries over to the number field situation (§7).
Thus we are left with the question of showing kΛK − ΛSiegelkUs+1 (OK,≤N ) is small.

2.3. Gowers Inverse Theorem. There is a combinatorial tool called Gowers In-
verse Theorem, which gives a sufficient (and in a sense necessary) condition for the
Gowers norm kf kUs+1 of a given function f to be small. It roughly states that the
Gowers Us+1 -norm of a function f : [−N, N]n → C is small if its correlation with
s-step nilsequences θ : Zn → C is small:

                      E      f (x)θ(x) = oN→+∞ (1) (fast enough)?
                 x∈[−N,N]n

Here s-step nilsequences are sequences of complex numbers that arise as composites
of the form
                                         g              F
                          θ = F ◦ g : Zn −         →C
                                         → G ։ G/Γ −
where G is a connected, simply connected Lie group which is s-step nilpotent, g is
a polynomial map, Γ ⊂ G is a cocompact discrete subgroup and F is a Lipschitz
function (with respect to an appropriate metric) whose values have absolute value
≤ 1. The precise definitions of these notions are recalled in §4.
   By convention, 1-step nilpotency means G is abelian, in which case G/Γ is a
real torus isomorphic to Rm /Zm . The function F can be well approximated by
waves x 7→ e2πi·ξ(x) of various frequencies ξ ∈ Homcont (Rm /Zm , R/Z) ∼    = Zm . If
moreover g is just an additive map, then we are essentially in the realm of classical
Fourier analysis. The general situation, so-called higher order Fourier analysis, is
a relatively new branch of analysis/combinatorics which has only received enough
attention after the turn of the century [7]. Some of the results that we use had been
formulated for nilsequences on Z instead of Zn in the literature, so in Appendices
A, F we give some supplements on how to extend them to Zn .
   The Inverse Gowers Theorem (§A.1) was first proven by Green–Tao–Ziegler [14]
in a qualitative form; the first and fairly useful quantitative version has recently
been established by Manners [21].
8                                    WATARU KAI


2.4. Factorization theorem. To make the nilsequence look simpler, we have to
rely on the equidistribution theory of polynomial maps, the central tools being the
Leibman theorem and the factorization theorem.
   The Quantitative Factorization Theorem A.7 of polynomial maps gives a decom-
position of the polynomial map g : OK ∼  = Zn → G into the pointwise product of
three other polynomial maps:
                                 g(x) = ε(x)g ′ (x)γ(x)

where ε is smooth (; very slowly varying), g ′ has values in a closed subgroup G′ and
is totally equidistributed in G′ /G′ ∩ Γ, and γ is periodic of period PZn (with P ∈ N
of controlled size). The smooth part ε varies so slowly that by splitting the cube
[±N]n into not-so-ridiculously small subcubes, it can be regarded as practically
constant on each subcube. Also, by splitting OK into residue classes mod POK ,
we will be reduced to showing the following type of decay for each convex subset
Ω ⊂ [±N]n and residue class α ∈ OK /POK:

            X                                   ?
(2.1)                  (ΛK − ΛSiegel)(x)F(g(x)) = oN→+∞ (Nn )   (fast enough),
        x∈Ω∩(α+PZn )

under the additional assumption that g is totally equidistributed. In fact, since we
always consider finitely many points in G, the only sensible thing we can do with
equidistribution concepts is to consider them with admissible errors. In the current
situation, the map g is actually assumed to be totally ǫ-equidistributed as a map
from [−N, N]n ⊂ Zn ∼  = OK for an ǫ of the form ǫ = exp(−(log N)c ) with c slightly
smaller than 1/2.

2.5. Mitsui’s Prime Number Theorem.   P      When F is the constant function 1, the
problem is to approximate the sum x∈Ω∩(α+PZn ) ΛK (x) by the more predictable
sum with ΛSiegel replacing ΛK . In the case of K = Q this is precisely Prime
Number Theorem in arithmetic progressions. For the general number field, Mitsui
[22] had proven an almost appropriate analog of Prime Number Theorem building
on Landau’s Prime Ideal Theorem. The correction term from a Siegel zero and the
flexibility to choose the convex set Ω were worked out in our preceding work ([19],
see also Proposition 6.4).
   Thus, by subtracting the average from F, we may assume that F has average 0.
Under this assumption, we shall show that the decay (2.1) is actually true for ΛK
and ΛSiegel separately.

2.6. Vaughan decomposition. To prove the decay (2.1) for ΛK and ΛSiegel as-
suming F has average 0, we perform a Vaughan decomposition (§8) of them into
so-caled (twisted) type I/II sums modulo negligible error. This replacesPΛK and
ΛSiegel by functions behaving similarly to the divisor function τ (x) := a|x 1 or
                            P
the double divisor function a|x τ (a). Since the von Mangoldt function ΛK is the-
oretically well behaved only as a function on the monoid IdealsK of all non-zero
ideals, our Vaughan decomposition inevitably takes place in the context of ideals.
To make the error arising from the decomposition small enough, we use the obser-
vation that Fundamental Lemma of sieve theory can be formulated on the monoid
IdealsK (Appendix D.2).
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                           9


   Thus our new goal (pursued in §9) is to show certain decays similar to the
following, under the assumption that g is totally equidistributed and F has average
zero:
             1       X        X                 ?
                                    1 · F(g(x)) = oN→∞ (1),
            Nn
                 x∈Ω∩(a+POK ) a|x

        1        X         XX                   ?
                                    1 · F(g(x)) = oN→∞ (1)     (both fast enough).
       Nn
            x∈Ω∩(a+POK ) a|x b|a

We write δ > 0 for the value of the left hand side of one of the above (assuming it
is not zero).
2.7. Parametrization of ideals. Intricate applications of the Cauchy–Schwarz
inequality and meticulous scrutinies of pigeonholes let Green-Tao [10] create a sit-
uation where they have not so few d ∈ [1, N] and a not so short interval Id ⊂ [1, N]
for each d such that
                                                  δ
                            E F(g(dx)) ≥
                          x∈Id              (log N)On (1)
(resp. not so few pairs (d, d′ ) ∈ [1, N]2 and an interval Id,d′ for each (d, d′ ) such that
                                                            On (1)
                                             ′           δ
                        E F(g(dx))F(g(d x)) ≥                         ;
                     x∈Id,d′                           log N
for simplicity, we will not further discuss this latter case in Introduction.)
   In retrospect, the following two properties of Z were making Green–Tao’s treat-
ment simple:
      • Z is a PID; more specifically the positive integers N parametrize all the
        non-zero ideals of Z;
      • For every non-zero ideal a ⊂ Z, there is a canonical choice of a basis a ∼   =Z
        (isomoprhism of abelian groups).
As alternatives of these features, we use the following consequences of geometry of
numbers (§§3, 9.1.4),
      • If we choose a set {aλ }λ∈Cl(K) of representing ideals for the ideal class group,
        then a suitable subset
                                 G              G
                                       Dλ ⊂          a−1
                                                      λ
                                λ∈Cl(K)        λ∈Cl(K)
                      −1
        (inverse (−) means the inverse fractional ideal) parametrizes all the non-
        zero ideals, where α ∈ Dλ corresponds to the ideal αaλ ;
      • There is a uniform, if not canonical, way of choosing bases a ∼= Zn for all
        the ideals a; this is important because some of the notions and results from
        combinatorics are coordinate-dependent.
   These will bring us to a situation where there are not so few ideals b within a
certain norm bound and not so small cubes Cb ⊂ b with respect to the above bases
b∼= Zn such that we have
                                                    δ
(2.2)                          E F(g|b (x)) ≥               .
                             x∈Cb             (log N)On (1)
10                                       WATARU KAI


As the function F now has average 0, the inequality (2.2) shows that g|b : b → G/Γ is
not too well equidistributed because the average computed on the points (g(x))x∈Cb
is failing to give the correct average.

2.8. Leibman’s theorem. The Quantitative Leibman Theorem A.4 characterizes
the equidistribution property of g : Zn → G(։ G/Γ) via its composition with group
homomorphisms (horizontal characters) η : G → R sending Γ into Z: the failure of
g to be equidistributed to a certain extent implies that there is an η within a certain
complexity such that the composite polynomial map η ◦ g : Zn → R has coefficients
close to integers.
    In our situation (2.2), this gives (after more pigeonholes) a horizontal character
η : G → R such that after the restriction to b, the composite polynomial map H :=
η◦g : OK → R has coefficients close to integers for not so few ideals b ⊂ OK . We want
to conclude that H itself has coefficients close to integers. Via the parametrization
of ideals, the situation that the coefficients of H|b are close to integers is equivalently
phrased using the two-variable polynomial map
                                     G                        H
                       H(−, −) :           (Dλ × aλ ) → OK −  → R,
                                     λ∈Cl(K)

that for some λ ∈ Cl(K) and not so few α ∈ Dλ within some bounded region, the
polynomial map H(α, −) obtained by freezing the first argument has almost integral
coefficients. By the bilinear nature of H(−, −), each coefficient of the polynomial
map H(α, −) is then a polynomial in α, to which we apply equidistribution theory
of polynomial maps again. This gives us some control of its global behavior in the
variable α ∈ a−1
               λ and in particular control of the coefficients of H(1, −), namely the
restriction of H to aλ . Since aλ ⊂ OK is a subgroup of index ≪K 1, We obtain
control of the coefficients of H itself.
    By (the easier implication of) the Leibman theorem, the fact that H has al-
                                                             e
most integral coefficients imply that g fails to be totally δ-equidistributed, where
                                       ′
δe has the form δ O(1)               c
                       exp(−(log N) ). Since g is already assumed to be totally ǫ-
equidistributed at the end of §2.4, we must conclude that δe < ǫ, which gives an
upper bound on δ. Some careful choices will have been arranged (§10) so that the
resulting bound of δ will achieve the desired kind of decay. This proves that the
correlation (2.1) is small.

2.9. Conclusion. As was already explained, from the fact that the correlation
(2.1) is small, Gowers Inverse Theorem implies that kΛK − ΛSiegelkUs+1 is small.
2
  Together with the smallness of kΛSiegel − ΛCramér kUs+1 proven earlier (see §2.2),
we conclude that kΛK − ΛCramér kUs+1 is small, and therefore by the von Neumann
theorem the sum
                                      X        t
                                               Y
                                                   ΛK (ψi (x))
                                    x∈OK,≤N i=1

is close to the one where ΛK is replaced by ΛCramér , which is elementarily com-
putable. This is how we will prove Theorem 1.1.

     2To be precise, we again need the W-trick to be able to apply Gowers Inverse Theorem.
            LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                       11


                       3. Norm-length compatible bases
   We sometimes want to choose bases a ∼ = Zn of unboundedly many ideals a in
some uniform manner, in order to get a handle on quantities which depend on the
choice of bases. The notion of norm-length compatible bases and their existence
serve this purpose.
   Given a ring homomorphism σ : K ֒→ C, use the same symbol to denote its R-
linear extension σ : K ⊗Q R → C. We define the canonical norm k−kcan on K ⊗Q R
by
                               kxkcan := max |σ(x)|.
                                         σ : K֒→C

   It is indeed a norm in the R-linear algebra sense because σ’s give rise to an
R-linear (ring) isomorphism K ⊗Q R ∼    = Rr1 × Cr2 where r1 is the number of ring
homomorphisms K ֒→ R and r2 is the number of complex conjugate pairs of homo-
morphisms K ֒→ C whose image is not contained in R.
   Let us recall that a subset D ⊂ (K ⊗Q R)× is said to be norm-length compatible
(terminology from [20]) if there is C > 1 such that for all σ : K ֒→ C and x ∈ D, we
have
                           1
                             N(x)1/n < |σ(x)| < CN(x)1/n
                          C
(the existence ofQan upper bound of this form implies the existence of a lower bound
by the formula σ |σ(x)| = N(x) and vice versa).
   It is known that there are O×                                         ×
                                 K -fundamental domains D ⊂ (K ⊗Q R) which are
norm-length compatible (see e.g. [20, §4.3]).
   Now we want to introduce the notion of norm-length compatible bases of ideals.
Proposition 3.1. There is a positive number CK > 1 such that the following holds:
for any non-zero fractional ideal a ⊂ K, there is a Z-basis x = (x1 , . . . , xn ) of a
such that if we write k−kx,∞ for the associated l∞ norm, then we have the following
relation of norms on a
                 1
(3.1)              N(a)1/n k−kx,∞ ≤ k−kcan ≤ CK N(a)1/n k−kx,∞ .
                CK
Proof. Choose a representative aλ for each ideal class λ ∈ Cl(K). Choose a Z-basis
xλ1 , . . . , xλn of aλ and let k−kλ,∞ be the associated l∞ norm. Since any two norms
on a finite dimensional real vector space are equivalent, there is a C > 1 such that
for all λ and x ∈ aλ , we have
                       1
(3.2)                    N(aλ )1/n kxkλ,∞ ≤ kxkcan ≤ CN(aλ )1/n kxkλ,∞ .
                       C
    Choose also a norm-length compatible O×                                 ×
                                                    K -domain D ⊂ (K ⊗Q R) . By the
definition of norm-length comatibility, there is a C′ > 1 such that for all σ : K ֒→ C
and y ∈ D, we have
                                 1
(3.3)                              N(y)1/n ≤ |σ(y)| ≤ C′ N(y)1/n .
                                C′
    Now let a be an arbitrary non-zero fractional ideal. There are unique λ ∈ Cl(K)
and y ∈ D ∩ K× such that a = yaλ . Note that N(a) = N(y)N(aλ ). Consider the
Z-basis yxλ1 , . . . , yxλn of a. The associated l∞ norm k−ka,∞ on a is identical to the
                                                                           ∼
                                                                           =
                                                                  → a.
norm induced by k−kλ,∞ via the multiplication-by-y isomorphism aλ −
12                                    WATARU KAI


     For any x ∈ aλ , by multiplying (3.2) and (3.3) we get
                1
                   N(a)1/n kyxka,∞ ≤ kyxkcan ≤ CC′ N(a)1/n kyxka,∞ .
               CC′
Since every element of a has the form yx with x ∈ aλ , the coefficient CK := CC′
and the bases yxλi (1 ≤ i ≤ n) do the job.                                    

Definition 3.2. Choose a CK > 1 as in Proposition 3.1 and fix it throughout the
paper.
   A Z-basis x1 , . . . , xn of a non-zero fractional ideal a ⊂ K is said to be norm-
length compatible (with coefficient CK if one wants to be precise) if the condition
(3.1) in Proposition 3.1 is satisfied.
   By Proposition 3.1, every non-zero fractional ideal admits norm-length compat-
ible bases.
Proposition 3.3. Let a1 ⊂ a2 be an inclusion of two non-zero fractional ideals.
Let x1i , x2i (1 ≤ i ≤ n) be a norm-length compatible basis (with coefficient CK ) on
each. Then the matrix representing the inclusion map with respect to these bases
has entries with absolute value ≤ C2K N(a1 a−1
                                             2 )
                                                1/n
                                                    .
   In particular, supposing CK has already been chosen, any two norm-length com-
patible bases of a given fractional ideal are connected by matrices with entries of
absolute value ≤ OK (1).

Proof. Let k−kj,∞ be the l∞ norm associated with the basis xj1 , . . . , xjn of aj . By
the definition of norm-length compatibility, we have for each i
                     x1i 2,∞ < CK N(a2 )−1/n x1i can
                             < CK N(a2 )−1/n · CK N(a1 )1/n x1i 1,∞
                             = C2K N(a1 a−1
                                         2 )
                                            1/n
                                                ,
as is claimed.                                                                       

Proposition 3.4. Let a be a non-zero fractional ideal and ι : Zn ∼
                                                                 = a be a norm-
length compatible basis. Then the function
                                Zn → Z
                                 x 7→ NK/Q (ι(x))/N(a)
is represented by a homogeneous polynomial of degree n with coefficients of absolute
value ≤ OK (1) (a bound independent of a).
Proof. Choose D ⊂ (K ⊗Q R)× and (aλ )λ∈Cl(K) as in the proof of Proposition 3.1.
Take the unique y ∈ D∩K× and λ such that a = yaλ . Since the matrix representing
                                          ∼
                                          =
the multiplication-by-y isomorphism aλ −  → a has entries of size ≤ OK (1), and
since the functions NK/Q (−)/N(a) and NK/Q (−)/N(aλ ) are compatible via this
isomophism at least up to sign, the problem is reduced to the case a = aλ for some
λ. But there are only finitely many λ ∈ Cl(K).                                   

     Let us take this opportunity to mention a classical result about ideals:
            LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                       13


Proposition 3.5 (density of ideals, see e.g. [2, p. 210]). Let λ ∈ Cl(K) and N ≥ 3.
We have
                    X             ress=1 (ζK (s))               1
                             1=                   N + OK (N1− n ).
                                     # Cl(K)
                     a∈IdealsK
                      N(a)≤N
                  [a]=λ in Cl(K)

                                   4. Nilsequences
   Nilsequences are sequences of complex numbers obtained in a certain geometric
way. We recall a minimum amount of definitions (and fix conventions thereof) that
are needed to make sense of the discussions that follow. For details and references,
see [12, §§1, 2]. Those who already know this concept should skip this section. See
Appendix A for the advanced results we need in this paper.
   We start out with the notions of nilmanifolds and polynomial maps into them.
Definition 4.1 (filtered Lie groups and nilmanifolds). Let s ≥ 0 be an integer. An
s-step filtered group (or a filtered group of degree s) is an abstract group G equipped
with a descending sequence of normal subgroups
                   G ⊃ G0 ⊃ G1 ⊃ · · · ⊃ Gs ⊃ Gs+1 = · · · = {1}
such that [Gi , Gj ] ⊂ Gi+j for all i, j ≥ 0.
    An s-step filtered Lie group (or a filtered Lie group of degree s) is a connected,
simply connected Lie group G equipped with a descending sequence of normal
subgroups as above, where Gi are also required to be closed and connected.
    An s-step nilmanifold (or a nilmanifold of degree s) is the data of an s-step
filtered Lie group G and a cocompact discrete subgroup Γ ⊂ G. In the narrower
sense, the quotient from the right G/Γ is called the nilmanifold, but usually a choice
of the above data is also assumed.
Definition 4.2 (Mel’cev basis). A Mel’cev basis X1 , . . . , Xm adapted to a nilmani-
fold G/Γ is a basis of the R-vector space Lie(G) satisfying:
      • The map
                     ψX1 ,...,Xm : Rm → G
                        (t1 , . . . , tm ) 7→ exp(t1 X1 ) . . . exp(tm Xm )
        is a bijection mapping Zm exactly onto Γ.
      • For each 0 ≤ j ≤ m, the R-span hj of the vectors Xj+1 , . . . , Xm is an ideal
        of the Lie algebra Lie(G). (Note that dim(hj ) = m − j.)
      • For each 0 ≤ i ≤ s, the Lie algebra of Gi is hm−dim(Gi ) .
   Mel’cev bases are known to exist for every nilmanifold [12, p. 478].
Definition 4.3 (metric on G/Γ associated with a Mel’cev basis). Let G/Γ be a
nilmanifold equipped with a Mel’cev basis. Give Lie(G) the positive definite inner
product where the given basis is an orthonormal basis. Translate it to the entire
G by the action from the right, which makes G/Γ a Riemannian manifold and in
particular a metric space.
   In our main references such as [12, Definition 2.2, also the footnote], they use
a somewhat different
                √    metric based on the l∞ -norm. Since we have the inequality
kxk∞ ≤ kxk2 ≤ m · kxk∞ for x ∈ Rm and as we will pretty quickly have to deal
14                                         WATARU KAI

                                                     √
with much larger multiplicative losses than           m, the choice of the metric here turns
out insignificant.
Definition 4.4 (complexity of a Mel’cev basis and subgroups). Let M > 0 be a
positive number.
   A Mel’cev basis X1 , . . . , Xm of a nilmanifold G/Γ is said to have complexity ≤ M
(or to be M-rational) if the structural constants cijk defined by
                                                    m
                                                    X
                                     [Xi , Xj ] =         cijk Xk
                                                    k=1

are all rational numbers of height ≤ M. (I.e., written as the quotient of integers
of size ≤ M.) If the choice of a Mel’cev basis is implicitly assumed, we simply say
that the nilmanifold G/Γ has complexity ≤ M.
   A closed subgroup G′ ⊂ G is said to have complexity ≤ M (or to be M-rational)
with respect to a Mel’cev basis X1 , . . . , Xm if Lie(G′ ) has a basis where each member
can be written as a linear combination of X1 , . . . , Xm with rational coefficients of
height ≤ M.
Definition 4.5 (horizontal characters). A horizontal character η on a nilmanifold
G/Γ is a continuous group homomorphism η : G → R/Z which annihilates Γ.
  If we are also given a Mel’cev basis X1 , . . . , Xm adapted to G/Γ, there is a unique
k = (k1 , . . . , km ) ∈ Zm such that for all (t1 , . . . , tm ) ∈ Rm :
                η(ψX1 ,...,Xm (t1 , . . . , tm )) = k1 t1 + · · · + km tm   mod Z.
The magnitude (or the modulus) |η| of η is defined by
                                        |η| := max |ki |.
                                                1≤i≤m

Definition 4.6 (polynomial maps). Let H, G be filtered groups in the sense of
Definition 4.1. For a map of sets g : H → G and h ∈ H, let ∂h g : H → G be the map
defined by (∂h g)(x) = g(xh)g(x)−1 for x ∈ G.
   We say g is a polynomial map if for any i1 , . . . , im ≥ 0 and h1 ∈ Hi1 , . . . ,
hm ∈ Him , the map ∂h1 . . . ∂hm g takes values in Gi1 +···+im .
   It is known that the composite of two polynomial maps is a polynomial map [29,
Theorems 1.6.9, 1.6.10]. We usually give abelian groups G the filtration G = G0 =
G1 ⊃ G2 = {0}. A map g : H → G between abelian groups with this filtration is
a polynomial map if (and actually only if) it is an affine-linear map (= a group
homomorphism plus a constant term).
   Suppose H = Zn , equipped with the filtration H = H0 = H1 ⊃ H2 = {0}, and G
is a filtered, conneced, simply connected Lie group where Lie(G) is equipped with a
basis X1 , . . . , Xm satisfying the conditions for a Mel’cev basis except the condition
ψX1 ,...,Xm (Zm ) = Γ. In this case there is an explicit description of a polynomial
map in terms of coordinates ψ = ψX1 ,...,Xm : Rm ∼        = G. To explain it, for a vector
x = (x1 , . . . , xn ) ∈ Zn and a multi-index i = (i1 , . . . , in ) ∈ Nn , let us use the power
notation
                                    xi := xi11 · · · · · xinn ∈ Z.
We also use the symbol |i| := i1 + · · · + in . It is known [12, Lemma 6.7] that a map
                                                                                     g    ψ −1
g : Zn → G is a polynomial map if and only if the composite ψ −1 ◦ g : Zn −
                                                                          → G −−∼−→
                                                                                           =
            LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                    15


Rm is written as:
                                                  X
                               ψ −1 ◦ g(x) =          ai xi
                                               i∈Nn

for some ai ∈ Lie(G|i| ) = {0} × Rdim(Gi ) . Simply put, polynomial maps are maps
written as polynomials where the coefficients in higher degrees are required to be
in smaller subgroups.
Definition 4.7 (smoothness norm). For a real number α ∈ R, write
                              kαkR/Z := min |α − n|.
                                           n∈Z
           n
  Let g : Z → R be a real-valued polynomial map of degree s, written as
                                      X
                               g(x) =    ai x i .
                                              i
                                           |i|≤s

Let N ≥ 1 be a natural number. Its smoothness norm kgkC∞ [−N,N]n is defined by
                                                    
(4.1)                 kgkC∞ [−N,N]n := max Ni ai R/Z .
                                           i6=0

   In fact, this should be written as kgkC∞ [−N,N]n (with a star ∗) if we follow [13,
                                             ∗
p. 4], which is different from the pre-existing C∞ [−N, N]n norm. However as in [13,
Lemma 2.1] there is some q = O(s!) such that kqgkC∞ [−N,N]n ≤ q kgkC∞  ∗ [−N,N]
                                                                                n and

vice versa, and this makes all the results we use valid regardless of which norm we
choose. As (4.1) is more convenient for the computation we will perform, we use it
in this paper and simply write it as kgkC∞ [−N,N]n without a star.

Definition 4.8 (nilsequences). An s-step nilsequence is a chain of maps
                                  g                   F
                              Zn −         → C,
                                 → G ։ G/Γ −
where G/Γ is an s-step nilmanifold, g is a polynomial map, G ։ G/Γ is the
canonical map and F is a Lipschitz function.
   It is said to be 1-bounded if the values of F always have absolute value ≤ 1,
to have Lipschitz constant ≤ L if F does, and to have complexity ≤ M if G/Γ is
equipped with such a Mel’cev basis.
   Nilsequences are used as test functions for the smallness of the Gowers norm.
Namely, the Gowers Inverse Theorem A.1 roughly says that when one knows that
a (suitably bounded) function f : [−N, N]n → C has small correlation

(4.2)                              E       f (x)F(g(x))
                               x∈[−N,N]n

with every 1-bounded s-step nilsequences F(g(−)) : Zn → C of controlled Lipschitz
constant and complexity, then it has small Us+1 -norm kf kUs+1 [−N,N]n . Moreover,
there is (quantitative) equidistribution theory of polynomial sequences (such as The-
                                                       g
orem A.4) to the effect that the image of [−N, N]n −   → G ։ G/Γ is equidistributed
on some submanifold within a certain error. This works as one of the main tools
for the analysis of the correlation (4.2).
16                                    WATARU KAI


                              5. The Cramér model
                                                1/2                   Q
  Recall from §1.2 the symbol Q = Qs = e(log N) /Os (1) and P(Q) := 0<p<Q p.
Recall that the von Mangoldt function ΛK : IdealsK → R≥0 is defined by
                 (
                   log N(p) if a = pm (p a non-zero prime ideal, m ≥ 1)
        ΛK (a) =
                   0        if not.

It is convenient to also define ΛK ((0)) := 0.
   For a non-zero fractional ideal a of K, we define ΛaK : a → R by
                                 ΛaK (x) = ΛK (xa−1 ).
   A primitive form of Mitsui’s Prime Number Theorem ([22], recalled in the proof
of Proposition 6.4) says that for a convex body Ω ⊂ K ⊗Q R, we have
                    X                    1         2 r2
                         ΛaK (x) ;                  p      Vol(Ω)
                                   res (ζK (s)) N(a) |DK |
                   x∈Ω∩a           s=1
                                         1       X
                                 ;                    1
                                   res (ζK (s))
                                     s=1         x∈Ω∩a

                                          1
This is why we put the coefficient   res (ζK (s)) in the next definition.
                                     s=1


Definition 5.1. We define the Cramér model ΛCramér,Q of the von Mangold func-
tion ΛK to be the function IdealsK ∪{(0)} → R defined by
                           
                           
                           0                     if a + (P(Q)) 6= OK
          ΛCramér,Q (a) =       1       P(Q)n
                            res ζK (s) ϕK (P(Q)) if a + (P(Q)) = OK .
                           
                              s=1

For a non-zero fractional ideal a, we define ΛaCramér,Q : a → R by

       ΛaCramér,Q (x) = ΛCramér,Q (xa−1 )
                         
                               1       P(Q)n
                                                      if x coprime to P(Q) in a
                       = res(ζK (s)) ϕK (P(Q))
                         
                           0                          if not.
(Recall that x being coprime to P(Q) means xOK + P(Q)a = a.)
   The usefulness of the Cramér model is that its statistical behavior is quite pre-
dictable.
   In order to make the next proposition useful enough later on, we have to for-
mulate it using subsets of Lipschitz boundary (Appendix E), a more general notion
than convex subsets. This is mainly because the subset obtained by bounding the
norm Ω≤a := {x ∈ K ⊗Q R | |N(x)| ≤ a} is not convex unless K is an imaginary
quadratic field or K = Q.
Proposition 5.2. Let ψ1 , . . . , ψt : Zd → a be Z-affine-linear maps. Write ψ̇i for
                                                                 ∼
                                                                 =
their linear parts. Choose a norm-length compatible basis ι : a −→ Zn and assume:
     • all ψ̇i have finite cokernels,
     • ker(ψ̇i ) does not contain ker(ψ̇j ) for all i 6= j,
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                                17


      • the coefficients of ι ◦ ψ̇i : Zd → Zn have absolute values bounded from above
                                                                       1/2
        by some L > 1, which we assume satisfies L ≪K ec log N for a positive
         number 0 < c < 1 small enough depending on t, d, n.
   Let N > 1 be an integer and Ω ⊂ [±N]dR be a closed set with boundary of Lipschitz
class Lip(d, M1 , M2 N) (Definition E.2) for some M1 , M2 ≥ 1. Assume that N is large
enough depending on M1 , M2 .
    (1) Then for any 2 ≤ z < Q, we have
                  t
                                                                                    !
          X Y                                Vol(Ω)       Y
(5.1)               ΛaCramér,z (ψi (x)) =                     βp (ψ1 , . . . , ψt )
              d i=1
                                           res (ζK (s))t 0<p<z
        x∈Ω∩Z                              s=1
                                                                                                1/2
                                                                   + Ot,d,K(Nd e−0.2 log              N
                                                                                                          ),
         where βp (ψ1 , . . . , ψt ) is the following coefficient depending on the maps ψi
         mod p:
                                                                                    
                                  n t                Yt Y
                                    p                
        βp (ψ1 , . . . , ψt ) :=                E              1[ψi (x) 6= 0 in a/pa] .
                                  ϕK (p) x∈(Z/pZ)d i=1
                                                            p|p
                           d
    (2) Suppose M = Z carries an OK -module structure and ψi are affine-OK -
        linear. For each prime ideal p, define
                                          t     " t                          #
                                     N(p)            Y
          βp (ψ1 , . . . , ψt ) :=             E         1[ψi (x) 6= 0 in a/pa] .
                                     ϕK (p) x∈M/pM i=1
                                              Q
        Then we have βp (ψ1 , . . . , ψt ) = p|p βp (ψ1 , . . . , ψt ).
Proof. The decomposition of βp (ψ1 , . . . , ψt ) is a consequence of Chinese Remainder
Theorem for torsion OK -module.
  To prove the main assertion, we shall first estimate the sum
                                  t YY
                                X Y
(5.2)                                                1[ψi (x) 6∈ pa]
                               x∈Ω∩Zd i=1 p<z p|p
                                                          Q                        t
                                                                            pn
and then multiply it by the coefficient res (ζ1K (s))t       0<p<z         ϕK (p)        to make it equal
                                              s=1
the left-hand side of (5.1).
   For each m ∈ N, set
                           (                   t
                                                                              )
                                               Y
                                          d                       −1
                    Σm :=       x∈Ω∩Z                N(ψi (x)a         )=m ,
                                               i=1
                    am := |Σm |.
                             Qt
Note that the condition p | i=1 N(ψi (x)a−1 ) for a prime number p is equivalent
to the condition that ψi (x) ∈ pa for some prime ideal p over p and some index i.
Thus a point x ∈ Ω ∩ Zd contributes to the sum (5.2) if and only if x ∈ Σm for
some m ∈ N that is coprime to all p < z.
   It follows that the sum (5.2) equals
                                      X
                                            am .
                                          m∈N
                                       (m,P(z))=1
18                                        WATARU KAI


We want to evaluate it using Fundamental Lemma D.2 of Sieve Theory.
  For each prime number p, write
(5.3)           g(p) :=      E        1[ψi (x) ∈ pa for some i and p over p]
                          x∈(Z/pZ)d
                                                                    
                                            t Y
                                            Y
                     =       E       1 −             1[ψi (x) 6∈ pa] .
                         x∈(Z/pZ)d
                                            i=1 p|p
                                                               n t
   Suppose first that g(p) = 1 for some p < z. Then βp = ϕKp (p) (1 − g(p)) = 0
                                     Qt
for this p. Meanwhile, the function i=1 ΛaCramér,z (ψi (x)) is identically zero under
the current supposition. Therefore Proposition 5.2 is true without the need to use
sieve method.
   Next, let us assume g(p) < 1 for all p < z. To invokeQ Lemma D.2, let us first
verify the hypothesis (D.2) on the size of the product w≤p<z (1 − g(p))−1 . For an
index i and a prime number p, write
                                 ψi,p , ψ̇i,p : (Z/pZ)d → a/pa
for the Fp -affine-linear and linear maps induced by ψi . When a prime ideal p over
p is moreover given, write
                                 ψi,p , ψ̇i,p : (Z/pZ)d → a/pa

for the induced Fp -linear and affine-linear maps ψ̇i .
Claim 5.3. There exists a natural number A = Od,t,K(LOn,t (1) ) such that the
following hold for all prime numbers p coprime to A:
     (1) ψi,p is surjective for all i;
     (2) for two indices i, j and two prime ideals p, q of residue characteristic p,
         whenever the pairs (i, p), (j, q) are distinct we have ker(ψ̇i,p ) 6⊂ ker(ψ̇j,q ).

Proof of Claim. By undergraduate linear algebra (n × n minors for the t maps ψ̇i ),
there is a natural number
                                      A1 = On,t (LOn,t (1) )
                                                                         ι
such that if p ∤ A1 the maps ψ̇i mod p: (Z/pZ)d → a/pa ∼    = (Z/pZ)n are surjective.
(So any multiple of A1 will do for the first assertion.)
   By the assumption that ker(ψ̇i )’s do not contain each other, one can find elements
xij ∈ ker(ψ̇i ) \ ker(ψ̇j ) which moreover can be taken to have coefficients of sizes
                                                    ι
Od,n (LOn (1) ). Their images ψ̇j (xij ) ∈ a \ {0} ∼
                                                   = Zn \ {0} have entries of sizes
Od,n (LOn (1) ). Hence their norms N(ψ̇j (xij )a−1 ) have sizes Od,n,K(LOn (1) ). Let A2
to be the least common multiple of these norms:
             A2 := lcm{N(ψ̇j (xij )a−1 ) | 1 ≤ i, j ≤ t} = Ot,d,K (LOn,t (1) ).
     Let A be the least common multiple of A2 and A1 :
                                      A := lcm{A1 , A2 }.
  Now let (i, p) and (j, q) be two distinct pairs such that p, q have the same residue
characteristic p ∤ A. We have to show ker(ψ̇i,p ) 6⊂ ker(ψ̇j,q ).
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                         19


   First assume i 6= j. In this case the residue class of xij in (Z/pZ)d certainly
belongs to ker(ψ̇i,p ). On the other hand, suppose xij ∈ ker(ψ̇j,q ), namely ψ̇j (xij ) ∈
qa. This would imply N(ψ̇j (xij )) ∈ N(qa)Z and hence



                     A2          A2          N(ψ̇j (xij )) N(q)
                        =                  ·              ·     ∈ Z,
                     p    N(ψ̇j (xij )a−1 ) N(a)N(q)        p



contradicting the condition p ∤ A2 . Thus we have shown ker(ψ̇i,p ) 6⊂ ker(ψ̇j,q ).
   Second, assume i = j and hence p 6= q. In this case, by Chinese Remainder
Theorem we have a natural surjection a/pa ։ a/pa ⊕ a/qa. Since ψ̇i mod p is a
surjection (Z/pZ)d ։ a/pa when p ∤ A1 , we conclude that the map induced by ψ̇i



                                  (Z/pZ)d ։ a/pa ⊕ a/qa



is surjective. In particular there is an element which maps to zero in a/pa and to
a non-zero element in a/qa. Therefore we conclude ker(ψ̇i,p ) 6⊂ ker(ψ̇i,q ).
   This completes the proof of Claim 5.3.                                       




   Resuming the proof of Proposition 5.2, now we can estimate g(p) for p ∤ A as
follows. Note that by the inclusion-exclusion principle we have


                             
                           
             [             
                    −1     
   g(p) = #        ψi,p (0) /pd
                           
             (i,p)         
                  1≤i≤t
                   p|p
                                                                            
                                                                       
           X                     X                                       
                   −1                       −1         −1              
        =        #ψi,p (0) −              #(ψi,p (0) ∩ ψj,q (0)) + · · ·  /pd ,
                                                                         
           (i,p)             (i,p)6=(j,q)                                
               1≤i≤t
                p|p




where the alternating sum has Ot,n (1) members. Since the linear part ψ̇i,p is surjec-
                                             −1
tive, we know that the inverse image ψi,p       (0) is a translate of ker(ψ̇i,p ). By Claim
5.3, the intersection ker(ψ̇i,p ) ∩ ker(ψ̇j,q ) or the intersection of more members has
codimension ≥ 2 in the Fp -vector space (Z/pZ)d . We conclude that the above
20                                             WATARU KAI


expression can be written as
                                                           
                                                             
                            X                                1
                                                
                                   # ker(ψ̇i,p ) /pd + Ot,n
                                                             p2
                             (i,p)              
                                1≤i≤t
                                 p|p
                                                 
                                                
                           X       1            1
                                       
                          =             + Ot,n
                                  N(p)          p2
                            (i,p)      
                                1≤i≤t
                                 p|p
                                             
                                X                                       
                                       t                           1
                          =               + Ot,n                            .
                                      N(p)                          p2
                                p|p

It follows that for p ∤ A we have
                                                                     Y                1
                                                                                               −t
(5.4)              (1 − g(p))−1 = (1 + Ot,n (1/p2 ))                             1−                   .
                                                                                      N(p)
                                                                     p|p

For p | A we will simply use the crude inequality g(p) ≤ 1 − p1d , which holds because
the expectation E defining g(p) is over the set (Z/pZ)d of cardinality pd and we are
assuming g(p) < 1 for all p < z; equivalently
(5.5)                                       (1 − g(p))−1 ≤ pd .
   Rosen’s Mertens’ theorem for number fields (Theorem D.1) states
              Y           1
                              −1
(5.6)                1−           = eγ · res (ζK (s)) · log x + OK (1).
               p
                         N(p)            s=1
                 N(p)<x

Formulas (5.4) (5.5) (5.6), together with the fact that prime ideals p with norm
≥ p2 are negligibly few,3 imply that
         Y                       Y                     Y
              (1 − g(p))−1 =           (1 − g(p))−1          (1 − g(p))−1
          w≤p<z                       w≤p<z, p|A                                 w≤p<z, p∤A
                                            Y                      t                               t
                                                   d        log z                     d       log z
                                 ≪K,t             p ·                    ≪K,t A                            ,
                                                            log w                             log w
                                            p|A

verifying the hypothesis (D.2) with
(5.7)                             M = OK,t (Ad ) and κ := t.
   Now we want to establish a relation of type (D.3) in Lemma    F D.2. Set X := Vol(Ω).
For a squre free natural number f , a point x ∈ Ω ∩ Zd is in m∈N Σf m if and only if
Qt              −1
  i=1 N(ψi (x)a    ) is a multiple of p for all prime factors p | f . This latter condition

                                                     −1
     3in the sense that the product Q             1
                                             1 − N(p)     over such p’s converges, say.
                                        p
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                                    21


is equivalent to the condition that for all p | f , there is a prime ideal p | p and an
index i such that ψi (x) ∈ pa. Thus:
            G          \
                Σf m = {x ∈ Ω ∩ Zd | ψi (x) ∈ pa for some i and p | p}.
           m∈N           p|f

Note that the condition in the bracket only depends on the mod f class of x ∈ Zd .
   Consider the complete set of representatives [0, f − 1]d ⊂ Zd for the quotient
(Z/f Z)d . Out of the f d residue classes in (Z/f d                     d
                                             F Z) , there are exactly f g(f ) classes
(any representatives of) which belong to m∈N Σf m ; this is true by the very defi-
nition of g(p) in (5.3) and by Chinese Remainder Theorem for various p | f . Fill
the interior of Ω ∩ Zd by as many disjoint translates of [0, f − 1]d as possible. By
Proposition E.1 there are ≪d,M1 ,M2 f Nd−1 points of Ω ∩ Zd not contained in any
of these translates. Note that there are Vol(Ω) + Od,M1 ,M2 (Nd−1 ) points in Ω ∩ Zd .
We conclude:
                     X
                          af m = Vol(Ω)g(f ) + Od,M1 ,M2 (f Nd−1 ),
                     m∈N

which implies that when we take X = Vol(Ω) the remainder rf in (D.3) is an
Od,M1 ,M2 (f Nd−1 ).
   Now we can apply Fundamental Lemma D.2 of Sieve Theory. This gives
                                           !
            X                  Y                            log D
(5.8)              am = Vol(Ω)   (1 − g(p)) (1 + O(M10 e9t− log z ))
          m∈N                         p<z
       (m,P(z))=1
                                                                                                              
                                                                                X        
                                                                   + Od,M1 ,M2 
                                                                                  f Nd−1 
                                                                                          .
                                                                                         1≤f ≤D
                                                                                          f |P(z)

                                                                    1/2
We choose D := N0.4 , which is larger than e(9t+1) log N > Q9t+1 > z 9t+1 whenever
N is large enough depending on t. For this choice the second O(−) term is an
                       Od,M1 ,M2 (D2 Nd−1 ) = Od,M1 ,M2 (Nd−0.2 ).

Meanwhile we have log D
                   log z ≥ (0.4 log N)/(log
                                            1/2
                                                N) = 0.4 log1/2 N. From (5.7) and
Claim 5.3, we know
                                                                    1/2                          1/2
        M = Ot,d,K (LOt,d,n (1) ) = Ot,d,K(eOt,d,n (c) log                N
                                                                              ) = Ot,d,K (elog         N
                                                                                                           )
if c is small enough depending on t, d, n, (this is the only constraint on how small
c should be), the first O(−) term in (5.8) is an
                                                         1/2
                                     Ot,d,K (e−0.3 log         N
                                                                   ).

Combined with the trivial bounds Vol(Ω) ≪d Nd and 1 − g(p) ≤ 1, the right-hand
side of (5.8) looks as follows if N is large enough depending on M1 , M2 :
                                          !
                            Y                                  1/2
                  Vol(Ω)       (1 − g(p)) + Ot,d,K(Nd e−0.3 log N ).
                               p<z
22                                               WATARU KAI

                                                           Q                   t                      Q     Q                  t
                                                                        pn                                                N(p)
     Lastly we multiply (5.8) by res (ζ1K (s))t              p<z       ϕK (p)        = res (ζ1K (s))t   p<z   p|p        N(p)−1        ,
                                         s=1                                            s=1
                            t
which is an OK (log z) by Rosen’s Mertens’ Theorem D.1.4 The right-hand side
becomes (compromising the exponent in the error term a little to absorb this
OK (logt z))
                                        !
                   1              Y                            1/2

                         t
                           Vol(Ω)     βp + Ot,d,K (Nd e−0.2 log N )
             res (ζK (s))         p<z
                     s=1
                               P         Q
and the left-hand side becomes x∈Ω∩Zd ti=1 ΛaCramér,z (ψi (x)) as was noted at the
beginning of this proof. This completes the proof of Proposition 5.2.            

                                1                                                              Q             1/5
Corollary 5.4. Let 0 < w < 10     log N and set W := P(w) =                                       0<p<w p ≪ N    .
Let b ∈ [0, W − 1]n ⊂ a be coprime to W in a. Then

                                ϕK (W) a                                              1
(5.9) 1 − res (ζK (s))                ΛCramér,Q (W(−)b )                      ≪s,K 1/2s+1 .
             s=1                 Wn                       U s+1
                                                                (a∩ [±N]n −b
                                                                             )     w
                                                                                       W


Proof. Write N′ := N/W. Let Ω ⊂ ([±4N′ ]na⊗R )s+2 be the convex set

                                                     [±N]na⊗R − b
                 Ω := {(x, h) | x + ω · h ∈                       for all ω ∈ {0, 1}s+1}.
                                                          W
By taking the 2s+1 st power of the left hand side of (5.9) and expanding it, it suffices
to show for all subsets S ⊂ {0, 1}s+1 the estimate

        X                                   #S Y
                                    ϕK (W)
                     res (ζK (s))                          ΛaCramér,Q (W(x + ω · h) + b)
                   s=1               Wn
     (x,h)∈Ω∩a                                       ω∈S
                                                                                                                  1
                                                                        = Vol(Ω) + Os,K ((N′ )n(s+2)                ).
                                                                                                                  w
By Proposition 5.2, the left-hand side is computed as
                      Y                                          
                                                        1p
(5.10)      Vol(Ω)          βp + Os,K (N′ )n(s+2) exp(−   log N′ ) ,
                                                        5
                            w≤p<Q
                              p|p

where by definition
                           #S
                  N(p)
     βp :=                              E        1[W(x + ω · h) + b 6= 0 in a/pa for all ω ∈ S].
                 N(p) − 1           (x,h)∈a/pa


The error term in (5.10) is negligible because it is much smaller than the aimed
decay rate 1/w1/Os (1) ≫s (log N′ )−1/Os (1) .


     4An asymptotically weaker bound Q    Q  N(p) t
                                      p<z   p|p N(p)−1    = O(lognt z) suﬃce here, which
                                                    n
                                 Q      N(p)        p
follows from the more naive bound p|p N(p)−1 ≤ p−1        and Mertens’ theorem for Z.
            LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                     23


   Since W and p are coprime by the conditions p | p and p ≥ w, we can estimate
βp as
                       #S
                 N(p)
        βp =                     E     1[x + ω · h 6= 0 in a/pa for all ω ∈ S]
               N(p) − 1     (x,h)∈a/pa
                                                                  
                    #S             1                #S              1
           = 1+         + Os               ·  1 −         + O s
                  N(p)          N(p)2              N(p)           N(p)2
                           
                        1
           = 1 + Os           .
                      N(p)2
      Q
Thus w≤p<Q βp = 1 + OK,s (1/w). It follows that (5.10) equals
          p|p
                                                                  
                                                        ′ n(s+2) 1
            Vol(Ω) · (1 + OK,s (1/w)) = Vol(Ω) + OK,s (N )           .
                                                                 w
This completes the proof of Corollary 5.4.                                          

                              6. The Siegel model
   Now we define the Siegel model ΛSiegel,Qs , which is a closer approximation to ΛK
than the Cramér model is. To define it we have to recall the notion of Siegel zeros.
Theorem 6.1 (Siegel zeros). There exists a positive
                                           √
                                                    constant 0 < cK < 1 such that
for every N ≥ 1 (and hence for every Qs = e log N/Os (1) ):
   (1) there is at most one Hecke character ψ whose conductor q satisfies N(q) < Q
       and such that the L-function L(ψ, s) has zero in the region (where s = σ+it)
                                             cK
                            σ >1−                         .
                                     log Q + log(|t| + 4)
       When it exists, let us write it ψSiegel (the Qs -Siegel character) and its con-
       ductor qSiegel.
   (2) The Siegel character ψSiegel is real, namely its values are in {±1}.
   (3) The L-function L(ψSiegel, s) can have at most one zero βSielge (the Qs -Siegel
       zero) in the said region. It is necessarily real and for any 0 < ǫ < 1 there
       is a positive constant 0 < cK (ǫ) < 1 satisfying:
                             cK                       cK (ǫ)
                     1−             < βSiegel < 1 −              .
                          log(4Qs )                 N(qSiegel )ǫ
        Consequently, for any A > 1 we have N(qSiegel) ≫K,A,s (log N)A .
Proof. See e.g. [31, Theorem 1.9 (p. 277)], and [18, Theorem 5.28 (p. 122)] or [23,
Theorem 11.7 (p. 367), Corollary 11.15 (p. 372)].                                

   Of course, the existence of a Siegel zero (for any single Q = Qs ) would contradict
the Grand Riemann Hypothesis, and so we do not believe in it. Nonetheless, being
unable to disprove its existence, we have to take its potential influence into account
to achieve better approximations.
   We always adopt the convention that we ignore the term related to ψSiegel when
it does not exist.
24                                     WATARU KAI


Definition 6.2. The Siegel model ΛSiegel,Qs : IdealsK ∪{(0)} → R is defined by:
                                                                 
(6.1) ΛSiegel,Q (a) := ΛCramér,Q (a) · 1 − ψSiegel ([a])N(a)β−1
                                                           
                     1      P(Q)n             ψSiegel([a])
                                          1−                      if a + (P(Q)) = OK
           = res(ζK (s)) ϕK (P(Q))            N(a)1−βSiegel
              
                 0                                                if not.
By our convention, when the Siegel character does not exist, we mean ΛSiegel,Q :=
ΛCramér,Q and ΛaSiegel,Q := ΛaCramér,Q .

   Note that the value ψSiegel([a]) ∈ {±1} is well defined in (6.1) because the ideal
a is coprime to q under the assumption a + (P(Q)) = OK ; to see this, it suffices to
verify that every prime factor p of q is also a prime factor of (P(Q)) in OK . Suppose
p has residue characteristic p. We have p ≤ N(p) ≤ N(q) < Q. This implies that p
divides (P(Q)), and hence so does p.
   For a non-zero fractional ideal a we define ΛaSiegel,Q : a → R by

 ΛaSiegel,Q (x) = ΛSiegel,Q (xa−1 )
                                      a             
           1      P(Q)n              ψSiegel (x)
                                1−                      if x coprime to P(Q) in a;
 = res(ζK (s)) ϕK (P(Q))            N(xa−1 )1−βSiegel
   
      0                                                 if not,

where we used the fact that for any mod q Hecke character ψ and x ∈ a×,q := {x ∈
a | x generates a/qa as an OK -module }, by subtracting the diagonal image of x
in C(q) we have ψ a (x) = ψ([x−1 a]) = ψ([xa−1 ])−1 (see §D.3 for notation).
Proposition 6.3 (Pointwise bound). For all N ≥ 3, we have the bound
                     ΛK (a), ΛCramér,Q (a), ΛSiegel,Q (a) ≪K log N
for all non-zero ideal a of norm < N.
Proof. For ΛK , we have the obvious bound |ΛK (a)| ≤ log N(a) < log N.
  Since |ΛSiegel,Q (a)| ≤ 2|ΛCramér,Q (a)|, it remains to verify the assertion for ΛCramér,Q ,
which is equivalent to showing
             P(Q)n                                                    1/2
                      ≪K log N,        where we recall Q = e(log N)         /Os (1)
                                                                                      .
            ϕK (P(Q))
By the multiplicativity of ϕK , the left hand side equals
                               Y Y             1
                                                   −1
                                          1−           .
                                             N(p)
                               0<p<Q p|p

                                                                               Q              1
                                                                                                     
Since there are few prime ideals p of degree ≥ 2 in that the product             p        1 − N(p)
over such prime ideals converges absolutely (p having degree ≥ 2 means by definition
N(p) ≥ p2 where p is the residue characteristic), Rosen’s Mertens’ Theorem D.1
implies that the previous quantity is bounded as
                                   ≪K log Q < log N,
which completes the proof.                                                                       
                LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                  25


Proposition 6.4 (Mitsui’s Prime Number Theorem). Let a be a non-zero fractional
ideal, N > 2 a positive number and Ω ⊂ K ⊗Q R≤NN(a)1/n a convex body. Let q be
                                                   1/2
a non-zero ideal with N(q) < e(log N) /OK (1) , and a ∈ (a/qa)× be a residue class.
Then we have
                  X                                      √
(6.2)                   ΛaK (x) − ΛaSiegel,Q (x) ≪K Nn e− log N/OK (1) .
                    x∈Ω∩a
                  x≡a in a/qa

Proof. This is essentially Mitsui’s Prime Number Theorem with potential Siegel
zero incorporated [19, Theorem 5.1], but spelling out the full derivation process is
somewhat tedious, as the reader shall now see.
   First we consider the case qSiegel | q. In this case ψSiegel can be considered as a
mod q character. Mitsui’s Prime Number Theorem [19, Theorem 5.1] reads
                                     
               X                  
(6.3)                      ΛaK (x)
                                  −
               x∈Ω∩a
             x≡a in a/qa
                                            Z
            1             2 r2
                              p                    1 − ψSiegel (−; a)N((−)a−1 )βSiegel −1 dµadd
        N(a)ϕK (q) res ζK (s) |DK |            Ω
                      s=1
                                                                                        √
                                                                          ≪K Nn e− log N/OK (1) .

Here, the symbol ψSiegel (−; a) means the composite

                                 (id,a)                             ja        ψSiegel
               (K ⊗Q R)× −−−→ (K ⊗Q R)× × (a/qa)× −→ C(q) −−−−→ S1

where ja is the canonical map induced by the inclusions; see §D.3. For x ∈ a + qa,
via the inclusion a + qa ⊂ (K ⊗Q R)× we have ψSiegel (x; a) = ψSiegel
                                                               a
                                                                      (x).
                  2r2  R
   The integral √       Ω
                          is approximated by the sum
                      |DK |

                                      X
                      N(qa)                         a
                                               1 − ψSiegel (x)N(xa−1 )βSiegel −1
                                   x∈Ω∩a
                                 x≡a in a/qa

                                  1
within an error OK (Nn− 2 ) (see (6.13) below for some detail), which is negligible
here. Up to this error, the left hand side of (6.3) becomes
                                                                                      !
           X                        1      N(q)
                      ΛaK (x) −                         a
                                                  (1 − ψSiegel (x)N(xa−1 )βSiegel −1 ) .
                                res ζK (s) ϕK (q)
          x∈Ω∩a                       s=1
        x≡a in a/qa


On the other hand, the left hand side of (6.2) is by definition
               X                                                                        
                            ΛaK (x) − ΛaCramér,Q (x)(1 − ψSiegel
                                                           a
                                                                  (x)N(xa−1 )βSiegel −1 ) .
            x∈Ω∩a
          x≡a in a/qa
26                                         WATARU KAI


We have to show that the above two quantities are within the claimed error. So we
are reduced to showing the following two bounds:
                                                                !
           X                                   1      N(q)
(6.4)                  ΛaCramér,Q (x) −
                                           res ζK (s) ϕK (q)
          x∈Ω∩a                            s=1
        x≡a in a/qa
                                                                   √                     
                                                          = OK Nn e− log N log N(a)/OK (1) ,

which turns out to not require the condition qSiegel | q, and
                                                                !
           X                                   1      N(q)
(6.5)                  ΛaCramér,Q (x) −                               a
                                                                    · ψSiegel (x)N(xa−1 )βSiegel −1
                                           res ζK (s) ϕK (q)
          x∈Ω∩a                            s=1
        x≡a in a/qa
                                                                             √            
                                                                    = OK Nn e− log N/OK (1) .

   To show (6.4), we apply Proposition 5.2 to the (single) affine-linear map qa → a;
y 7→ y + a. By §3, if we equip the source and target with norm-length compatible
bases, the inclusion map Zn ∼= qa ֒→ a ∼
                                       = Zn is represented by a matrix with entries
                1/n    1/Ot,d,n
of sizes ≤ N(q)     <Q          . We conclude
                 X                               X
(6.6)                     ΛaCramér,Q (x) =              ΛaCramér,Q (y + a)
              x∈Ω∩a                              y∈qa
            x≡a in a/qa                         y+a∈Ω
                                                
                       1            X           Y                  √      
             =                                 1  β   + O K  Nn −0.2 log N
                                                                 e             .
                 res (ζK (s))                       p
                 s=1                x∈Ω∩a            p
                                  x≡a in a/qa


Let us evaluate βp ’s in this case. If p | q, for every y ∈ qa we know that y + a 6∈ pa
                                                                   N(p)          N(p)
because a is taken from (a/qa)×. This implies that βp = N(p)−1           · 1 = N(p)−1  .
Next suppose p ∤ q. Then since qa and a localized at OK,p are equal, the map
qa/p(qa) → a/pa induced by the inclusion is an isomorphism. Hence            E    1[y +
                                                                        y∈a/p(qa)
                1                 N(p)          1
a 6∈ pa] = 1 − N(p) so that βp = N(p)−1 · (1 − N(p) ) = 1. It follows that

                             Y            Y      N(p)      N(q)
                                   βp =                  =        .
                              p
                                                N(p) − 1   ϕK (q)
                                          p|q


This together with (6.6) implies (6.4).
   Next we turn to (6.5). We will deduce this from (6.4) by an Abel summation-like
argument.
                                                           a
   Under the assumption qSiegel | q, the function x 7→ ψSiegel (x) on {x ∈ a | x ≡
a in a/qa} can be seen as the restriction to a of a continuous function ψSiegel(−; a)
on (K ⊗Q R)× . Since ψSiegel(−; a) is a locally constant function into {±1}, by
splitting the convex body Ω into On (1) convex pieces, we may assume that the
               LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                                27

 a
ψSiegel (x) part is constant. Thus what we have to show is:

                                                              !
            X                                1      N(q)
(6.7)                  ΛaCramér,Q (x) −                          · N(xa−1 )βSiegel −1
                                         res ζK (s) ϕK (q)
          x∈Ω∩a                           s=1
        x≡a in a/qa
                                                                           √            
                                                                  = OK Nn e− log N/OK (1) .


Let us write
                                                                    √
                        Na (x) := N(xa−1 ) and Y := ecY              log N
                                                                             ,

where 0 < cY < 1 is a small enough constant depending on K that we will specify
after (6.10).
   We cover the cube [±OK (1)N]n by disjoint translates Pi (i ∈ I) of [0, N/Y]n .
Thus #I = OK (Yn ). We have

(6.8)
                                                                                     !
                      X      X                                1      N(q)
L.H.S. of (6.7) =                       ΛaCramér,Q (x) −                                · Na (x)βSiegel −1 .
                                                          res ζK (s) ϕK (q)
                      i∈I x∈Ω∩Pi ∩a                        s=1
                          x≡a in a/qa


   Let Inegl ⊂ I be √ the set of those i’s such that the cube Pi contains a point     √x
with |σ(x)| < N/ Y for some σ : K ֒→ C. It is easy to see that #Inegl ≪K N/ Y.
Since |ΛaCramér,Q (x) − res ζ1K (s) ϕN(q)
                                      K (q)
                                            | ≪K log N and Na (x)β−1 ≤ 1, the contribution
                          s=1
of Inegl in (6.8) is bounded as:


                                                                        !
          X         X                                   1      N(q)
(6.9)                           ΛaCramér,Q (x) −                           · Na (x)βSiegel −1
                                                    res ζK (s) ϕK (q)
        i∈Inegl x∈Ω∩Pi ∩a                           s=1
               x≡a in a/qa
                                                                  √                              √
                                          ≪K Nn log Ne−cY          log N
                                                                            ≪K Nn e−0.9cY            log N
                                                                                                             .

   Next, for i ∈ I \ Inegl , if we write Mi := maxx∈Pi Na (x), we have

                           
                          1
                  1 − OK √      Mi ≤ Na (x) ≤ Mi                   for all x ∈ Pi
                           Y

and hence
                                                                           
                                                                OK (1)
                       Miβ−1 ≤ Na (x)β−1 ≤ Miβ−1 ·            1+ √               .
                                                                  Y
28                                            WATARU KAI


Also noting 0 < Miβ−1 ≤ 1, we establish the following bound:
                                                                               !
           X             X                                    1      N(q)
                                     ΛaCramér,Q (x) −                             · Na (x)βSiegel −1
                                                          res ζK (s) ϕK (q)
         i∈I\Inegl    x∈Ω∩Pi ∩a                          s=1
                      x≡a in a/qa

                                                                                !
           X             X                                    1      N(q)              β         −1
     ≤                                ΛaCramér,Q (x) −                               Mi Siegel
                                                           res ζK (s) ϕK (q)
         i∈I\Inegl      x∈Ω∩Pi ∩a                         s=1
                       x≡a in a/qa


                 X                                           
                                                     OK (1)
         +                 OK (log N) · OK            √         .
             x∈Ω∩Pi ∩a
                                                       Y
             x≡a in a/qa

Since we can write Ω ∩ Pi ∩ a = Ωi ∩ a for another convex open set Ωi , we can apply
(6.4) to bound the first term. For the second term we use #Pi = On (Nn /Yn ). Let
us also recall #I = OK (Yn ). This implies that the previous quantity is:
           X               √                                   cY √
                                                                            
(6.10)            OK Nn e− log N/OK (1) + OK Nn Y−n (log N)e− 2 log N
          i∈I\Inegl
                                                                             √                         √
                                                              (ncY − O 1(1) ) log N
                                              = Nn OK (e                K             + e−0.49cY           log N
                                                                                                                   ).
If cY is so small that in the above formula we have ncY − OK1(1) < −0.49cY , say
            1
cY := (n+1)O  K (1)
                    , this last value is an
                                                               √
                                      OK (Nn + e−0.49cY         log N
                                                                        ).
   Combining this with (6.9), we conclude that the estimate (6.5) holds, which
completes the proof of Proposition 6.4 for the case qSiegel | q.
   Now consider the (supposedly) easier case qSiegel ∤ q. In this case (6.3) does not
have the Siegel term. Hence what we have to show is:
          X                                                      √
(6.11)                            a
                  ΛaCramér,Q (x)ψSiegel (x)Na (x)β−1 = OK (Nn e− log N/OK (1) ).
           x∈Ω∩a
         x≡a in a/qa

Let qlcm = qSiegel ∩ q be the least common multiple of qSiegel and q in the monoid
of ideals. We have natural surjections with kernels of sizes < Q
                                          prSiegel                   prq
                  (a/qSiegela)× ←−−−− (a/qlcma)× −−→ (a/qa)× .
                     P                                 P          P
Any sum of the form       x∈Ω∩a   can be partitioned as b∈pr−1
                                                            q (a)
                                                                              x∈Ω∩a        .
                              x≡a in a/qa                                  x≡b in a/qlcm a
By splitting Ω into its intersections with the connected components of (K⊗Q R)× , we
                                 a
may again assume that x 7→ ψSiegel    (x) is constant on each (b + qSiegela) ∩ Ω, whose
                           a
value we will write as ψSiegel(Ω, b) (assuming now Ω is contained in a connected
component of (K ⊗Q R)× ). Hence the left hand side of (6.11) becomes:
                     X                               X
                             a
                            ψSiegel (Ω, b)                     ΛaCramér,Q (x)Na (x)β−1 .
                b∈pr−1
                    q (a)
                                                x∈Ω∩a
                                             x≡b in a/qlcm a
               LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                      29


Since qSiegel | qlcm, we can apply (6.7) to qlcm. The previous value now looks like
                                                                       
               1      N(q)       X                              X                      
(6.12)                                     a
                                           ψSiegel (Ω, b)                     Na (x)β−1 
         res (ζK (s)) ϕK (q)                                                           
         s=1                   b∈pr−1
                                   q (a)
                                                               x∈Ω∩a
                                                            x≡b in a/qlcm a
                                                                                   √
                                                                     + OK (Ne− log N/OK (1) ).
   Choose a norm-length compatible basis qlcma ∼    = Zn and and let Γ ⊂ a be the
corresponding fundamental paralelogram. The convex body Ω ∩ a is covered by
OK (Nn /N(qlcl)) disjoint translates of Γ. The contribution from the points x with
|σ(x)| < N1/2 for some σ : K ֒→ C is OK ((N)n−1/3 ), and is negligible as before.
Outside this region (where the value of Na is always ≫K Nn−1/2 ), the value of
Na (−)β−1 varies by at most ±OK (N(qlcm )N−1/2 ) within any translate of Γ. It
follows that for any b ∈ pr−1
                           qlcm (a):

              X                                      Z
                             β−1        1      2 r2
(6.13)                  a
                      N (x)       =           p        Na (x)β−1 dx
                                     N(qlcm a) |DK | Ω
            x∈Ω∩a
         x≡b in a/qlcm a
                                                                                              
                                                                           Nn       N(qlcm )
                                                               + OK               ·                .
                                                                          N(qlcm)    N1/2
(Yes, we are more or less doing the theory of integration of Lipschitz functions in a
re-scaled environment.) If we substitute this into (6.12), the problem boilds down
to evaluating
                                  X
                                         a
                                        ψSiegel (Ω, b),
                                   b∈pr−1
                                       q (a)

                        a
which is zero because ψSiegel restricted to pr−1
                                               q (a) is not constant by the assumption
qSiegel ∤ q.
   This settles the case of qSiegel ∤ q and completes the proof of Proposition 6.4. 

                  7. The Cramér and Siegel models are close
  In this section, we use the Weil bound for character sums to prove that ΛaCramér,Q
and ΛaSiegel,Q are close in the Gowers norms.
Lemma 7.1. Let χ : C(q) → {±1} be a real primitive Hecke character. By the
natural inclusion (OK /q)× ֒→ C(q) and zero extension, we regard it as a function
on OK /q.
   Then for any positive number 0 < ǫ < 1, we have
                                                                 1
                           kχkUs+1 (OK /q) ≪ǫ,s,K N(q)− 2s+2 +ǫ .
More concretely,

                     X           Y                                                1
                                          χ(x + ω · h) ≪ǫ,s,K N(q)(s+2)− 2 +ǫ
                  x∈OK /q    ω∈{0,1}s+1
                h∈(OK /q)s+1

for all 0 < ǫ < 1.
30                                        WATARU KAI

                   Q                                Q
Proof. Write q = p pmp . Note that then N(q) = p N(p)mp . By Chinese Re-
                                                        Q
mainder Theorem, the left-hand side of the assertion is p kχkUs+1 (OK /pmp ) . Let
us consider these factors separately.
   When the residue characteristic of p is odd, we have mp = 1 because the ker-
nel of (OK /pmp )× ։ (OK /p)× =: F(p)× has odd order and hence no non-trivial
homomorphism into {±1}.
   We have by the definition of k−kUs+1 and multiplicativity of χ:
               2s+1                1          X          Y
           kχkUs+1 (F(p)) =                                        χ(x + ω · h)
                                N(p)s+2
                                           x∈F(p)     ω∈{0,1}s+1
                                          h∈F(p)s+1
                                                                                 
                                1             X              Y
                           =                          χ               (x + ω · h) .
                             N(p)s+2
                                           x∈F(p)         ω∈{0,1}s+1
                                          h∈F(p)s+1

The 2s+1 values ω · h (for various ω ∈ {0, 1}s+1) are all different
                                                                  Q     except for
O(2s+1 )N(p)s values of h ∈ F(p)s+1 . In particular the polynomial ω∈{0,1}s+1 (X +
ω · h) ∈ F(p)[X] is not a square. Thus for such an h, the Weil bound [18, Theorem
11.23 with n=1] applies to give
                                                 
                     X            Y
                           χ          (x + ω · h) ≤ sN(p)1/2 .
                      x∈F(p)     ω∈{0,1}s+1

For those O(2s+1 )N(p)s excluded values of h, we bound the same sum by the trivial
bound ≤ N(p). It follows that for every p with odd residue characteristic, we have
                          s+1
(7.1)                 kχk2Us+1 (F(p)) < sN(p)−1/2 + O(2s+1 )N(p)−1 ,
                                                  1
which is ≪s N(p)−1/2 and even < N(p)− 2 +ǫ for all but finitely many p failing to
satisfy N(p)ǫ > Os (1).
   When the residue characteristic of p is 2 (there are ≤ n of them), it is no
longer automatically true that the p-part of the conductor of χ satisfies mp = 1,
but nonetheless there is an upper bound on mp . Namely, by the structure of the
completion O×                                                                   ep
               K,p [24, Proposition 5.7] there is an exponent ep such that 1 + p OK,p
                                       ×    2
is contained in the set of squares (OK,p ) . Since any real character χ is trivial on
squares, it follows that mp ≤ ep . We conclude
              2s+1
(7.2)     kχkUs+1 (F(p)) ≤ 1 = N(pmp )1/2 · N(pmp )−1/2 ≪K N(pmp )−1/2 .
                                                            Q
  Taking the product of (7.1) (7.2) over all p and recalling p N(p)mp = N(q), we
conclude that our assertion holds.                                             

Proposition 7.2. Let a ∼
                       = Zn be a norm-length compatible basis and Ω ⊂ [±N]na⊗R
be a convex set. Then

                                                                        1
 (ΛaSiegel,Q − ΛaCramér,Q ) · 1Ω Us+1 [±N]n ≪s,K,ǫ N(qSiegel)− 2s+2 +ǫ ≪s,K,A (log N)−A

for any 0 < ǫ < 1/2s+4 and A > 1.
                 LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                                        31


Proof. The latter inequality follows from the last line of Theorem 6.1.
  Given 0 ≤ a ≤ OK (Nn ), consider the following subset
                                  Ω(a) := {x ∈ Ω | N(xa−1 ) ≤ a},
which we know to have boundary of Lipschitz class Lip(n, On (1), OK (N)) (see
Lemma E.3).
   Suppose for the time being that for some 0 < c < 1 we have the following
inequality
(7.3)                            a
                 ΛaCramér,Q (−)ψSiegel (−)1Ω1 (−) Us+1 [±N]n ≪s,K N(qSiegel )−c

uniformly for all subsets Ω1 ⊂ [±N]na⊗R with boundary of such Lipschitz class. If
we write M = OK (Nn ) for the maximum value of norms on [±N]na , we have the
following identity of functions on [±N]na :

                                                                                       Z M
          −1 βSiegel −1                 βSiegel −1
N((−)a       )            1Ω (−) = M                  1Ω (−) + (1 − βSiegel)                    y βSiegel −2 1Ω(y) (−)dy.
                                                                                        1

Then we deduce the inequalities below, where the “≤” follows from the triangle in-
                                                                                        n
equality for the Gowers norm and its integral version (noting that k−kUs+1 [±N]n : C[±N] →
R is a continuous function with respect to the unique topology on the source) and
“≪” follows from the assumption (7.3):


  (ΛaSiegel,Q − ΛaCramér,Q ) · 1Ω Us+1 [±N]n


 = ΛaCramér,Q (−)ψSiegel ((−)a−1 )N((−)a−1 )βSiegel −1 1Ω (−) Us+1 [±N]n

                                              "                                                   Z M                                  #
 =   ΛaCramér,Q (−)ψSiegel ((−)a−1 )             βSiegel −1
                                                  M            1Ω (−) + (1 − βSiegel )                  y   βSiegel −2
                                                                                                                         1Ω(y) (−)dy
                                                                                                    1
                                                                                                                                           Us+1 [±N]n


 ≤ ΛaCramér,Q ψSiegel 1Ω Us+1 [±N]n · MβSiegel −1

                           Z M
        + (1 − βSiegel )         y βSiegel −2 ΛaCramér,Q ψSiegel1Ω(y) Us+1 [±N]n dy
                           1

                                                                Z M                         !
                     −c        βSiegel −1                                 βSiegel −2
 ≪s,K N(qSiegel)           M                + (1 − βSiegel)           y                dy
                                                                 1


 = N(qSiegel)−c .

Thus we are reduced to showing an inequality of the form (7.3) with c = 2−(s+2) − ǫ.
                                  s+2
                    e ⊂ [±2N]n
  To show this, let Ω                  be the following bounded set:
                              a⊗R

                 e := {(x, h) ∈ a ⊗ R | x + ω · h ∈ Ω1 for all ω ∈ {0, 1}s+1 }.
                 Ω
32                                                   WATARU KAI


It has boundary of Lipschitz class Lip(n(s + 2), On,s (1), OK (N)). The 2s+1 st power
of the left-hand side of (7.3), multiplied by the normalization factor ≍s Nn(s+2) , is
              X           Y
(7.4)                            ΛaCramér,Q (x + ω · h)ψSiegel ((x + ω · h)a−1 ).
                e s+2 ω∈{0,1}s+1
          (x,h)∈Ω∩a

Let D ⊂ a be a complete
                    P               representatives for a/qSiegela. The above sum can be
                              set ofP
written as a sum (a,b)∈Ds+2 (x,h)∈Ω∩(a,b)+(qe         Siegel a)
                                                                s+2 (−). Since ψSiegel is a mod

qSiegel character, it is legitimate to write ψSiegel ((x+ω·h)a−1 ) = ψSiegel ((a+ω·b)a−1 )
for all (x, h) ∈ (a, b) + (qSiegela)s+2 . The sum (7.4) thus equals
                                                         
            X               Y
(7.5)                             ψSiegel((a + ωb)a−1 )
        (a,b)∈Ds+2           ω∈{0,1}s+1
                                                                                                        
                                             X                            Y
                         ·                                                        ΛaCramér,Q (x + ω · h) .
                                   e
                             (x,h)∈Ω∩(a,b)+(qSiegel a)
                                                       s+2            ω∈{0,1}s+1
                                         Q
Note that the first product ω in this expression is nonzero only when a, b are such
that a + ω · b is coprime to qSiegel in a for all ω. So we concentrate on such a, b.
   For each a, b, the latter factor of the expression has already been computed in
Proposition 5.2. The volume part from the proposition is now Vol(Ω)/N(qe      Siegel )
                                                                                      s+2
       n(s+2)            s+2
(≪s N         /N(qSiegel) ) reflecting the fact that we are on the ideal qSiegela. The
coefficients βp from the proposition a priori seem to depend on a, b, but they do not.
For when p | qSiegel, all the elements of a + ω · b + qSiegela are coprime to p in a for
                                                                                       s+1
every ω by the assumption that a + ω · b is. It follows that βp = (N(p)/ϕK (p))2
regardless of (a, b). When p ∤ qSiegel, by the affine-OK -linear isomorphisms induced
by the inclusion qSiegela ֒→ a and the translations by a + ω · b:
                     Y                     ∼
                                           =
                                              Y         ∼
                                                        =
                                                           Y
                                           →
                        qSiegela/pqSiegela −      a/pa −→      a/pa,
                             ω                                    ω                ω

it follows that
                                             s+1
              βp = (N(p)/ϕK (p))2                             E          1x+ω·h6=0 in F(p) for all ω
                                                         (x,h)∈F(p)s+2
                                                
                                          1
                   = 1 + Os                          ,
                                         N(p)2
in which (a, b) does not appear. It also follows that
           Y                       Y             1
                                                             −2s+1
                  βp ≪K               1−                               ≪K log N(qSiegel) < log N
                                                 N(p)
           p<Q                   p|qSiegel
            p|p
                                                                                       P
by Mertens’ theorem D.1 say. We conclude that the sum                                      (x,h) in (7.5) has the
following form regardless of (a, b):
               e                s+2 Y
           Vol(Ω)/N(q   Siegel )                               1p
(7.6)                                 βp + Os,K (Nn(s+2) exp(−   log N)).
                res (ζK (s))                                   5
                   s=1                       p<Q
            LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                             33


The contribution of first term of this expression to (7.5) is, by Lemma 7.1,
                                                  1         Nn(s+2)
                 ≪ǫ,s,K N(qSiegel)(s+2)− 2 +ǫ ·                         · log N.
                                                          N(qSiegel)s+2
By Theorem 6.1, the log N factor can be absorbed in N(qSiegel)ǫ by modifying ǫ a
little, and so we end up with a bound
                                                                  1
(7.7)                       ≪ǫ,s,K Nn(s+2) N(qSiegel)− 2 +ǫ .
The contribution of the error term in (7.6) to (7.5) is
                                                                      1p
(7.8)               ≪s,K Nn(s+2) N(qSiegel)s+2 exp(−                    log N)
                                                                      5
                    < Nn(s+2) N(qSiegel)−1 ,
where ‘<’ is true by the assumption Os (1) > 10s in (1.2).
  The inequalities (7.7) (7.8) give the assertion raised to the 2s+1 st power. This
completes the proof of Proposition 7.2.                                          
                                                                                                    g
Corollary 7.3. Let a ∼    = Zn be a norm-length compatible basis and a ∼
                                                                       = Zn −→G→
       F
G/Γ −  → C be a 1-bounded nilsequence where the Lipschitz constant of F is bounded
from above by a Lip(F) ≥ log N. Assume that the Q-Siegel zero exists (so that
ΛaSiegel,Q and ΛaCramér,Q are different). Then for any convex set Ω ⊂ [±N]na⊗R and
a ∈ a, we have
                        X
(7.9)                            (ΛaSiegel,Q − ΛaCramér,Q )(x)F(g(x)) ≪s,K
                   x∈Ω∩(a+qa)
                                Os,n (1)                                     Os,n (1)
             Nn Lip(F)dim G      N(q)N(qSiegel)−1/Os,K (dim G      )
                                                                     .
                   P                               P
Proof. The sum            (−) can be written as as        1a+qa (x)1Ω (x) · (−). By
                 x∈Ω∩(a+qa)                                      x∈[±N]n
Fourier analysis on finite abelian groups, we can write
                  X
  1a+qa =                      cξ · ξ, where |cξ | =              E     1(a+qa) (x)ξ(x)−1           ≤ 1.
                                                               x∈a/qa
             ξ∈Hom(a/qa,C× )

This reduces the problem of showing (7.9) to showing the following inequality for
all ξ ∈ Hom(a/qa, C× ):

               X
(7.10)                 ξ(x)1Ω (x)(ΛaSiegel,Q − ΛaCramér,Q )(x)F(g(x)) ≪s,K
             x∈[±N]n
                   a
                                           Os,n (1)                              Os,n (1)
                    Nn Lip(F)dim G                    N(qSiegel)−1/Os,K (dim G              )
                                                                                                .
  Take the decomposition from Proposition A.10
                                F(g(x)) = F1 (x) + F2 (x),
where we will specify the parameter 0 < ǫ < 1 from Proposition A.10 shortly. Since
kF2 k∞ ≪s,n ǫ, the contribution of F2 to the left-hand side of (7.10) is
(7.11)                                 ≪s,K ǫNn log N.
34                                            WATARU KAI


Meanwhile, by Proposition 7.2 and the invariance of the Gowers norm by the mul-
tiplication of the phase function ξ [15, (B.11), p. 1816], we know

          ξ · 1Ω · (ΛaSiegel,Q − ΛaCramér,Q ) Us+1 [±N]n ≪s,K N(qSiegel)−1/Os,K (1) .

It follows by Proposition A.10 that the contribution of F1 to the sum (7.10) is
bounded by
                                                                     Os,n (1)
(7.12)            ≪s,K N(qSiegel )−1/Os,K (1) (Lip(F)/ǫ)dim G                    Nn .
   By comparing (7.11) (7.12) and our assertion (7.10), it suffices to specify the
value of 0 < ǫ < 1 so that the quantities
                                                                          Os,n (1)
                  ǫ log N,      N(qSiegel)−1/Os,K (1) (Lip(F)/ǫ)dim G
                                 Os,n (1)                        Os,n (1)
are both ≪s,K Lip(F)dim G        N(qSiegel)−1/Os,K (dim G                   )
                                                                                . This is achieved by
                                                       Os,n (1)
setting for example ǫ := N(qSiegel)−1/2Os,K (1)(dim G)          .                                  

           8. Vaughan’s decomposition (a.k.a. the Type I/II sums)
     Having established that ΛaCramér,Q and ΛaSiegel,Q are close in the Us+1 norm
(Proposition 7.2), we move on to the task of showing that ΛaK − ΛaSiegel,Q
                                                                                           Us+1 [±N]n
is small. For this it will be convenient to decompose ΛaK and ΛSiegel,Q into manage-
able chunks in the style of Vaughan.
    Recall the definition of the divisor function τ : IdealsK → N for the number field:
                                              X
                                      τ (a) =     1.
                                                     b|a

Lemma 8.1. For any integers N ≥ 3 and m ≥ 1 we have
                      X                           m
                             τ (a)m ≪K,m N(log N)2 −1
                             a suchthat
                              N(a)≤N
                                X           τ (a)m              m
                                                   ≪K,m (log N)2 .
                                            N(a)
                             a suchthat
                              N(a)≤N


                                       Pp. 288] for the case of Z. The case of OK
Proof. See e.g. [10, Appendix C] and [26,
can be treated in the same way, noting a such that ≪K N (Proposition 3.5).      
                                                      N(a)≤N

  Now we introduce the notion of (twisted) type I/II sums for K. We will give the
minimum definitions that covers the objects of our interest.
Definition 8.2. Let N ≥ 3 be an integer and A : IdealsK,≤N → C be a function.
It is said to be log-bounded if we have a bound of the form
                                             |A(a)| ≤ log N
for all a ∈ IdealsK,≤N .
Definition 8.3. A function S : IdealsK,≤N → C for some N ≥ 3 is said to be:
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                  35


      • a type I sum if it is of the form
                                                     X
                           S(a) = 1N(a)≤N′                  A(b)1b|a ,
                                              b such that
                                              N(b)≤N2/3

        where A : IdealsK,≤N → C is log-bounded and N′ ≤ N.
      • a twisted type I sum if it is of the form
                                       X
                  S(a) = 1N(a)≤N′              A(b)1b|a ψSiegel (ab−1 ),
                                       b such that
                                       N(b)≤N2/3

        where A : IdealsK,≤N → C is log-bounded and N′ ≤ N. Equivalently
                                      X
                   S(a) = 1N(a)≤N′          A(b)1b|a ψSiegel (a),
                                         b such that
                                         N(b)≤N2/3

        because ψSiegel (ab−1 ) = ψSiegel(a)ψSiegel (b) and ψSiegel (b) can be absorbed
        in A(b).
      • a type II sum if it is of the form
                                         X
                            S(a) =                 L(c)T(d)
                                        c,d such that
                                       N(c),N(d)>N1/3
                                          and cd=a
        where L, T : IdealsK,≤N → C obey the bounds
                                        |L(c)| ≤ log N,
                                        |T(d)| ≤ τ (d).
      • negligible if it is log-bounded and satisfies
                            X                       1
                                  |S(a)| < N exp(− log1/2 N).
                                                    10
                       a such that
                        N(a)≤N

Proposition 8.4 (Pointwise bound of (twisted) type I, II sums). For any (twisted)
type I, II sum S : IdealsK,≤N → C, we have
                                     |S(a)| ≤ (log N)τ (a)2
for all a ∈ IdealsK,≤N .
Proof. First suppose S is a (twisted) type I sum. In either case, by |A(−)| ≤ log N
and |ψSiegel (−)| ≤ 1 we have
                                      X
                      |S(a)| ≤ log N         1b|a ≤ (log N)τ (a).
                                            b
                                        N(b)≤N2/3

  Next suppose S is a type II sum. We have


                       X                                  X                        X
       |S(a)| =                    L(c)T(d) ≤ log N               |T(d)| ≤ log N         τ (d)
                   c,d such that                            d|a                    d|a
                  N(c),N(d)>N1/3
                     and cd=a
                                                                         ≤ (log N)τ (a)2 .
36                                            WATARU KAI


This completes the proof.                                                                            

Proposition 8.5 (Vaughan’s decomposition). For any N ≥ 3 sufficiently large
depending on K, the functions ΛK , ΛCramér,Q , ΛSiegel,Q restricted to IdealsK,≤N can
be written as C-linear combinations of the form
                                     X
                                         ci Si ,
                                                i∈I

where
                                         P
        • the coefficients ci ∈ C satisfy i∈I |ci | ≤ 2 log N;
        • each Si : IdealsK,≤N → C is either a type I sum, a twisted type I sum, a
          type II sum or negligible.
Proof. First, we consider ΛK . By the Möbius inversion formula
                                         ΛK = ΛK ∗ µ ∗ 1,
for all ideal a we have
                                 X                               X
              ΛK (a) =                       ΛK (b)µ(c)1 =                    ΛK (b)µ(c).
                                 b,c,d                             b,c
                           such that bcd=a                   such that bc|a

We partition the sum into four partial sums according to whether N(b), N(c) ≤ N1/3 .
Out of these four partial sums, let us treat the following three first.
Claim 8.6.          (1) The sum
                                             X
                                                      ΛK (b)µ(c)
                                     N(b),N(c)≤N1/3

         is a type I sum.
     (2) The sum
                                                                   
                               X                      X
                                        +                           ΛK (b)µ(c)
                       N(b),N(c)≤N1/3        N(b)>N1/3 ,N(c)≤N1/3
                                                           P                     P
         can be written as a linear combination                i∈I ci Si where       i∈I |ci | ≤ 2 log N
         and all Si are type I sums.
     (3) The sum
                                                                   
                         X                 X
                                 +                                  ΛK (b)µ(c)
                       N(b),N(c)≤N1/3        N(b)≤N1/3 ,N(c)>N1/3

          is negligible.
Proof of Claim. For (1), we rearrange the sum as follows by setting d := bc
                                                          

                              X                      X                   
                                                                         
                                       1d|a 
                                                              ΛK (b)µ(c).
                                                                          
                           d such that        b,c such that              
                        N(d)≤N2/3                  bc=d
                                              N(b),N(c)≤N1/3
                  LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                          37

                                                                        P
By setting N′ = N2/3 in Definition 8.3, it suffices to show that the sum b,c in the
parenthesis above is log-bounded in the sense of Definition 8.2. Name it A:
                                      X
                          A(d) =                 ΛK (b)µ(c)
                                              b,c such that
                                                  bc=d
                                             N(b),N(c)≤N1/3

By the formula ΛK ∗ 1 = log N(−) we have
                            X
                |A(d)| ≤          ΛK (b) · 1 = log N(d) ≤ log N.
                                     b,c such that
                                         bc=d

This shows Claim 8.6(1).
  We turn to (2). First, note that the sum equals
                                                                                          
                         X                                   X                 X
                                     ΛK (b)µ(c) =                    µ(c)             Λ(b)
                     b,c such that                        c|a                 b|ac−1
                         bc=a                          N(c)≤N1/3
                      N(c)≤N1/3

By the formula ΛK ∗ 1 = log N(−) again, we can further compute as
         X                              X
    =          µ(c)1c|a log N(ac−1 ) =        µ(c)1c|a (log N(a) − log N(c)) .
         c such that                                   c such that
         N(c)≤N1/3                                     N(c)≤N1/3

The sum arising from log N(c)’s is a type I sum by setting N′ = N and A(c) =
1[N(c) ≤ N1/3 ]µ(c) log N(c). To treat the sum arising from log(N(a))’s, we use the
identity
                                                 N−1
                                                 X
                     log(N(a)) = log N +                   (log t − log(t + 1)) · 1N(a)≤t
                                                     t=1
to write the sum in question as
                                                                                                         
       X                             N−1
                                     X                                                    X
                                                                                                           
                 µ(c)1c|a  log N +    (log t − log(t − 1))                                        µ(c)1c|a 
                                                           1N(a)≤t                                         .
    c such that                           t=1                                          c such that
    N(c)≤N1/3                                                                          N(c)≤N1/3
                                    1/3
                           P ≤ N ]µ(c) ∈ {−1, 0, 1} is log-bounded in the sense
As the function A(c) := 1[N(c)
of Definition 8.2, each sum c is a type I sum. The coefficients log N, log t−log(t+1)
satisfy the property that the sum of their absolute values is 2 log N. This proves
Claim 8.6(2).
   Lastly we show (3). The sum in question equals
                    X                      X               X
                          ΛK (b)µ(c) =          ΛK (b)            µ(c).
                    b,c such that                     b such that           c such that
                         bc|a                             b|a                 c|ab−1
                     N(b)≤N1/3                        N(b)≤N1/3
                       P
By the identity            c such that µ(c) = 1[b = a] (the Möbius inversion formula), this
                             c|ab−1
equals
                                          1[N(a) ≤ N1/3 ]ΛK (a),
38                                     WATARU KAI


which is negligible in the sense of Definition 8.3 because
           X                                     X
                   |1[N(a) ≤ N1/3 ]ΛK (a)| ≤           log N ≪K N1/3 log N.
         a such that                              a such that
          N(a)≤N                                  N(a)≤N1/3

This completes the proof of Claim 8.6.                                                    

  To finish the ΛK part of Proposition 8.5, it remains to treat the forth partial
sum
                               X
                                         ΛK (b)µ(c).
                                 b,c such that
                                      bc|a
                                N(b),N(c)>N1/3

We show that this is a type II sum. By introducing the dummy variable d := ab−1 ,
rewrite the sum as
                             X               X
                                    ΛK (b)          µ(c).
                            b,d such that         c such that
                                bd=a                  c|d
                             N(b)>N1/3            N(c)>N1/3

Note that the conditions N(c) > N1/3 , c | d imply N(d) > N1/3 . Hence we are
reduced to showing that the functions
                                                  X
                   L(b) = ΛK (b) and T(d) =            µ(c)
                                                         c such that
                                                             c|d
                                                         N(c)>N1/3

obey the bounds |L(b)| ≤ log N and |T(d)| ≤ τ (d). But both of them are obvious.
  We next show the assertion for ΛCramér,Q , ΛSiegel,Q . Since the coefficient P(Q)n /ϕK (P(Q))
has size ≪K log N by Mertens’ theorem, it suffices to show that the functions
                  a 7→ 1[a + (P(Q)) = OK ]
                  a 7→ 1[a + (P(Q)) = OK ] · ψSiegel([a]) · N(a)βSiegel −1

are of the asserted form. Set D := N0.2 and let (λ+  d )d∈IdealsK be the associated
upper linear sieve coefficient from Lemma D.2 (2). We know
                                           X
(8.1)                        1a+P(Q)=(1) ≤     λ+d 1d|a
                                               d|P(Q)

for all a. The right hand side is a type I sum in the sense of Definition 8.3 by setting
A(d) := λ+                             +
           d 1d|P(Q) and noting that λ is supported on IdealsK,≤N0.2 ⊂ IdealsK,≤N2/3
and has values in {−1, 0, 1}.
   We want to apply Lemma D.2 to an := 1N(n)≤N . The theorem of density of
ideals 3.5 says
                X           m:=nd−1
                                        X
                    1N(n)≤N    =              1N(m)≤N/N(d)
               d|n                    m∈IdealsK
                                                                          1− n1 !
                                             N                       N
                             = res (ζK (s))      + OK                                 ,
                               s=1          N(d)                    N(d)
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                 39


which means that if we set g(d) := 1d|P(Q) /N(d) and X := ress=1 (ζK (s)) · N, we
                                1− n1 
                              N
have the estimate rd = OK    N(d)         .
                                                 log D      √
  By Lemma D.2 (2), we have, noting (8.1) and log    Q ≥ 0.2 log N
                                           
                      X        X
                                   λ+
                                     d 1d|a
                                             − 1a+P(Q)=(1)
                      a,N(a)≤N     d|P(Q)
                       +
                   =S (Q) − S(Q)
                                 √                  0.8
                                                                      √
                   =OK (Ne−0.2 log N + N1− n ) = OK (Ne− log N ).
This expresses 1a+P(Q)=(1) as the sum of a type I sum and a negligible sum in the
sense of Definition 8.3.
   Multiplying by ψSiegel, we see that the function
                        a 7→ 1[a + (P(Q)) = OK ] · ψSiegel([a])
                                        P
is the sum of a twisted type I sum a 7→ N(b)≤D λ+   b 1b|a ψSiegel ([a]) and a negligible
sum.
   We further multipy it by N(a)βSiegel −1 . The negligible part stays negligible be-
cause N(a)βSiegel −1 ≤ 1. To handle the twisted type I part, just as before, we use
the identity
                                         N−1
                                         X
        N(a)βSiegel −1 = NβSiegel −1 +         (tβSiegel −1 − (t + 1)βSiegel −1 ) · 1N(a)≤t .
                                         t=1
Note that for any twisted type I sum S(−) and t ≤ N, the product S≤t (a) :=
1[N(a) ≤ t]S(a) is also a twisted type I sum. Thus a 7→ N(a)βSiegel −1 S(a) is written
as a linear combination of
                                    X
                           S(a) :=        λ+
                                           b 1b|a ψSiegel ([a])
                                     N(b)≤D

and the associated S≤t (a)’s with coefficients NβSiegel −1 (≤ 1) and (tβSiegel −1 − (t +
1)βSiegel −1 )’s. Since the sum of the absolute values of these coefficients is NβSiegel −1 +
(1 − NβSiegel −1 ) = 1, the proof for the case of ΛSiegel,Q is now complete.               

   9. The orthogonality theorem—equidistributed, average 0 case
   The following proposition is our key computation. The strategy follows that of
[10, §4], but the treatment necessarily gets considerably more complicated because
unlike in the case of Z, elements and ideals are two very different notions and the
geometry of Rn is richer than that of R.
Proposition 9.1. N ≥ 2 a natural number sufficiently large depending only on
K, s. Let a ⊂ OK be a non-zero ideal and let a ∼  = Zn be a norm-length compatible
basis.
   For any:
       • filtered s-step nilmanifold G/Γ of dimension dim(G), complexity comp(G/Γ);
       • polynomial map g : a → G → G/Γ totally ǫ-equidistributed on [±N]na for
         some 0 < ǫ < 1/2;
       • 1-bounded function F : G/Γ → C with average 0 and whose Lipschitz con-
         stant is bounded from above by some Lip(F) ≥ 1;
40                                       WATARU KAI


        • type I, twisted type I or type II sum S : IdealsK,≤OK (Nn ) → C, where the
          OK (1) constant is from Proposition 3.4;
        • convex body Ω ⊂ [±N]na⊗R ;
                                                          1/2
       • non-zero ideal q ⊂ OK of norm ≤ e(log N) /OK (1) and a residue class a ∈
         (a/qa)×;
satisfying the condition Lip(F) comp(G/Γ)N(qqSiegel)ǫ−1 < N1/10 , we have

         X
                   S(xa−1 )F(g(x)) ≪s,K
     x∈[±N]n
           a ∩Ω
     x=a in a/qa
                                                                                        Os,n (1)
                   (log N)On (1) Lip(F) comp(G/Γ)N(qqSiegel)ǫ1/ exp((2 dim G)                      )
                                                                                                       Nn .
Except in the twisted type I case, the N(qSiegel ) factor can be omitted from the
hypothesis and conclusion.
   The rest of this section is devoted to the proof of Proposition 9.1. The proof is
divided into the case of a (twisted) type I sum and that of a type II sum. In either
case, it is convenient to write
                                        G(x) := F(g(x))
because in the preliminary parts of the proofs, it only counts that G(x) is a 1-
bounded function.
  Let δ ≥ 0 be the value defined by

                                    X
(9.1)                                       S(xa−1 )G(x) = δNn .
                              x∈[±N]na ∩Ω
                              x=a in a/qa

We may assume δ > N−1/50 because otherwise the assertion is already true.
   Our task is to show that then g is not totally
(9.2)
                                                          Os,n (1)
(δ(log N)On (1) Lip(F)−1 comp(G/Γ)−1 )exp((2 dim G)                  )
                                                                         N(qqSiegel)−Os,n (dim G) Os,K (1)−1
-equidistributed, which implies that this quantity is less than ǫ.
   The following a priori bound of δ will be useful.
Lemma 9.2 (δ is not too large). In the situation of (9.1), we have δ ≪K (log N)n+3 .
Proof. The left-hand side of (9.1) is bounded from above by
                    X                             X
                            |S(xa−1 )| ≪K log N       τ (xa−1 )2 ,
                      x∈[±N]n ∩Ω                      x∈[±N]n
                      x=a in a/qa

where we used Proposition 8.4. For x ∈ [±N]n , the ideal b := xa−1 has norm
≪K Nn by Proposition 3.4. For each given ideal b satisfying such a bound, there
are at most ≪K (log N)n−1 values of x ∈ [±N]n associated with it by [20, Lemma
4.14]. Thus we can bound the previous sum as
                                X
                 ≪K (log N)n           τ (b)2 ≪K Nn (log N)n+3 ,
                                        b
                                    N(b)≪K Nn
                LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                            41


where we used Lemma 8.1.                                                                      


9.1. The case of a (twisted) type I sum. Write our (twisted) type I sum as
                                                   X
                  S(a′ ) = 1[N(a′ ) ≤ N′ ]                      A(b)ψSiegel (a′ b−1 )
                                             b|a′ ,N(b)≤N2n/3


for some N′ ≤ OK (Nn ). If we are in the type I case, ignore the ψSiegel factor and
read qSiegel = (1). The definition of δ (9.1) now reads



                    X            X                                               Nn
(9.3)                                     A(b)ψSiegel (xa−1 b−1 )G(x) = δ             .
                                                                                 N(q)
                x∈[±N]n ∩Ω    b|xa−1
                x=a in a/qa N(b)≤N2n/3
                N(xa−1 )≤N′



9.1.1. Eliminating the coefficient A(b) and the Siegel character ψSiegel. As the con-
dition b | xa−1 is equivalent to x ∈ ab, any sum of the form
                      X            X                      X               X
                                             equals                                 .
                         n
                  x∈[±N] ∩Ω     b|xa −1                   b     x∈[±N]n ∩Ω∩ab
                  x=a in a/qa N(b)≤N2n/3              N(b)≤N2n/3 x=a in a/qa
                      −1     ′
                  N(xa )≤N                                       N(xa−1 )≤N′


We also know |A(b)| ≤ log N by the definition 8.3 of the notion of twisted type I
sums. It follows that the left hand side of (9.3) is bounded from above by



                   X           1   p         X
        log N                p      N(b)              ψSiegel ([xa−1 b−1 ])G(x) .
                    b
                              N(b)             n
                                         x∈[±N] ∩Ω∩ab
                N(b)≤N2n/3                       x=a in a/qa
                                                 N(xa−1 )≤N′

                                                 P
We want to apply Cauchy–Schwarz to the sum         b . By Lemma 8.1 we know
P              1
  b such that N(b) ≪K log N. It follows that the square of the previous value is
  N(b)≤N2n/3
bounded from above by

                                                                                          2


                          X                     X
           (log N)3                N(b)                   ψSiegel([xa−1 b−1 ])G(x) .
                          b               x∈[±N]n ∩Ω∩ab
                      N(b)≤N2n/3           x=a in a/qa
                                           N(xa−1 )≤N′


Assumption (9.3) implies that this value is ≥ δ 2 N2n /N(q)2 .
42                                         WATARU KAI


  By the dyadic decomposition [1, 2] ∪ [2, 4] ∪ [4, 8] ∪ · · · of the range [1, N2n/3 ] of
N(b), which has ≪n log N members, there is a 1 ≤ D < N2n/3 such that

                                                                                2


                        X                X
(9.4) (log N)4                  D                  ψSiegel ([xa−1 b−1 ])G(x)
                                           n
                     b              x∈[±N] ∩Ω∩ab
                 D≤N(b)≤2D           x=a in a/qa
                                     N(xa−1 )≤N′

                                                                            ≫n δ 2 N2n /N(q)2 .

We may increase (log N)4 to (log N)2(n+4) because it only weakens the inequality.
Then we rewrite (9.4) using the quantity

                                        δ ′ = δ/(log N)n+4

which has been shown to be < 1/2 for N > OK (1) in Lemma 9.2:
                                                                   2


           X                X
(9.5)               D                   ψSiegel([xa−1 b−1 ])G(x)       ≫n (δ ′ )2 N2n /N(q)2 .
            b           x∈[±N]n ∩Ω∩ab
        D≤N(b)≤2D        x=a in a/qa
                         N(xa−1 )≤N′

                                                                                                         2
                                                                                     P
     The number of b’s with D ≤ N(b) ≤ 2D is ≪K D and the inner sum                      x∈[±N]n ∩Ω∩ab
                                                                                          x=a in a/qa
                                                                                          N(xa−1 )≤N′
is ≪n (Nn /D)2 for each b. It follows that for ≫n (δ ′ )2 D many b’s with D ≤ N(b) ≤
2D, we have the bound from below



                          X
(9.6)                               ψSiegel([xa−1 b−1 ])G(x) ≫K δ ′ Nn /D.
                            n
                    x∈[±N] ∩Ω∩ab
                     x=a in a/qa
                     N(xa−1 )≤N′


If (δ ′ )2 D ≪n 1 then the existence of b satisfying (9.6) does not automatically follow
from the previous sentence. Howerver, by a separate pigeonhole argument applied
to (9.4) one can see that there is at least one such b. Thus the arguments that
follow are not vacuous in either case.
    Let us use the symbol [−, −] to mean the least common multiple (i.e., the inter-
section) of two non-zero ideals. By the property ab ∩ qa = [q, b]a, for each b there
is a (unique) residue class ab ∈ ab/[q, b]a such that the condition that x ∈ ab and
x = a in a/qa is equivalent to x = ab in a/[q, b]a.
    Also, by dividing this residue class into mod qSiegel[q, b]a residue classes in order
to make ψSiegel constant and applying the pigeonhole principle, there is a residue
              LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                             43


class a′b ∈ ab/qSiegel[q, b]a such that the following holds


                              X
(9.7)                                            G(x) ≫K δ ′ Nn /DN(qSiegel).
                                n
                       x∈[±N] ∩Ω∩ab
                    x=a′b in ab/qSiegel [q,b]a
                         N(xa−1 )≤N′

Thus we have managed to simplify the summand compared with (9.3), but the
index set of the sum in (9.7) is pretty messy. We will perform some maneuver to
replace it by a cube [0, L]n with some L.
9.1.2. Re-parametrization of x’s. By Proposition 3.3, if we give norm-length com-
patible bases to ab, [q, b]a and qSiegel[q, b]a then the inclusion maps
(9.8)                         qSiegel[q, b]a ֒→ [q, b]a ֒→ ab ֒→ a
are represented by matrices with entries of absolute values
                           ≪K N(qSiegel)1/n ,
                           ≪K N([q, b])1/n N(b)−1/n ≤ N(q)1/n ,
                           ≪K D1/n
respectively.
   We know the following inclusion relation by the norm-length compatibility of
our bases (9.8):
                                                    n
                         n                        N
                     [±N]a ∩ Ω ∩ ab ⊂ ±OK (1) 1/n        .
                                                D     ab
Likewise, we have the following inclusion, if we choose a representative a′b close
enough to the origin
                n
             N
     ±OK (1) 1/n     ∩ (a′b + qSiegel[q, b]a) ⊂
            D     ab
                                                                       n
                                                             N
                                       a′b + ±OK (1)                                    .
                                                     N(qSiegel[q, b])1/n qSiegel [q,b]a
Introduce the next shorthand symbol (whose value depends on b)
                                                    N
                                    N1 :=                       .
                                            N(qSiegel[q, b])1/n
The sum in (9.7) now looks like
                                          X
(9.9)                                                        G(x + a′b ).
                            x∈Ω∩[±OK (1)N1 ]n
                                            qSiegel [q,b]a
                                       −1      ′
                                     N(xa    )≤N

     Let CK > 1 be a large enough positive number depending on K soon to be
                                                                              n
specified right after (9.10). Let us cover the cube [±OK (1)N1 ]qSiegel [q,b]a by ≪K
(δ ′ )−n CnK disjoint translates of the cube [0, δ ′ N1 /CK ]nqSiegel [q,b]a . Here, since δ ′ =
δ/(log N)4 is not too small (say > N−1/40 ), the value δ ′ N1 /CK is reasonably large
(say > N0.9 /CK ). This allows us to treat this non-integer value as though it were
44                                                   WATARU KAI


an integer within negligible error. By Proposition E.1 and the fact that G is 1-
bounded, the contribution to (9.9) from those cubes intersecting the boundary of
the region Ω ∩ {x | N(xa−1 ) ≤ N′ } is
                   δ′ n    δ′        Nn              δ′    Nn
(9.10)       ≪K       N1 =    ·                   ≪K    ·
                   CK      CK N(qSiegel)N([q, b])    CK N(qSiegel)D
which is negligible compared with the right hand side of (9.7) if CK is taken large
enough to beat the ≪K constants involved. Choose such an CK and incorporate it
in the symbol OK (1) henceforth.
   By pigeonholing among the OK ((δ ′ )−n ) cubes, by replacing a′b by another repre-
sentative
(9.11)                                     a′′b ∈ [±OK (1)N/D1/n ]nab ,
we obtain

                          X
                                                    G(x + a′′b ) ≫K (δ ′ )n+1 Nn /DN(qSiegel),
                                   n
            x∈[0,δ ′ N1 /OK (1)]
                                   qSiegel [q,b]a


which in terms of average means

                                                                                N([q, b])
(9.12)                        E                         G(x + a′′b ) ≫K δ ′               ≫K δ ′ .
                      ′
               x∈[0,δ N1 /OK (1)]
                                       n                                           D
                                       qSiegel [q,b]a


Thus we have deduced a seemingly cleaner version of (9.7) as promised.

9.1.3. Using Leibman’s theorem. Now we recall that G(x) = F(g(x)) is the com-
posite of a polynomial map and a Lipschitz function. The previous inequality
(9.12) shows that g|qSiegel [q,b]a ((−) + a′′b ) is not δ ′ Lip(F)−1 comp(G/Γ)−1 OK (1)−1 -
                                                n
equidistributed as a map [0, δ ′ N1 /OK (1)]qSiegel [q,b]a → G/Γ. By Theorem A.4 there
is a horizontal character ηb : G → R/Z with
                                                                                           Os,n (1)
             0 < |ηb | < ((δ ′ )−1 Lip(F) comp(G/Γ)OK (1))exp((2 dim G)                               )


such that

     ηb ◦ (g|qSiegel [q,b]a ((−) + a′′b )) C∞ [0,δ′ N /O (1)]n
                                                            1    K    qSiegel [q,b]a

                                                                                                          Os,n (1)
                                              ′ −1
                                       ≤ ((δ )          Lip(F) comp(G/Γ)OK (1))exp((2 dim G)                         )
                                                                                                                         .
  Proposition A.9 with parameters N        δ ′ N1 /OK (1) and q0                         OK ((δ ′ )−1 N(qqSiegel)1/n )
can be applied to the affine-linear map
                           Zn ∼= qSiegel[q, b]a → ab ∼ = Zn
                                                                x 7→ x + a′′b
by the norm-length compatible choice of the bases and (9.11). It follows that there
is a 0 < qb ≪K N(qqSiegel)On,s (1) such that

     qb ηb ◦ (g|ab) C∞ [0,δ′ N1 /OK (1)]
                                               ab
                                                                                                          Os,n (1)
                             On,s (1)         ′ −1
         ≪K N(qqSiegel)                    ((δ )        Lip(F) comp(G/Γ)OK (1))exp((2 dim G)                         )
                                                                                                                         .
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                    45


The horizontal character qb ηb has magnitude

                                                                                    On,s (1)
0 < |qb ηb | < N(qqSiegel)On,s (1) ((δ ′ )−1 Lip(F) comp(G/Γ)OK (1))exp((2 dim G)                  )
                                                                                                       .
There are
    h                                                                   On,s (1)
                                                                                   idim G
  < 2N(qqSiegel)On,s (1) ((δ ′ )−1 Lip(F) comp(G/Γ)OK (1))exp((2 dim G)          )

                                                                                On,s (1)
     = N(qqSiegel)On,s (dim G) ((δ ′ )−1 Lip(F) comp(G/Γ)OK (1))exp((2 dim G)              )


horizontal characters satisfying the same magnitude bound. By the pigeonhole
principle, by choosing some
                                                                                 On,s (1)
 > N(qqSiegel)−On,s (dim G) (δ ′ Lip(F)−1 comp(G/Γ)−1 OK (1)−1 )exp((2 dim G)                  )
                                                                                                   D
values of b with D ≤ N(b) ≤ 2D, we may assume qb ηb is a common horizontal
character η. (Even when the displayed quantity might be < 1, by picking any
random b, the arguments that follow are not vacuous.)
   Also, by the finiteness of the class number, we may assume that these b’s belong
to the same ideal class. To summarize, we have so far obtained the following
conclusion:
Conclusion 9.3. The s-step nilmanifold G/Γ, polynomial map g : a → G → G/Γ
and the 1-bounded Lipschitz function F : G/Γ → C are as in Proposition 9.1. Also,
1 ≤ D < N2n/3 is as in (9.4).
   For some
(9.13)
                                                                                  On,s (1)
  δ1 := N(qqSiegel)On,s (dim G) (δ ′ Lip(F)−1 comp(G/Γ)−1 OK (1))exp((2 dim G)                 )
                                                                                                   ,

where δ ′ = δ/(log N)n+4 , there is a horizontal character η satisfying
                                      0 < |η| < δ1−1
such that for > δ1 D ideals b with D ≤ N(b) ≤ 2D in a common ideal class, we have
                         kη ◦ (g|ab )kC∞ [0,δ′ N1 /OK (1)]ab < δ1−1 .

   Now we take advantage of the fact that the above bound is valid for many b’s
by utilizing the theory of polynomial maps and nilsequences on the space of ideals.
   In the case of Z, this coming step was handled by the solution of a Waring-type
problem within a few lines [11, p. 551], but for the general OK we need to implement
a new perspective, which is the subject of the next paragraph.

9.1.4. Utilizing the parametrization of ideals. Let b0 ⊂ OK be a chosen representa-
tive of the ideal class mentioned in Conclusion 9.3. Let D ⊂ (K ⊗Q R)× be a chosen
norm-length compatible fundamental domain for the quotient (K ⊗Q R)× /O×     K . The
ideals b ⊂ OK in the class [b0 ] is parametrized by the inverse fractional ideal b−1
                                                                                  0
via
(9.14)                {b ⊂ OK | [b] = [b0 ] in Cl(K)} ∼
                                                      = b0−1 ∩ D
                                                b := b0 z →7 z.
46                                                  WATARU KAI


Equip ab0 with a norm-length compatible basis ab0 ∼ = Zn and assume that the
                                ∼   n
norm-length compatible bases ab = Z that we have been using above were given
by: let z ∈ b−1
             0 ∩ D be the element corresponding to b and
                                                                ×z
                                                 Zn ∼      → ab.
                                                    = ab0 −−
                                                           ∼    =
     Let H be the following composite map
                                                       (y,z)7→yz         g         η
                                     H : ab0 × b−1
                                                0 −−−−−−→ a − → R.
                                                            →G−
                         ∼ Zn and b−1 =
For the chosen bases ab0 =                 ∼ Zn , write y ∈ ab0 as y = (y1 , . . . , yn ) ∈ Zn
                                        0
          −1                            n
and z ∈ b0 as z = (z1 , . . . , zn ) ∈ Z . For multi-indices i = (i1 , . . . , in ) ∈ Nn , write
      Qn
y i := k=1 ykik . The map H can be written as
                                        X
                        H(y, z) =           hi,j y i z j , hi,j ∈ R.
                                                  i,j∈Nn

Let |i| := i1 + · · · + in . Note that hi,j 6= 0 only when |i| = |j| because the map
(y, z) 7→ yz is bilinear.
    For each z ∈ b0−1 , the map
                                             H(−, z) : ab0 → R
                                                              y 7→ H(y, z)
                                                                                           P           j
is a polynomial map of degree ≤ s. Its ith coefficient is                                   j∈Nn hi,j z .   Via the
                                                                                           |j|=|i|
bijection (9.14), Conclusion 9.3 can be phrased as: for
(9.15)                          > δ1 D values of z ∈ [±OK (1)D1/n ]nb−1 ,
                                                                                       0

the polynomial map H(−, z) satisfies
                                 kH(−, z)kC∞ [0,δ′ N1 /OK (1)]n              ≪K δ1−1 .
                                                                       ab0


By the definitions of k−kC∞ [0,N1 /OK (1)]n and N1 := N/N([q, b]qSiegel)1/n , this last
inequality is equivalent to saying that for each multi-degree i 6= 0, we have

                 X                                                 N([q, b])|i|/n N(qSiegel)|i|/n
(9.16)                    hi,j z j          ≪K,s δ1−1 (δ ′ )−|i|                                  .
                                                                                N|i|
                 j∈Nn
                |j|=|i|
                                      R/Z
                                                              P               j
     Let Hi be the polynomial map z 7→                             j∈Nn hi,j z .       Its j th coefficient is hi,j .
                                                                  |j|=|i|
Since (9.16) holds for > δ1 D values of z (9.15), Proposition A.8 gives an integer
          −O   (1)
0 < qi < δ1 s,n such that


                                                  −Os,n (1)                       N([q, b])|i|/n N(qSiegel)|i|/n
     qi Hi C∞ [±OK (1)D1/n ]n             ≪K,s δ1             · δ1−1 (δ ′ )−|i|
                                 b
                                     −1
                                     0
                                                                                               N|i|
                                                                      |i|/n
                                                           −Os,n (1) D      N(q)Os,n (1) N(qSiegel)Os,n (1)
                                                 ≪K,s δ1                                                    .
                                                                                     N|i|
Since there are only Os,n (1) indices i at play, by taking the least common multiple
of qi ’s and compromising the exponent Os,n (1) a little, we may assume they are a
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                           47


common value, say qH . Unfolding the definition of the norm k−kC∞ [±OK (1)D1/n ]n ,
we conclude
                                                        Os,n (1)
                                  −Os,n (1) N(qqSiegel )
(9.17)      qH hi,j         ≪K,s δ1                                              for all j, i 6= 0
                      R/Z                         N|i|

(recall that hi,j = 0 unless |i| = |j|).
   This gives some bounds on the coefficients of the map
                                                         g        qH η
                             qH H : ab0 × b−1   → G −−→ R,
                                           0 →a −

from which we can deduce the following.
    Let us specialize to 1 ∈ b−10 . This corresponds to considering the map qH η ◦
(g|ab0 ). Because 1 is represented by a vector with entries of sizes OK (1) with respect
to the fixed norm-length compatible basis of b−10 , the bound (9.17) implies that the
                                                        −O    (1)
i coefficient of qH η◦(g|ab0 ) has k−kR/Z norm ≪s,K δ1 s,n N(qqSiegel)Os,n (1) /N|i| .
 th

By the definition of the C∞ norm k−kC∞ [±N]n , we conclude
                                                        ab0


                                                       −Os,n (1)
             kqH η ◦ (g|ab0 )kC∞ [±N]n       ≪s,K δ1                N(qqSiegel)Os,n (1) .
                                       ab0


Since the inclusion map ab0 ֒→ a is represented by a matrix of entries with size
OK (1) under norm-length compatible bases, Proposition A.9 implies that up to
enlarging qH by a factor OK (1)Os,n (1) while maintaining a bound of the form
                                                     −Os,n (1)
                                      0 < qH < δ1

(so that |qH η| also obeys the same form of bound), we have
                                          −Os,n (1)
(9.18)     kqH η ◦ gkC∞ [±N]na ≪K,s δ1                N(qqSiegel)Os,n (1) =: (δ2 )−1 .

  Let Os,n (1) > 1 be the constant from Proposition A.6 and consider the smaller
          δ2       n       ∞
cube [± Os,n (1) N] . The C -norm on this cube is smaller than k−kC∞ [±N]n at least
                   δ2
by the factor of Os,n (1) so that we obtain

                                                                     1
                             kqH η ◦ gkC∞ [±     δ2
                                                        N]n
                                                              <            .
                                               Os,n (1)   a       Os,n (1)

Proposition A.6 can be applied to this situation and implies that g is not 21|q1H η| -
                          δ2      n
equidistributed on [± Os,n  (1) N]a .
  As δ2 /Os,n (1) < 1/21|qHη|, we conclude that g is not totally δ2 /Os,n (1)-equidistributed
on [±N]na . By recalling the definitions of δ2 (9.18) and δ1 (9.13), for an appropriate
choice of Os,n (1), the map g is not

                                                                  Os,n (1)
(δ(log N)−(n+4) Lip(F)−1 comp(G/Γ)−1 )exp((2 dim G)                          )
                                                                                 N(qqSiegel)−Os,n (1) Os,K (1)−1

-equidistributed.
   As was noted at (9.3), this settles the case of a (twisted) type I sum.
48                                         WATARU KAI


9.1.5. Before moving on: recycling. We shall reuse the procedure from (9.17) to
the conclusion of the (twisted) type I case in the following form:
Lemma 9.4. Let 0 < ǫ < 1/Os,K (1) be a positive number and Let H be the following
composite
                                                       g    η
                                  H : ab0 × b0−1 → a − →R
                                                     →G−
where η is a nonzero horizontal character of magnitude < ǫ−1 . Let hi,j be the
coefficients of H with respect to some norm-length compatible bases of ab0 and b0
(note hi,j = 0 unless |i| = |j|).
   Suppose that we have:
                                          1
                           hi,j     < ǫ−1 |i| for all i, j 6= 0.
                                R/Z      N
Then {g(x)}x∈[±N]na is not totally ǫ/Os,K (1)-equidistributed in G/Γ.
9.2. The case of type II sums. Recall that a type II sum has the form
                               X
                  S(a′ ) =                 L(c)T(d), where
                                            c,d
                                   N(c),N(d)>OK (Nn )1/3
                                          cd=a′
                        |L(c)| ≤ log N,
                     |T(d)| ≤ τ (d).
The definition of δ ≥ 0 (9.1) now reads


                         X                 X
                                                       L(c)T(d)G(x) = δNn
                   x∈[±N]n
                         a ∩Ω
                                            c,d
                   x=a in a/qa      N(c),N(d)≫K Nn/3
                                         cd=xa−1

where G(x) := F(g(x)).
  First, by eliminating c = xa−1 d−1 from the expression, the left hand side is the
absolute value of
                    X            X
                                           L(xa−1 d−1 )T(d)G(x).
                   x∈[±N]na ∩Ω
                                         d
                   x=a in a/qa      N(d)≫K Nn/3
                                       x∈ad
                                  N(x)≫K Nn/3 N(ad)

One can move the sum in d ahead so that this quantity equals
         X                  X
                                      L(xa−1 d−1 )T(d)G(x)
              d                  x∈[±N]na ∩Ω∩ad
     Nn/3 ≪K N(d)≪K N2n/3          x=a in a/qa
                                N(x)≫K Nn/3 N(ad)
                                                                                     
                                                                                      
             X                T(d) p                     X                            
                                                                                      
=                            p     ·  N(d)                            L(xa−1 d−1 )G(x) .
                              N(d)                                                    
              d                                    x∈[±N]na ∩Ω∩ad                     
     Nn/3 ≪K N(d)≪K N   2n/3
                                                       x=a in a/qa
                                                    N(x)≫K Nn/3 N(ad)
              LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                  49

                              P
By Cauchy–Schwarz for the sum   d we obtain the following, where d satisfies
Nn/3 ≪K N(d) ≪K N2n/3 in both summation
                                                                                      2

                          !2                                                         
            X T(d)           X                        X                              
                                                                       −1 −1         
              p             ·   N(d)                            L(xa     d     )G(x) 
               N(d)                                                                  
            d                 d               x∈[±N]n
                                                     a ∩Ω∩ad                          
                                                x=a in a/qa
                                             N(x)≫K Nn/3 N(ad)

                                                                                ≥ δ 2 N2n .

By the condition |T(d)| ≤ τ (d) and Lemma 8.1 we know that the first factor of the
left hand side is ≪K (log N)4 . Thus
                                                                                              2


                            X                             X
         (log N)4                          N(d)                       L(xa−1 d−1 )G(x)
                             d                        x∈[±N]n
                                                            a ∩Ω∩ad
                    Nn/3 ≪K N(d)≪K N2n/3             x=a in a/qa
                                                  N(x)≫K Nn/3 N(ad)

                                                                                 ≥ δ 2 N2n .

We perform the dyadic decomposition of the range of N(d) to find a Nn/3 ≪K
D ≪K N2n/3 (out of ≪K log N possibilities) such that
                                                                                   2


                             X                    X
(9.19)         (log N)5               D                        L(xa−1 d−1 )G(x)
                              d             x∈[±N]na ∩Ω∩ad
                          D≤N(d)≤2D           x=a in a/qa
                                           N(x)≫K Nn/3 N(ad)

                                                                         ≥ δ 2 N2n .

By the pigeonhole principle among the hK = # Cl(K) ideal classes, by compromising
this factor we may assume that the d’s are in a common ideal class, say that of d0 .
As in §9.1.4, the ideals in this class are parametrized by the space d0−1 ∩ D.
   When a d corresponds to d ∈ d0 ∩ D, the bijection

                                                  ×d
                                                 → ad
                                            ad0 −−
                                                 ∼=


associates toPevery element x ∈ ad an element α := xd−1 ∈ ad0 . The range of
summation x in (9.19) correponds to the set of α’s satisfying:

                                α ∈ [±OK (1)N/D1/n ]nad0 ∩ d−1 Ω,
                               αd = a in a/qa,
                            N(α) ≫K Nn/3 N(ad0 ).
50                                                WATARU KAI


In this language, the inequality (9.19) looks as (also recall G(x) = F(g(x))):
(9.20)              (log N)5 ·
                                                                                                      2


                            X                           X
                                        D                                   L(αa−1 d−1
                                                                                    0 )F(g(αd))
                      d∈d−1
                         0 ∩D               α∈[±OK (1)N/D1/n ]n
                                                              ad0 ∩d
                                                                     −1
                                                                        Ω
                    D≤N(dd0 )≤2D                   αd=a in a/qa
                                                N(α)≫K Nn/3 N(ad0 )

     ≫K δ 2 N2n .
   We reuse the symbol δ ′ to mean a quantity similar to but slightly different from
(9.5):
                                           δ          1
(9.21)                        δ ′ :=         O   (1)
                                                     < ,
                                     (log N)   n      2
where we will keep increasing On (1) > n + 4 so that it absorbs the On (1) many
log N factors and ≫K constants that appear below. By the assumption δ > N−1/50 ,
we also know that δ ′ is not too small, say δ ′ > N−1/40 .
    As we did in (9.10), we pack the cube [±OK (1)N/D1/n ]nad0 by translates of
  ′
[δ N/D1/n OK (1)]nad0 with a large enough OK (1) in the denominator (there are
OK ((δ ′ )−n ) translates).
    For each d ∈ d−1  0 ∩ D, the number of points in some translate meeting the
boundary of the region defined by
                                α ∈ d−1 Ω and N(α) ≫K Nn/3 N(ad0 )
is ≤ δ ′ Nn /DOK (1) by Proposition E.1. Call such α’s negligible. By the bound
|L(−)| ≤ log N and the bound of the number of neglibigle points, one sees that the
contribution from the negligible points to the sum (9.20) is (δ ′ )2 N2n /OK (1), which
is indeed negligible if OK (1) is chosen large enough. Therefore, by the pigeonhole
principle applied to the non-negligible points for each d, we conclude that we can as-
sociate to each d ∈ d−1
                     0 ∩D either I(d) = ∅ or a translate I(d) ⊂ [±OK (1)N/D
                                                                                 1/n n
                                                                                    ]ad0
     ′     1/n       n
of [δ N/D OK (1)]ad0 in a way that
                                                                                         2

                                X                     X
                                              D                  L(αa−1 d−1
                                                                         0 )F(g(αd))
              d∈[±OK (1)D1/n ]n−1 ∩D                α∈I(d)
                                    d0            αd=a in a/qa
                     D≤N(dd0 )≤2D

                                                                             > δ 2n+2 N2n .
By the Fourier-theoretic Proposition B.1, we find some ξ : ad0 → Q/Z such that
the following holds (now the cubes I(d) have been removed)
                                                                                                 2

               X                                  X
(9.22)                              D                            e2πiξ(α) L(αa−1 d−1
                                                                                  0 )F(g(αd))
      d∈[±OK (1)D1/n ]n−1 ∩D            α∈[±OK (1)N/D1/n ]n
                                                          ad0
                        d
                            0
          D≤N(dd0 )≤2D                      αd=a in a/qa

                                                                                   > (δ ′ )2n+2 N2n
                LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                   51


Now we expand the | − |2 part as
           X
(9.23)                   B(α, α′ )F(g(αd))1αd=a in a/qa F(g(α′ d))1α′ d=a in a/qa ,
    α,α′ ∈[±OK (1)N/D1/n ]n
                          ad0

                                      ′
where B(α, α′ ) := e2πiξ(α−α ) L(αa−1 d−1    ′ −1 −1
                                       0 )L(α a  d0 ) is a function of α’s not in-
                                          ′
volving d and obeying the bound |B(α, α )| ≤ (log N)2 .
   Now Proposition B.2 implies


               X
                              (9.23) ≪K
    d∈[±OK (1)D1/n ]n
                    d0 ∩D
       D≤N(dd0 )≤2D

                          Nn X            X
               (log N)2                         F(g(αd))F(g(α′ d))F(g(αd′ ))F(g(α′ d′ ))
                          D   ′             ′
                              d,d         α,α
                                                                                           1/2
                                                               ′        ′     ′ ′
                                                      1[αd = α d = αd = α d = a in a/qa]         ,

where d, d′ are subject to the same condition as in the preceding line and α, α′ are
as in (9.23). Together with (9.22), this implies
   XX
           F(g(αd))F(g(α′ d))F(g(αd′ ))F(g(α′ d′ ))
   d,d′ α,α′

                                    · 1[αd = α′ d = αd′ = α′ d′ = a in a/qa] > (δ ′ )4n+4 N2n .
We interpret this left-hand side as
                                                                                    2
                   X X
                                                      ′            ′
                              F(g(αd))F(g(αd ))1[αd = αd = a in a/qa] .
                   d,d′   α

(Note that the roles of α and d has switched somehow in the sense that in (9.23)
we had the index α doubled, but now we have d doubled.)
  Since there are at most OK (1)D2 pairs of (d, d′ ) and OK (1)Nn /D values of α’s,
one concludes that there are
                                ≫K (δ ′ )4n+4 D2          pairs    (d, d′ )
in the domain of summation such that

                           X
(9.24)                                          F(g(αd))F(g(αd′ )) > (δ ′ )2n+2 Nn /D.
                 α∈[±OK (1)N/D1/n ]n
                                   ad0
                   αd=αd′ =a in a/qa


9.2.1. Analysis of individual pairs (d, d′ ). Let (d, d′ ) be one of such pairs that satisfy
(9.24). By the pigeonhole principle on the finite set ad0 /qad0 of order N(q), there
is a residue class ad,d′ ∈ ab0 /qab0 such that for α ≡ ad,d′ in ab0 /qab0 the condition
52                                                    WATARU KAI


αd = αd′ = a in a/qa is automatic and


                           X
(9.25)                                        F(g(αd))F(g(αd′ )) > (δ ′ )2n+2 Nn /(DN(q)).
             α∈[±OK (1)N/D1/n ]n
                               ad0
              α=ad,d′ in ad0 /qad0

   We want to delete the congruence condition from the sight. Choose a represen-
tative ad,d′ ∈ [±OK (1)N(q)1/n ]nad0 and consider the map
(9.26)                                           qad0 ֒→ ad0
                                                       α 7→ α + ad,d′ .
By the norm-length compatible choice of the basis of qad0 , the inverse image of
[±OK (1)N/D1/n ]nad0 is contained in an [±OK (1)N/(DN(q))1/n ]nqad0 . Partition this
latter cube into translates of the small cube
                                                     n
                              ′ 2n+2        N
                          ±(δ )                             .
                                     (DN(q))1/n OK (1) qad0
There are OK (((δ ′ )2n+2 )−n ) relevant translates.
   The contribution to (9.25) of those small cubes whose image along the map (9.26)
is not contained in [±OK (1)N/(DN(q))1/n ]nad0 is ≪K (δ ′ )2n+2 Nn /(DN(q)OK (1)).
This contribution is negligible if we choose the OK (1) in the denominator small
enough. Then by the pigeonhole principle among the non-negligible translates,
there is another representative a′d,d′ ∈ [±OK (1)N/D1/n ]nad0 of ad,d′ such that


                       X
                                                     F(g((α + a′d,d′ )d))F(g((α + a′d,d′ )d′ ))
                                         n
     α∈ ±(δ ′ )2n+2          N
                      (DN(q))1/n OK (1)
                                              qad0

                                                                                         2          Nn
                                                                                > (δ ′ )2n +4n+2         .
                                                                                                   DN(q)
In terms of average, this says (with the same range for α)

                                          ′                         ′     ′        ′ 2n+2
                       E F(g((α + ad,d′ )d))F(g((α + ad,d′ )d )) > (δ )                      .
                       α

     If we consider the next sequence of polynomial maps and a Lipschitz function
            α7→α+ad,d′            g((−)d),g((−)d′ )                                          F(−)·F(−)
     qad0 −−−−−−−→ ad0 −−−−−−−−−−−→ G × G → (G/Γ) × (G/Γ) −−−−−−−→ C,
the previous inequality shows that the polynomial map qad0 → G × G is not
(9.27)                                        δ3 := (δ ′ )2n+2 Lip(F)−1

-equidistributed on [±(δ ′ )2n+2 N/(DN(q))1/n OK (1)]nqad0 . By Theorem A.4 there is a
non-zero horizontal character (necessarily the sum of horizontal characters G → R)

                                                                                                         Os,n(1)
         1        2
ηd,d′ = ηd,d ′ + ηd,d′ : G × G → R,                    |ηd,d′ | ≤ ((δ3 )−1 comp(G/Γ))exp((2 dim G)                 )
              LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                                      53


such that
(9.28)
     1                ′            2               ′      ′                                                n
    ηd,d ′ (g(((−) + ad,d′ )d)) + ηd,d′ (g(((−) + ad,d′ )d ))                                N/OK (1)
                                                                          C∞ ±(δ ′ )2n+2
                                                                                            (DN(q))1/n
                                                                                                              qad0

                                                            −1                        exp((2 dim G)Os,n (1) )
                                               ≤ ((δ3 )          comp(G/Γ))                                       .
   Let us pause a little to simplify the expression of (9.28). By the definition of
the norm k−kC∞ [−]n , changing the size of the cube in C∞ [−]n by a factor X can
change the norm at most by the factor Xs . So we may remove the factor (δ ′ )2n+2
from C∞ [−]n by enlarging the Os,n (1) exponent in the right-hand side. The same
goes for the OK (1) in the denominator (recall once again the remark after (9.21)).
Removing N(q)1/n from the denominator has the effect of multiplying the right-
hand side by N(q)s/n .
   Proposition A.9 with q0 = OK (N(q)1/n ) applied to the map (9.26) and the bound
(9.28) gives a positive integer qd,d′ ≪K N(q)Os,n (1) satisfying
                        1                        2           ′     h                       in
(9.29)           qd,d′ ηd,d ′ (g((−)d)) + qd,d′ ηd,d′ (g((−)d ))
                                                                 C∞ ±                N
                                                                                    D1/n    ad0

                            −1                 exp((2 dim G)Os,n (1) )                Os,n (1)
                    ≤ ((δ3 )     comp(G/Γ))                                     N(q)                .
9.2.2. The conspiracy of (d, d′ )’s. Now we have to use the fact that (9.29) is true
for many pairs (d, d′ ). For more consistent notation let us write henceforth
                                  (d1 , d2 ) instead of (d, d′ ).
(We didn’t do so before because it would have created messy formulas.)
  The horizontal characters qd,d′ ηd,d′ in (9.29) have magnitudes
                                                              Os,n(1)
                  ≤ ((δ3 )−1 comp(G/Γ))exp((2 dim G)                      )
                                                                              N(q)Os,n (1) .
                                                         Os,n(1)
There are ≤ ((δ3 )−1 comp(G/Γ))exp((2 dim G)          )
                                                        N(q)Os,n (dim G) horizontal char-
acters having such magnitude. By the pigeonhole principle, up to reducing the
number of (d, d′ ) = (d1 , d2 )’s by this factor, we assume that qd,d′ ηd,d′ in (9.29) is
common for all (d, d′ ) = (d1 , d2 ) under consideration.
   We conclude that there is a horizontal character
                                  η = η1 + η2 : G × G → R
                                                            Os,n(1)
of magnitude ≤ ((δ3 )−1 comp(G/Γ))exp((2 dim G)                       )
                                                                          N(q)Os,n (1) such that for
                                          Os,n(1)
   ≫K (δ3 comp(G/Γ)−1 )exp((2 dim G)                )
                                                        N(q)−Os,n (dim G) D2               pairs         (d1 , d2 )
we have the following inequality
(9.30)      η 1 (g((−)d1 )) + η 2 (g((−)d2 )) C∞ [±        N
                                                              ]n
                                                          D1/n ad0
                                                                                     Os,n (1)
                                 ≤ ((δ3 )−1 comp(G/Γ))exp((2 dim G)                             )
                                                                                                    N(q)Os,n (1) .
Now, at least either η 1 or η 2 is non-zero. By symmetry, let us assume
                                             η 1 6= 0.
Because the number of possible d2 ’s is OK (D), there is at least one d2 such that for
                                       Os,n (1)
≫K ((δ3 )−1 comp(G/Γ))exp((2 dim G)             )
                                                  N(q)Os,n (dim G) D values of d1 , the pair
  1 2                                  2
(d , d ) satisfies (9.30). Fix such a d .
54                                                    WATARU KAI


     Let Hk (k = 1, 2) be the polynomial map
                                                      (α,d)7→αd        g         ηk
                                  ad0 × d−1          → G −→ R.
                                         0 −−−−−−→ a −

If we write α = (α1 , . . . , αn ) and d = (d1 , . . . , dn ) with respect to some norm-length
compatible bases ad0 ∼  = Zn , d−1      ∼ n
                                   0 = Z , we can write this map as follows, introducing
                  k
the coefficients hi,j
                               X
               Hk (α, d) =         hki,j αi dj , hki,j ∈ R zero unless |i| = |j|.
                                     i,j

For each (d1 , d2 ), the map α 7→ η 1 (g(αd1 ))+η 2 (g(αd2 ) is a polynomial map ad0 → R
whose ith coefficient is
                              X
                                    h1i,j · (d1 )j + h2i,j · (d2 )j .
                                         j
                                      |j|=|i|

By the definition of k−kC∞ [±N/D1/n ]n , the relation (9.30) says that for all i 6= 0,


             X
(9.31)                h1i,j · (d1 )j + h2i,j · (d2 )j
               j
            |j|=|i|
                                                            R/Z

                                                                                          Os,n (1)                      D|i|/n
                               ≤ ((δ3 )−1 comp(G/Γ))exp((2 dim G)                                    )
                                                                                                         N(q)Os,n (1)          .
                                                                                                                         N|i|
                                                             P
     For each fixed d2 and i, the map d1 7→                          j    h1i,j (d1 )j +h2i,j (d2 )j is a polynomial
                                                                  |j|=|i|
map d−1
      0   → R of homogeneous degree |i| plus a constant term. Proposition A.8
applied to the situation that (9.31) holds for
                                                                      Os,n (1)
                ≫K (δ3 comp(G/Γ)−1 )exp((2 dim G)                                )
                                                                                     N(q)Os,n (dim G) D

values of d1 implies that there is a positive integer
                                                                           Os,n (1)
             q = O(((δ3 )−1 comp(G/Γ))exp((2 dim G)                                   )
                                                                                          N(q)Os,n (dim G) )
such that

                                            X
                               d1 7→ q               h1i,j (d1 )j + h2i,j (d2 )j
                                              j
                                           |j|=|i|
                                                                                       C∞ [±OK (1)D]n−1
                                                                                                              d
                                                                                                                  0
                                                                                                            |i|/n
                                                                     Os,n (1)                 D
               < ((δ3 )−1 comp(G/Γ))exp((2 dim G)                               )
                                                                                  N(q)Os,n (1) |i| ,
                                                                                               N
in concrete terms (by letting OK (1) absorb in δ3 )
                                           − exp((2 dim G)Os,n (1) )
                      qh1i,j         < δ3                               N(q)Os,n (dim G) /N|i| .
                               R/Z
              LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                               55


This is the same situation as in (9.17) and so we can use Lemma 9.4 to the coeffi-
                                                              − exp((2 dim G)Os,n (1) )
cients qh1i,j . It implies that {g(x)}x∈[±N]na is not totally δ3         N(q)−Os,n (dim G) -
                                                                      ′
equidistributed in G/Γ. By recalling the definition of δ3 (9.27) and δ (9.21), we
conclude that g is not
                                                            Os,n (1)
     δ(log N)−On (1) Lip(F)−1 comp(G/Γ)− exp((2 dim G)                 )
                                                                           N(q)−Os,n (dim G)
-equidistributed. As was noted in (9.2), this completes the proof of the type II case,
thereby proving the whole Proposition 9.1.

                            10. The orthogonality theorem
   Now we are ready to state and prove Theorem 10.1 below.
Theorem 10.1. Let 0 < ǫ < 1/10 be any positive number and 0 < cs,n ≪s,n 1 be
the small enough positive number.
                           g         F
   For every nilsequence a −         → C satisfying:
                           → G ։ G/Γ −
      • G/Γ is an s-step filtered nilmanifold of dimension ≤ (log log N)Os,n (cs,n ) ,
        complexity ≤ exp((log N)(1/2)−ǫ ),
      • F : G/Γ → C a 1-bounded function with Lipschitz constant ≤ exp((log N)(1/2)−ǫ ),
and the data:
      • a convex open subset C ⊂ Rn ,
      • an ideal q ⊂ OK of norm ≤ exp((log N)(1/2)−ǫ ) and a residue class a ∈
        (a/qa)×,
we have

            X                                                                   −1
                       (ΛaK − ΛaSiegel,Q )(x) · F(g(x)) ≤ Nn exp((log N)(1/2)−ǫ )
         x∈[±N]n ∩Ω
         x=a in a/qa

for all N > 1 large enough depending on K, ǫ, s.
   This section is devoted to the proof of Theorem 10.1. Of course, when g is
sufficiently equidistributed, the problem has been essentially settled by Proposition
9.1. So what remains is the fun part where we use the equidistribution theory of
polynomial maps to reduce the problem to Proposition 9.1.
   First, we apply the Factorization Theorem A.7 with parameters m = (log log N)Os,n (cs,n )
(where Os,n (1) is the constant from the dimension bound in Theorem A.7 and
cs,n > 0 is the exponent in the assertion of Theorem 11.1), M0 = exp((log N)(1/2)−ǫ )
and A = exp((log log N)1/2 ). We obtain a value M satisfying
                                                                 O    (1)
                                                            (2+m) s,n
                       M0 = exp((log N)(1/2)−ǫ ) ≤ M ≤ MA
                                                        0                      ,
an M-rational closed connected subgroup G′ ⊂ G (which we equip with an M-
rational Mel’cev basis for Γ ∩ G′ obtained as M-rational linear combinations of that
of G) and a decomposition
(10.1)                                     g = εg ′ γ
into the pointwise product of polynomial maps ε, g ′ , γ : a → G such that
      • ε is (M, [±N]n )-smooth;
56                                           WATARU KAI


         • g ′ takes values in G′ and {g ′ (x) mod Γ ∩ G′ }x∈[±N]n is totally 1/MA -
           equidistributed;
         • γ is M-rational and has period M′ a with 0 < M′ ≤ M.
Let us note in passing that when cs,n > 0 is small enough depending on K, s and
N is large enough depending on ǫ, then we have M ≤ exp((log N)(1/2)−ǫ/2 ). This
is because (2 + m)Os,n is again a (log log N)Os,n (cs,n ) , which is ≤ (log log N)1/3
                                     Os,n
if cs,n is small enough. So A(2+m)        ≤ exp((log log N)1/2 · (log log N)1/3 ) =
               5/6
exp((log log N) ), and this is way smaller than (log N)ǫ/2 (take log of both and
                                                                                             O
                                                                                        (2+m) s,n
compare) if N is sufficiently large depending on ǫ. This implies that MA0        ≤
exp((log N)(1/2)−ǫ · (log N)ǫ/2 ) = exp((log N)(1/2)−ǫ/2 ).
   We want to use the factorization (10.1) to reduce the problem to the case where
the polynomial sequence is equidistributed. Let us first dispose of the smooth part
ε.
   Let Y > 0 be a moderately large real number (which we will take as a power of
M). Split [±N]nR ∩ Ω into Yn smaller convex bodies Ωi (i ∈ I) of diameter ≤ 3N/Y
(in the k−kl∞ metric). Choose any xi ∈ [±N]n ∩ Ωi for each i ∈ I. The (M, [±N]n )-
smoothness of ε in particular says that it has Lipschitz constant ≤ nM/N. Thus
for any other x ∈ [±N]n ∩ Ωi we have
                                                      nM 3N    3nM
                                dG (ε(x), ε(xi )) ≤      ·   =     .
                                                       N   Y    Y
By the right-invariance of dG , we also have
                                                                           3nM
                dG ε(x)g ′ (x)γ(x), ε(xi )g ′ (x)γ(x) = dG (ε(x), ε(xi )) ≤     .
                                                                             Y
It follows that

                                                            3nM                        3nM   3nM2
|F(ε(x)g ′ (x)γ(x)) − F(ε(xi )g ′ (x)γ(x))| ≤ Lip(F)            ≤ exp((log N)(1/2)−ǫ )     ≤      .
                                                             Y                          Y      Y
Write εi := ε(xi ). We conclude



      X                                               X      X
                (ΛaK − ΛaSiegel,Q )(x)F(g(x)) ≤                         (ΛaK − ΛaSiegel,Q )(x)F(ε(x)g ′ (x)γ(x))
 x∈[±N]n ∩Ω                                           i∈I x∈[±N]n ∩Ωi
 x=a in a/qa                                              x=a in a/qa

                                                                                                                  
     X           X                                                                                      3nM2 
≤                           (ΛaK − ΛaSiegel,Q )(x)F(εi g ′ (x)γ(x)) + OK (#([±N]n ∩ Ωi ) · (log N) ·        )
                                                                                                          Y 
     i∈I       x∈[±N]n ∩Ωi
               x=a in a/qa

                                                                 
 X               X                                                                      3nM2
≤
                            (ΛaK − ΛaSiegel,Q )(x)F(εi g ′ (x)γ(x))         n
                                                                      + OK (N · (log N) · Y ).
         i∈I x∈[±N]n ∩Ωi
             x=a in a/qa
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                           57


If we set Y := M4 , the latter OK (−)-term decays at a rate ≤ Nn /M2 ≤ Nn exp(−2(log N)(1/2)−ǫ ).
So it suffices to show that for each i ∈ I we have


      X                                                     1 n
                (ΛaK − ΛaSiegel,Q )(x)F(εi g ′ (x)γ(x)) ≤     N exp(−(log N)(1/2)−ǫ )M−4n .
                                                            2
  x∈[±N]n ∩Ωi
  x=a in a/qa

It suffices to bound the left-hand side by an even smaller value like Nn /M4n+1 .
   By the (M, [±N]n )-smoothness of ε, we know that εi ∈ G has distance ≤
polym (M) from the origin. Hence the left-multiplication by εi as a map G/Γ → G/Γ
has Lipschitz constant ≤ polym (M) by [12, Lemmas A.5 and A.16]. Therefore
F(εi (−)) : G/Γ → C has Lipschitz constant ≤ Lip(F) · polym (M) ≤ M · polym (M).
We are reduced to proving the following claim (set C > 1 in the claim to be large
enough so it exceeds all the absolute constants O(1) in polym (M) that have ap-
peared so far. Then declare that 0 < cs,n < 1 had been chosen small enough that
such a choice is allowed).
Claim 10.2 (orthogonality, smooth part removed). The following variant of Theo-
rem 10.1 holds, where C > 1 is a given positive number and we assume 0 < cs,n < 1
had been chosen so that cs,n C does not exceed a certain constant depending s, n
(specified in (10.3)).
                                                                                   C
   The bound exp((log N)(1/2)−ǫ ) on the Lipschitz constant is replaced with Mexp(m ) .
The polynomial sequence g has the form g(x) = g ′ (x)γ(x) where g ′ , γ are as in
(10.1). The conclusion is that if N is large enough depending in addition on the
constant C, then

                    X
(10.2)                      (ΛaK − ΛaSiegel,Q )(x)F(g ′ (x)γ(x)) ≤ Nn /M4n+1 .
                       n
                x∈[±N] ∩Ω
                x=a in a/qa

   Next we want to reduce the proof of Claim 10.2 to the case where we have no
periodic factor γ. Since γ has period M′ a with 0 < M′ ≤ M, we split the sum in
(10.2) into the sum of ≤ Mn residue classes e   a ∈ a/M′ qa over a. Then γ becomes
constant on each of these residue classes. It suffices to show that each of these sums
has size ≤ Nn /M5n+1 .
   If we let {γ(x)} ∈ G be the fractional part of γ(x) (meaning that its Mel’cev
coordinates are in [0, 1)m ), then we know F(g(x)γ(x)) = F(g(x){γ(x)}) because F
is a function on G/Γ, and {γ(x)} is a polym (M)-rational point of G whose distance
from the origin is ≤ polym (M). This reduces the problem to showing (let the new
C be the largest of C and O(1)’s in the newly appeared polym (M)):
Claim 10.3 (orthogonality, γ now constant). The following variant of Theorem
10.1 holds, where C > 1 is a given positive number and we assume that cs,n had
been chosen small enough that cs,n C does not exceed a certain constant depending
s, n (specified in (10.3)).
    The bounds exp((log N)(1/2)−ǫ ) on the Lipschitz constant and the norm N(q) is
                     C
extended to Mexp(m ) . The polynomial sequence g has the form g(x) = g ′ (x)γ where
                                          C
g ′ is as in (10.1) and γ ∈ G is a Mexp(m ) -rational point whose distance from the
58                                         WATARU KAI

                             C
unit element is ≤ Mexp(m ) . The conclusion is that if N is large enough depending
in addition on C, then

                   X
                             (ΛaK − ΛaSiegel,Q )(x)F(g ′ (x)γ) ≤ Nn /M5n+1 .
                      n
               x∈[±N] ∩Ω
               x=a in a/qa

  To eliminate γ completely, we view the function x 7→ F(g ′ (x)γ) as the following
composition
                                 x7→γ −1 g′ (x)γ                       F(γ·(−))
                   a∼
                    = Zn                            G′γ := γ −1 G′ γ              C.


                                                     G′γ /Γ ∩ G′γ

Apply Proposition A.11 with parameters
                                                            C
                                         M         Mexp(m ) ,
                                          δ        1/MA .
                                                                             Os,n (1)   C   O(1)
we conclude that {γ −1 g ′ (x)γ}x∈[±N]n is totally 1/M(A/ exp(m     ))−exp(m +m       )
                                                                                        -
                      ′        ′
equidistributed in Gγ /Γ ∩ Gγ with respect to a polym (M)-rational Mel’cev basis
there.
                                                                   C     O(1)
   We also know that F(γ · (−)) has Lipschitz constant ≤ Mexp(m +m ) because
                            C                                                 C  O(1)
γ has distance ≤ Mexp(m ) from the origin. Note that G′γ has a Mexp(m +m ) -
rational Mel’cev basis by [12, Lemmas A.10 and A.13].
   To formulate the final intermediate claim, rename (G′γ , γ −1 g ′ γ, F(γ · (−))) as
(G, g, F). By setting the new C to be the largest of the old C and O(1)’s that
appeared now (added by 1 for the absolute safety), we are reduced to the following
equidistributed case.
Claim 10.4 (orthogonality, γ removed thus equidistributed). The following variant
of Theorem 10.1 holds, where C > 1 is a given positive number and we assume cs,n
had been chosen small enough that cs,n C does not exceed a certain constant which
depends on s, n (specified in (10.3)).
   The bounds exp((log N)(1/2)−ǫ ) on the complexity, Lipschitz constant and the
                                      C
norm N(q) is extended to Mexp(m ) . The polynomial sequence g is assumed to be
                     Os,n (1)
                              ))−exp(mC )
totally 1/M(A/ exp(m                      equidistributed in G/Γ. The conclusion is that
if N is large enough depending in addition on C, then

                    X
                               (ΛaK − ΛaSiegel,Q )(x)F(g(x)) ≤ Nn /M5n+1 .
                       n
                 x∈[±N] ∩Ω
                 x=a in a/qa

   When F is a constant function, by Mitsui’s Prime Number Theorem (Proposition
6.4) the claim holds. Therefore by subtracting the average from F (and possibly
dividing by 2 to keep it 1-bounded), we may furthermore assume
                                        F has average 0.
               LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                                            59


   Now let us simplify the exponent exp(mA
                                         Os,n (1)
                                                  )
                                                    − exp(mC ). By the definitions
A = exp((log log N)1/2 ) and m = (log log N)Os,n (cs,n ) , we have
            A
                      − exp(mC )
      exp(mOs,n (1) )
                                                                              
    = exp (log log N)1/2 − (log log N)Os,n (cs,n ) − exp (log log N)Os,n (cs,n C) .

We declare that the assumptions on cs,n , C had been such that the above quantities
(and a few analogous ones shortly below) satisfy
(10.3)                                      Os,n (cs,n ) < 1/10,
                                    Os,n (cs,n C) < 1/10                     say,
                                                                                       1/3
so that we conclude g is at least totally 1/Mexp((log log N) ) -equidistributed.
   Now we want to apply Proposition 9.1, but as the factor N(qSiegel) has an adverse
effect for our purpose, we need separate treatments depending on whether N(qSiegel)
is small or large.
                                       C+2
   First, assume N(qSiegel) ≤ Mexp(m ) . Proposition 9.1 together with Proposi-
tion 8.5 implies that

         X
                 (ΛaK − ΛaSiegel,Q )(x)F(g(x))
           n
    x∈[±N] ∩Ω
    x=a in a/qa
                                                                                                                   1/3
                                                                                                   − exp(log log N)    )
             n
    ≪s,K N · (log N)     On (1)
                                  Lip(F) comp(G/Γ)N(q)N(qSiegel) · M                                    (
                                                                                                     exp m Os,n (cs,n )
                                                                                                                         )

                                                      · M− exp((log log N)         )−m)
                     C                  C+2                                  1/3
    ≤ Nn M3 exp(m ) · Mexp(m                  )

                              1/4
    ≤ Nn M− exp((log log N)         )
                                        ,
if N is large enough depending on s, K, C. This is by far a better bound than we
want.
                                      C+2
   Next let us assume N(qSiegel) > Mm . Then Corollary 7.3 implies

                     X
                                (ΛaSiegel,Q − ΛaCramér,Q )(x)F(g(x))
                  x∈[±N]n ∩Ω
                  x=a in a/qa
                                              Os,n (1)                                         Os,n (1)
                  ≪s,K Nn Lip(F)m                          N(q)N(qSiegel )−1/Os,K (m                      )

                                                                               exp(mC+2 )
                                  C           Os,n (1)             C    −           Os,n (1)
                  ≤ Nn Mexp(m )·m                         Mexp(m ) M         Os,K (m           )


                                            C+1
                  ≤ Nn M− exp(m                   )

                  ≤ Nn M−10n ,
if N is large enough depending on s, K, C. Thus by the triangle inequality, the prob-
                                        P               a    a
lem reduces to showing that the sum        x∈[±N]n ∩Ω (ΛK − ΛCramér,Q )(x)F(g(x)) is
                                                               x=a in a/qa
subject to a similar bound. But this follows from Proposition 9.1 and Proposition
60                                        WATARU KAI


8.5 again, because now we can ignore the N(qSiegel) factors in these propositions as
ΛaSiegel,Q is not involved.5
    This completes the proof of Claim 10.4, hence of Theorem 10.1.

          11. The von Mangoldt function and its models are close
     We are finally ready to prove one of our main goals:
Theorem 11.1. For every non-zero fractional ideal a equipped with a norm-length
compatible basis, integer N ≫K,s 1 and convex subset Ω ⊂ [±N]na⊗R , we have
                  (ΛaK − ΛaCramér,Q ) · 1Ω Us+1 [±N]n ≪K,s (log log N)−cn,s
                                                       a

for some 0 < cs,n ≪s,n 1/100.
  Recall that we have established a much better bound on the Gowers distance
between ΛaSiegel,Q and ΛaCramér,Q in Proposition 7.2. So the remaining problem is to
bound the distance between ΛaK and ΛaSiegel,Q .
  Having proven Orthogonality Theorem 10.1, one might think that Gowers Inverse
Theorem A.1 immediately implies some bound on (ΛaK − ΛaSiegel,Q ) · 1Ω s+1          n
                                                                                      .
                                                                                       U    [±N]
This is not quite true because we do not have a pseudorandom majorant to ΛaK −
ΛaSiegel,Q required by Gowers Inverse Theorem. That is why we have to make a
detour along the so-called W-trick.6
    The W-trick consists in choosing a mildly large integer W > 1 and restricting
functions to each mod W class. To be more precise, we choose a ∈ [0, W − 1]na , and
for a given function f : a → C we consider the function ϕKW(W)  n f (W(−) + a). The
next lemma guarantees that for functions of our interest, Gowers norm bounds on
the W-tricked functions give Gowers norm bounds on the original ones.
    Recall that an element x ∈ a of a fractional ideal is said to be coprime to W if
one has Wa + xOK = a.
Lemma 11.2. Let 1 ≤ W < N/10 be an integer and let a ∼           = Zn be a fractional
ideal equipped with a norm-length compatible basis. Suppose we are given a function
f : [±N]n → C supported on the set {x ∈ [±N]n | x is coprime to W}.
    If we have a bound
                    ϕK (W)
                           f (W(−) + b)                          <A
                      Wn                 Us+1 (a∩(([±N]n −b)/W))
                                                              a

for some A > 0 uniformly for all b ∈ [0, W − 1]n coprime to W, then we have
                                    kf kUs+1 [±N]n ≪K,s A.
Proof. As in [30, Corollary 4.2], one is reduced to showing the following, where
(a/Wa)× is the set of residue classes which can be a single generator of a/Wa as
an OK -module:
                                                   ϕK (W)
                        1(a/Wa)× Us+1 (a/Wa) ≪K,s         .
                                                    Wn
     5The reader might have wondered why we did not compare Λa and Λa
                                                             K      Cramér,Q directly, then.
Remember that this argument worked because we are already reduced to the case of F having
average 0, and for this reduction we needed Mitsui’s Prime Number Theorem with Siegel zeros
considered.
   6The term “W-trick” seems to have been ﬁrst used in [9, p. 484]. The letter W is the name
they gave to a parameter rather casually, which therefore has no actual meaning (see also [8, §6]).
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                  61


By the OK -linear isomorphism a/Wa ∼
                                   = OK /(W) and Chinese Remainder Theorem,
one is reduced to showing
                                            ϕK (p)
(11.1)                    1F(p)× Us+1 (F(p)) ≤     (1 + ǫs (p))
                                             N(p)
                                                             Q
for some function p 7→ ǫs (p) > 0 such that the product p (1 + ǫs (p)) converges
absolutely. Here F(p) := OK /p is the residue field of p.
   By the definition of the Us+1 -norm and F(p)-linear algebra as in loc. cit. (sub-
traction of 2s+1 hyperplanes from an F(p)-vector space), we have
                                                               
                          2s+1              2s+1             1
                   1F(p)× Us+1 (F(p)) = 1 −       + Os            ,
                                            N(p)          N(p)2
which implies
                                                                                        
                                 1               1              ϕK (p)                1
     1F(p)× Us+1 (F(p)) = 1 −        + Os                   =          (1 + Os              ).
                                N(p)            N(p)2           N(p)                 N(p)2
This confirms (11.1) and completes the proof.                                                    
   Now consider
                            w := (log log N)1/3 .
                                             Q
with η > 0 small enough. Set W := P(w) = 0<p<w p. A motivation for this
                                                                                       s+1
choice of w is that it should be fast enough that the decay rate 1/w1/2     assured
by Proposition 11.3 beats (11.4), which is a small power of (log log N)−1 . Also, W
should not have a growth faster than the pseudopolynomial rate (11.2).
Proposition 11.3. Assume N > 1 is large enough depending on s, K. Let a ∈
                                             n
[0, W − 1]n ⊂ a be coprime to W. On a ∩ [±N]W −a except for < Nn−0.8 points, the
function
                     ϕK (W)
                            ((ΛaK − ΛaSiegel,Q ) · 1Ω )(W(−) + a)
                       Wn
is pointwise bounded in magnitude by OK,s (ν), where ν is a function satisfying
                                                    s+1                              s+1
          k1 − νkU2(s+1) (a∩ [±N]n −a ) ≪s,K 1/w1/2         = (log log N)−1/3·2            .
                                W


Write Λ        ea
       e a and Λ                                       a      a
         K       Siegel,Q for the modified version of ΛK and ΛSiegel,Q where the value
                            n−0.8
is set to 0 at those < N          points at which the values are not bounded by the
OK,s (ν).
Proof. There exist such majorants for ΛaSiegel,Q by the fact |ΛaSiegel,Q (−)| ≤ 2|ΛaCramér,Q (−)|
and Corollary 5.4, and for ΛaK by Proposition C.2 and Corollary C.4.
   By the triangle inequality for the Gowers norm, the average of these two majo-
rants does the job.                                                                     
   Prime Number Theorem implies
                       Y
(11.2)            W=      p ≪ e2w = exp(2(log log N)1/3 )
                             p<w

and its growth is slower than any pseudopolynomial quantity (of course, actually
                                                                1
it is slower than log N). Hence errors of the form exp(−(log N) 2 −ǫ ) from Theorem
10.1 can absorb bounded powers of W by slightly enlarging the value of ǫ.
62                                      WATARU KAI

                                                 F
Proof of Theorem 11.1. Let G ։ G/Γ −       → C be as in Theorem 10.1 and g : a →
G be a polynomial map. By [12, Lemma 6.7] and the fact that G is uniquely
divisible (being a successive extention of uniquely divisible groups), there is a unique
polynomial map g ′ : a → G satisfying g ′ (W(−) + a) = g(−). We apply Theorem
             g′             F
                     → C and q = WOK with various a ∈ a coprime to W in a.
10.1 to a −→ G ։ G/Γ −
This implies

(11.3)
         X                                                                  n
                  ϕK (W) a                                               N                      1
                        (ΛK − ΛaSiegel,Q )(Wx + a) · F(g(x)) ≤                    exp(−(log N) 2 −ǫ ).
                   Wn                                                    W
x∈a∩((Ω−a)/W)

                                          ea
                                  e a and Λ
Replacing ΛaK and ΛaSiegel,Q with Λ K       Siegel,Q from Proposition 11.3 does not
affect the validity of (11.3).
   This shows that Manners’ Gowers Inverse Theorem A.1 with δ = (log log N)−cn,s
is applicable to the W-tricked (Λea − Λea
                                  K     Siegel,Q ) · 1Ω , where 0 < cn,s < 1 is as in
Theorem 10.1. The requirement of pseudorandom majorant in Theorem A.1 says
k1 − νkU2(s+1) should decay at a pace

(11.4)                             (log log N)−Os,n (cs,n ) ,
                                           s+1
which is milder than (log log N)−1/10·2 , say, by assuming 0 < cs,n ≪s,n 1 is small
enough to beat the Os,n (1). By Proposition 11.3 we know this is achieved. We
conclude

             ϕK (W) e a   ea
(11.5)             ((ΛK − Λ Siegel,Q ) · 1Ω )(Wx + a)
              Wn                                                   n
                                                      Us+1 (a∩ [±N] −a )
                                                                    W

                                                                        ≤ (log log N)−cs,n .

Replacing Λ     ea
           ea , Λ                   a    a
             K    Siegel,Q back to ΛK , ΛSiegel,Q only changes the left hand side by
    −c
±N (with some 0 < c < 1) and so does not affect the validity of (11.5). Lemma
11.2 implies that we have a similar bound for the original functions:

                  (ΛaK − ΛaSiegel,Q ) · 1Ω Us+1 [±N]n ≪K,s (log log N)−cs,n .
                                                     a


Since we have a much better bound for (ΛaSiegel,Q − ΛaCramér,Q ) · 1Ω by Proposition
7.2, this completes the proof of Theorem 11.1.                                                 

   Let us isolate a bound from above as an independent statement because we are
using it later.
                                                                 1/3
       Q 11.4 (of the proof of Theorem 11.1). Let w = (log log N)
Corollary                                                            and W =
P(w) = p<w p. For N ≫s,K 1, we have

     ϕK (W)
            ((ΛaK − ΛaSiegel,Q ) · 1Ω )(W(−) + a)                      ≤ (log log N)−cs,n .
      Wn                                          U s+1 (a∩ [±N]n −a
                                                                     )
                                                                W


Proof. This is (11.5).                                                                         
              LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                     63


           12. Simultaneous prime values of affine-linear forms
   Our second main result is Theorem 12.1, which generalizes the Green–Tao–
Ziegler theorem [15, Main Theorem (p. 1763)] [11, Theorem 1.1] [14, Theorem
1.3] on simultaneous prime values of affine-linear forms Zd → Z of finite complexity
to the case where the target is the ring of integers OK of a general number field K.
In fact, for aesthetic and practical reasons it is better to allow the target to be also
a non-zero fractional ideal.
   Recall that for an affine linear map ψ : Zd → Zn written as ψ(x1 , . . . , xd ) =
      P
c0 + di=1 ci xi and a positive number N > 1, we define

                                kψkN := max(c0 N, max |ci |).
                                                           1≤i≤d

Theorem 12.1. Let a ∼         = Zn be a non-zero fractional ideal of a number field K
equipped with a norm-length compatible basis. Let t, d ≥ 1 be integer parameters.
Let N > 1 be an integer large enough depending on t, K.
   Let ψ1 , . . . , ψt : Zd → a be affine-linear maps of finite cokernels satisfying
      • ψ̇i |ker(ψ̇j ) has finite cokernel for all i 6= j (which implies that ψ1 , . . . , ψt
        have finite complexity ≤ s ≤ t (Definition F.1));
                                   1
      • kψi kN ≤ (log log N) 103 d2 cs,n .
Let Ω ⊂ [±N]d be a convex set. There is some 0 < cs,n,d ≪s,n,d 1 such that

                    t
                                       !
           X        Y                            Vol(Ω)        Y
(12.1)                    ΛaK (ψi (x))     =               t
                                                             ·   βp (ψ1 , . . . , ψt )
                    i=1
                                               res (ζK (s))    p
         x∈Ω∩Zd                                s=1

                                                                + Ot,d,K (Nd (log log N)−cs,n,d ),

where the quantities βp (ψ1 , . . . , ψt ) are defined by
                            n t
                             p
  βp (ψ1 , . . . , ψt ) :=                 E    1[ψi (x) 6= 0 in a/pa for all i and p | p].
                            ϕK (p) x∈(Z/pZ)d
Proof. Set once again

                                          w = (log log N)1/3
                          Q
and write W = P(w) := p<w p ≤ e2w = exp(2(log log N)1/3 ). What is important
about this choice is that W is slow enough (< some power of log N) to make (12.4)
true and fast enough so 1/w has a decay of type (log log N)−c (12.5). Also, having
the same w as in §11 helps keep the proof of Lemma 12.2 sightly simple.
   For each a ∈ [0, W − 1]d ⊂ Zd , consider the substitution
                                             x = Wy + a,
                                            P                         P                  P
y ∈ Zd ∩ Ω−a
          W . Any sum of the form               x∈Ω∩Zd (−) equals         a∈[0,W−1]d     y∈Zd ∩ Ω−a (−).
                                                                                                 W
In particular, our sum becomes
                             X              X        t
                                                     Y
                                                          ΛaK (ψi (Wy + a)).
                          a∈[0,W−1]d     y∈Zd ∩ Ω−a i=1
                                                 W
64                                         WATARU KAI


As affine-linear maps ψi satisfy ψi (x) = ψ̇i (x) + ψi (0), we have
                               ψi (x) = Wψ̇i (y) + ψ̇i (a) + ψi (0)
                                      = Wψ̇i (y) + ψi (a).
The contribution from the a’s such that ψi (a) is not coprime to W for some i is
negligible. Set
    AW,ψ1 ,...,ψt := {a ∈ [0, W − 1]d | ψi (a) is coprime to W for all 1 ≤ i ≤ t}.
                                                            Q
By the definition of βp , we have #AW,ψ1 ,...,ψt = ϕK (W) p|W βp (ψ1 , . . . , ψt ).
  Let a ∈ AW,ψ1 ,...,ψt . Set bi := ψi (a) and suppose we have an estimate

(12.2)
                  t
                                                    !
      X           Y ϕK (W)                                  Vol(Ω)/Wn Y
                               ΛaK (Wψ̇i (y) + bi )     =                 βp (ψ1 , . . . , ψt )
                  i=1
                        Wn                                  res (ζK (s))t
     y∈Zd ∩ Ω−a
             W
                                                            s=1             p∤W
                                                                           d                        !
                                                                        N                   −cs,n,d
                                                       + Ot,d,K                  (log log N)
                                                                        W
for some 0 < cs,n,d ≪s,n,d 1 and for all a ∈ AW,ψ1 ,...,ψt uniformly. Then by taking
                                                                    n
                                                                       t
the sum over a ∈ AW,ψ1 ,...,ψt and multiplying both sides by ϕKW(W) , we recover
the main terms of (12.1) and obtain an error term of the form
                     Y
                         βp (ψ1 , . . . , ψt ) · Nd (log log N)−cs,n,d .
                         p|W

By Rosen’s Mertens’ Theorem D.1, we have a bound
       Y                           Y Y  N(p) t                     Y       
                                                                                      1
                                                                                            t
           βp (ψ1 , . . . , ψt ) ≤               ≪t,K                         1−
                                   p<w
                                        ϕK (p)                        p
                                                                                     N(p)
           p|W                           p|p
                                                                   N(p)<w

                                                      ≪t,K (log w)t ≪ (log log log N)t .
This can be absorbed in (log log N)−cs,n,d by slightly compromising cs,n,d . Thus the
proof of Theorem 12.1 Qis reduced to proving (12.2).
   Actually, the factor p∤W βp (ψ1 , . . . , ψt ) in (12.2) can be omitted for the follow-
ing reason. Our w is large enough for Claim 5.3 and (5.4) to be valid. This implies
that
(12.3)                         βp (ψ1 , . . . , ψt ) = 1 + Ot,n (1/p2 )
                 Q
for p ∤ W. Hence p∤W βp (ψ1 , . . . , ψt ) = 1 + Ot,n (1/w) = 1 + Ot,n ((log log N)−1/3 ).
Separating this Ot,n (1/w)Qterm in (12.2)causes an error smaller than the asserted
one. Therefore the factor p∤W βp (ψ1 , . . . , ψt ) can be omitted.
   To proceed further, we need the following.
Lemma 12.2. Let w = (log log N)1/3 . For any b ∈ a coprime to W, we have
                                      
        1          ϕK (W) a
               −         Λ K (W(−) + b)                   ≪s,K (log log N)−cs,n
  res (ζK (s))      Wn                             n
                                                [±N] −b
                                                        
     s=1                                               Us+1 a∩      a
                                                                   W
              LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                        65


Proof. We show that each of the next functions is within the claimed distance to
the one that follows:
  ϕK (W) a                      ϕK (W) a
        ΛK (W(−) + b),                ΛSiegel,Q (W(−) + b),
   Wn                            Wn
                                       ϕK (W) a                                            1
                                                ΛCramér,Q (W(−) + b),                            .
                                         Wn                                          res (ζK (s))
                                                                                  s=1

By Corollary 11.4 we know
         ϕK (W) a                                                             −cs,n
               (ΛK − ΛaSiegel,Q )(W(−) + b)                    ≤ (log log N)      .
          Wn                                U s+1  a∩
                                                      [±N]n
                                                          a −b
                                                               W


  As in [30, p. 47], using Fourier analysis
             1          X
  1b+Wa = n                       e2πi(ξ(−)−ξ(b)) ,        an equality of functions on a,
            W
                   ξ∈Hom(a/Wa,Q/Z)

one can deduce from Proposition 7.2 the inequality
            ϕK (W) a
(12.4)            (ΛSiegel,Q − ΛaCramér,Q )(W(−) + b)                 
             Wn                                        Us+1 a∩
                                                               [±N]n
                                                                   a −b
                                                                            W

                                                    On,s (1)          −A
                                          ≪s,K W               (log N)      ≪s,K (log N)−A/2
for any A > 1.
   We know by Corollary 5.4

            ϕK (W) a                            1
(12.5)            ΛCramér,Q (W(−) + b) −
             Wn                           res (ζK (s))                 [±N]n
                                                                                 
                                              s=1               Us+1 a∩     a −b
                                                                           W

                                                                 1                            s+1
                                                    ≪s,K                 = (log log N)1/3·2         .
                                                           w1/2s+1
This completes the proof of Lemma 12.2.                                                                 

   Recall
    Q     that the proof of Theorem 12.1 had been reduced to proving (12.2) with
the p∤W βp factor omitted. Let us reproduce it for the convenience of reference.

Claim 12.3. Let w = (log log N)1/3 . There is a 0 < cs,n,d ≪s,n,d 1 such that for
any choice of b1 , . . . , bt ∈ [0, W−1]na coprime to W and convex body Ω ⊂ [±2N/W]d ,
we have
             t
                                                 !
    X       Y   ϕK (W) a
                              ΛK (Wψ̇i (y) + bi )
                    Wn
  y∈Zd ∩Ω i=1
                                                              d                   !
                                         Vol(Ω)               N
                                    =               + Ot,d,K      (log log N)−cs,n,d .
                                      res (ζK (s))t           W
                                  s=1

   If the ϕKW(W)
              n   ΛaK (Wψ̇i (y) + bi )’s in the left-hand side are replaced by the constant
function 1/ res (ζK (s)), the assertion trivially holds. Thus it suffices to show that
             s=1
replacing ϕKW(W)n  ΛaK (Wψ̇i (y) + bi )’s with 1/ res (ζK (s)) one by one causes errors of
                                                    s=1
66                                     WATARU KAI


asserted type. We show this by applying the von Neumann theorem F.4 to the
function
                                             ! Y  t
            1          ϕK (W) a                         ϕK (W) a
                   −         Λ K (W(−) + b i )  ·             ΛK (W(−) + bj ).
      res (ζK (s))      Wn                        j=i+1
                                                         Wn
           s=1

     By Lemma 12.2, for each i we have
                                             
            1          ϕK (W) a
                   −         Λ K (W(−) + b i )                      ≪s,K (log log N)−cs,n .
      res (ζK (s))      Wn
       s=1                                          Us+1 [±2N/W]n

There are parameters δ, ρ, L, M, X that we can choose in Theorem F.4. Let 0 <
                                                                        ′
c′s,n ≪s,n,d cs,n be small enough and we choose (say) δ := (log log N)−cs,n , ρ :=
     s+1                  1   ′                                                         1   ′
δ 2 , X := (log log N) 10d cs,n , M := X1/10 and L := M1/(10d) = (log log N) 103 d2 cs,n .
                                                              1  ′
The right hand side in Theorem F.4 is then < (log log N)− 200d cs,n . So we may set
            1
cs,n,d := 200d c′s,n .
   The pseudorandom majorant requirement in Theorem F.4 says that 1/ res (ζK (s))
                                                                                  s=1
and ϕKW(W)
        n  ΛaK (W(−) + bj ) (j = i, . . . , t) should be majorized by a function ν satis-
                                              On (1) ′
fying the (Ot,s (1), Os (1), Od,n ((log log N) 103 d2 cs,n ))-linear forms condition in scale
                                  s+2 ′
≥ N and error < (log log N)−2 cs,n . This is true by Corollary C.5 modulo a factor
OK,t (1) if the choice of c′s,n is small enough that exponents

                              On (1) ′
                                    c       and      − 2s+2 c′s,n
                              103 d2 s,n
are smaller than 1/3, the exponent in w = (log log N)1/3 .
   Therefore Theorem F.4 applies, verifying Claim 12.3. This completes the proof
of Theorem 12.1.                                                              

Remark 12.4. We would have liked to state and prove Theorem 12.1 by only assum-
ing that ker(ψ̇i )’s do not contain each other (making no difference when K = Q), so
that the theorem would determine the correct asymptotic number of constellations
in prime numbers studied in our former work [20]. This limitation comes from our
current form of the von Neumann Theorem F.4. It is unclear whether this limita-
tion can be overcome just by some clever linear algebra trick or it is more deeply
rooted.
                                Q
Remark 12.5. The product p βp (ψ1 , . . . , ψt ) is either zero (precisely when one of
the βp ’s is zero) or an absolutely convergent product (in particular a positive value)
by (12.3). We have βp (ψ1 , . . . , ψt ) 6= 0 if and only if there is an x ∈ Zd such that
ψi (x) 6= 0 in a/pa for all p | p and all i, or equivalently p ∤ N(ψi (x)a−1 ) for all i.
    When Zd carries an OK -module structure with respect to which ψi are all affine-
OK -linear, then as was mentioned in Proposition 5.2 we have a decomposition
                                                  Y
                          βp (ψ1 , . . . , ψt ) =   βp (ψ1 , . . . , ψt ).
                                              p|p

We have βp (ψ1 , . . . , ψt ) 6= 0 if and only if there is an x ∈ Zd such that ψi (x) 6= 0 in
a/pa for all i.
              LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                               67


      13. Hasse principle of rational points for certain fibrations
   Here we prove Theorem 13.4, which was formerly known only over Q by Harpaz–
Skorobogatov–Wittenberg [17]. For this application, we need Theorem 13.1, a
variant of Theorem 12.1 for the localized ring OK [S−1 ].

13.1. The localized variant of main theorem. For a finite set S of non-zero
prime ideals of OK , define OK [S−1 ] to be the ring obtained by inverting all p ∈
S; a pedantic formal definition of it is OK [S−1 ] = Γ(Spec OK \ S, O), where O is
the structure sheaf. A more concrete
                                 Q        description is, since Cl(K) is torsion (even
finite), some power of the ideal p∈S p is a principal ideal, say f OK . Then one has
OK [S−1 ] = OK [f −1 ].
   For a fractional ideal a ⊂ K of OK , write a[S−1 ] := a ⊗OK OK [S−1 ].
   Let IdealsOK [S−1 ] be the multiplicative monoid of non-zero ideals of OK [S−1 ]. It
is the free commutative monoid on the set of non-zero prime ideals of OK [S−1 ],
which is identified with the set of non-zero prime ideals of OK away from S. Let
N = NS−1 : IdealsOK [S−1 ] → N be the norm map b 7→ |OK [S−1 ]/b|. We omit the
subscript except when there is risk of confusion.
   Define the von Mangoldt function of the ring OK [S−1 ]
                          ΛOK [S−1 ] : IdealsOK [S−1 ] ∪{(0)} → R≥0
by b 7→ log(N(p)) if b is a non-trivial power of a prime ideal p of OK [S−1 ], and
b 7→ 0 otherwise. For a non-zero fractional ideal a over OK , define the function
                                     ΛaOK [S−1 ] : a → R≥0

by x 7→ ΛOK [S−1 ] (xa[S−1 ]−1 ).
   A routine but tedious argument lets one deduce the following from our main
results.
Theorem 13.1. Let a ⊂ K be a non-zero fractional ideal of OK . Let t, d ≥ 1 be
integers and Ψ = {ψ1 , . . . , ψt } be a set of affine-linear maps
                                       ψi : Zd → a[S−1 ]
having torsion cokernels such that for every pair i 6= j the restriction ψi |ker(ψj ) also
has torsion cokernel.
   Let N ≫Ψ,K,S 1 and Ω ⊂ [±N]d ⊂ Rd be a closed set with boundary of Lipschitz
class Lip(d, Z, L) for some Z, L ≥ 1.
   Then we have

    t
  X Y                                        Vol(Ω)
             ΛaOK [S−1 ] (ψi (x)) = CS,Ψ                 + OK,S,Ψ,Z,L(Nd (log log N)−1/OK,d,t (1) ),
                                           res (ζK (s))t
x∈Ω∩Zd i=1                                 s=1

where the coefficient CS,Ψ is as follows:
                                                                             
                       Y            t       t
                               pn           1 [               [                
               CS,Ψ :=                    1− d                          −1
                                                                       ψi,p (0) 
                                                                                ,
                         p
                             ϕK (p)        p i=1
                                                              p|p
                                                            not in S
68                                   WATARU KAI


where for each prime ideal p not in S with residue characteristic p, the map ψi,p : Zd /pZd →
a/pa is the affine-linear map induced by ψi . The coefficient CS,Ψ is positive if the
following condition is satisfied:
         for all p, there is an x ∈ Zd such that N(ψi (x)a[S−1 ]−1 ) is prime
(13.1)
         to p simultaneously for all 1 ≤ i ≤ t.
When the source Zd admits an OK -module structure with respect to which ψi are
affine-OK -linear, then the last condition is equivalent to:
                   / S, there is an x ∈ Zd such that ψi (x) are non-zero in
         for all p ∈
         a/pa simultaneously for all 1 ≤ i ≤ t.
   The deduction of Theorem 13.1 is not the main focus of this section, and thus
is deferred until §G.

13.2. Application to rational points. Below, for a place v of a number field K,
write Kv for the completion. Let | − |v : Kv → R≥0 be the associated absolute value,
which we choose (say) as |x|p := N(p)−vp (x) if v = p is non-archimedean and the
usual absolute value of R, C if v is archimedean.
   In any metric space, let us say that two elements are ε-close (ε > 0) if their
distance is ≤ ε.
   Here is an analog of [17, Proposition 1.2]. The case τv = +∞ and τv = ∞ for
all real and complex places v will suffice for the application in this section, but the
following form is somewhat more natural to formulate.
Proposition 13.2. Let S be a finite set of non-zero prime ideals of OK and suppose
we are given the data of
      • (λp , µp ) ∈ K⊕2   p for each p ∈ S,
      • τv ∈ R ∪ {±∞} and σv ∈ {±1} for each real place v and
      • τv ∈ C ∪ {∞} for each complex place v.
Let e1 , . . . , et ∈ OK [S−1 ] be distinct elements.
   Then for any 0 < ε < 1 there exist pairs (λ, µ) ∈ (OK [S−1 ] \ {0})⊕2 satisfying
the following conditions:
    (1) for all p ∈ S, in the p-adic sup metric on K⊕2 p , the pair (λ, µ) is ε-close to
          (λp , µp );
    (2) for each archimedean place v, the ratio λ/µ is ε-close to τv . Here, when v
           is real and τv = ±∞, this is interpreted as λ/µ having the same sign as τv
           and |λ/µ| > 1/ε. When v is complex and τv = ∞, then as |λ/µ| > 1/ε.
    (3) µ has sign σv in Kv = R for each real v.
    (4) λ − ei µ are prime elements of OK [S−1 ] for all i and no two of them are
           associates under the OK [S−1 ]× -action.
Proof. By multiplying everything by some element of OK [S−1 ]× having large val-
uations at primes p ∈ S, we may assume that (λp , µp ) ∈ O⊕2
                                                           Kp . Under this addi-
                                                       ⊕2
tional assumption, we claim that we can find (λ, µ) ∈ OK (more restrictively than
OK [S−1 ]⊕2 ) satisfying the asserted condition.
   Consider the following maps for i = 1, . . . , t:
(13.2)                              O⊕2
                                     K → OK [S
                                              −1
                                                 ]
                                  (λ, µ) 7→ λ − ei µ.
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                            69

                        Q           e
Define the ideal a :=        p∈S p        with e ≫ε 1 so that every element of a has distance
                                                  ⊕2
< ε from 0 in Kp for all p ∈ S. Let (λ0 , µ0 ) ∈ OK  be a representative of the class
                                 M
                 (λp , µp )p∈S ∈    (OKp /pe OKp )⊕2 ∼= (OK /a)⊕2 .
                                          p∈S

Choose a basis a ∼
                 = Zn and consider the following composite maps ψi for i = 1, . . . , t:
         ψi : Z2n ∼
                  = a⊕2        →       O⊕2
                                        K         → OK [S−1 ]
(13.3)
                  (x, y)     7 → (λ0 + x, µ0 + y) 7→ (λ0 + x) − ei (µ0 + y).

The condition (13.1) is satisfied by the collection of maps (13.2) by taking λ = 1, µ =
0, and therefore also by ψ1 , . . . , ψt because the affine-OK -linear map a⊕2 → O⊕2
                                                                                  K in
(13.3) becomes a bijection modulo p for each p ∈     / S.
   One easily checks that the condition that the quotient (λ0 + x)/(µ0 + y) be
ε-close to τv for all archimedean v and µ has sign σv for all real v defines a set
Ω ⊂ [±N]2n ⊂ R2n ∼  = a⊕2 ⊗ R with a Lip(2n, O(n), OS,ε (N)) boundary and volume
        2n
≫S,ε N .
   We can now apply Theorem 13.1 to this situation and obtain (≫S,ε,{ei }i N2n /(log N)t
many) pairs (x, y) ∈ a⊕2 , which in turn determine (λ, µ) := (λ0 + x, µ0 + y), sat-
isfying the asserted conditions. Note that the event that two of the λ − ei µ’s
be associates under the OK [S−1 ]× -action is asymptotically negligibly rare basically
because |OK [S−1 ]× ∩ OK,≤N | ≪K (log N)n+|S|−1 .                                     

  The passage from Proposition 13.2 to the following statement is identical to [17,
Proposition 1.2 to Proposition 2.1].

Proposition 13.3 (known for K = Q e.g. by [17, Proposition 2.1]). Let S be a finite
set of non-zero prime ideals of OK . Let e1 , . . . , et ∈ OK [S−1 ] be distinct. Suppose
we are given the data of τp ∈ Kp for each p ∈ S.
    Then for any 0 < ε < 1 there exist τ ∈ K and distinct non-zero prime ideals
                / S such that
p1 , . . . , pt ∈
    (1) τ is ε-close to τp in Kp for each p ∈ S;
    (2) τ is totally positive and |τ |v > 1/ε for all archimedean place v;
    (3) for all i = 1, . . . , t, we have vpi (τ − ei ) = 1;
                                       / S ∪ {pi }, we have vp (τ − ei ) ≤ 0;
    (4) for all i = 1, . . . , t and p ∈
    (5) for any i = 1, . . . , t and any cyclic extension L/K unramified outside S, we
        have
                                         X
               invpi (L/K, τ − ei ) +        invp (L/K, τp − ei ) = 0 ∈ Q/Z.
                                            p∈S
                             P
         In particular, if       p∈S invp (L/K, τp − ei ) = 0, then pi splits completely in
         L/K.

   Thanks to Propositions 13.2 and 13.3 which play the roles of [17, Propositions
1.2 and 2.1], all the results in [17] now hold over an arbitrary number field K rather
than just Q.
   For example, we have the following theorem. There, let AK be the ring of adèles
of K. Write Brvert (X) := π ∗ Br(K(P1 ))∩Br(X) ⊂ Br(K(X)) for the so-called vertical
70                                      WATARU KAI


Brauer group of an integral variety X and set
     X(AK )Brvert :=
                                                          X
     {x = (xv )v ∈ X(AK ) | for all ω ∈ Brvert (X),                   invv (ω|xv ) = 0 in Q/Z}.
                                                      v: all places

Theorem 13.4 (known for K = Q by [17, Theorem 3.1]). Let X be a geometrically
integral variety over K equipped with a smooth surjective morphism π : X → P1 .
Assume:
      • except for finitely many fibers X1 , . . . , Xt over P1 (K), each fiber of π con-
         tains a geometrically integral irreducible component;
      • the fiber Xi (1 ≤ i ≤ t) has an irreducible component X0i such that the
         algebraic closure of K in its function field is abelian over K.
        1
Then P (K) ∩ π(X(AK )) is dense in π(X(AK )Brvert ) ⊂ P1 (AK ).
Proof. The proof of [17, Theorem 3.1] works because it uses nothing particular
about Q except [17, Proposition 2.1], now available for general number fields as
Proposition 13.3. Perhaps it might seem that Step 2 of loc. cit. is using the fact that
Q has only one archimedean place, but one can as usual use small deformation in
X(Kv )’s by the inverse function theorem and the density of the inclusion K ֒→ K⊗R
to achieve the situation where the archimedean part (Mv )v of the adélic point to
approximate lies over the point ∞ ∈ P1 (K).                                          

               Appendix A. Results from the nilsequence theory
A.1. The inverse theory of Gowers norms. For positive integers N ∈ N recall
that we write [±N]n ⊂ Zn for the product of intervals [−N, N]n .
   Let us state a version of the Inverse Theorem for Gowers norms. This type of
statement was first conjectured (in public) by Green–Tao [15] and subsequently
proven by Green–Tao–Ziegler [14]. There has been a major quantitative improve-
ment by Manners [21]. It has been known since [15] that the statement for 1-
bounded functions implies a statement for ν-bounded functions for pseudorandom
functions ν, but the precise form of the pseudorandomness condition had been com-
plicated. Tao–Teräväinen [30] applied the work of Conlon–Fox–Zhao [3] to relax
the pseudorandomness condition required and to reduce the quantitative loss.
Theorem A.1 (Gowers Inverse Theorem on Zn ). Let k, n ∈ Z≥1 and let 0 < δ < 1
be small enough depending on k, n. Let N > 1 be an integer sufficiently large
depending on k, n.
   Let ν : [±N]n → C be a function satisfying
                                  kν − 1kU2k ([±N]n ) ≤ δ C0
where C0 ≫k,n 1 is sufficiently large depending on k, n, and let f : [±N]n → C be a
ν-bounded function satisfying
                                     kf kUk ([±N]n ) ≥ δ.
Then there exist:
     • a filtered nilmanifold G/Γ of degree k − 1, dim δ −Ok,n (1) , complexity ≤
       exp exp(δ −Ok,n (1) );
     • a 1-bounded function F : G/Γ of Lipschitz constant ≤ exp exp(δ −Ok,n (1) );
     • a polynomial map g : Zn → G
            LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                     71


such that
                                                                  −1
                       E       f (x)F(g(x)) ≥ exp exp(δ −Ok,n (1) )    .
                    x∈[±N]n

Proof. For n = 1, this is exactly [30, Theorem 8.3] except that for notational
simplicity we have omitted some constants Ok (1) by increasing the Ok,n (1) in the
exponent and assuming δ is sufficiently small. This change makes the assertion a
little weaker but will have no visible effect on our final result.
    The assertion for n > 1 can be reduced to the case of n = 1 by the following
somewhat well-known trick.7                        Pn
    Let φ : Zn → Z be the map (x1 , . . . , xn ) 7→ i=1 (5N)i−1 xi . This maps the cube
[±N]n injectively into the interval [±(5N)n ] ⊂ Z. Define
                                     ν ′ , f ′ : [±(5N)n ] → C
by setting the value equal to that of ν (resp. f ) on the image of [±N]n , and zero
otherwise. By the invariance of Gowers norms under Freiman isomorphisms [15,
p. 1817] we know that the ratios of Gowers norms
                       kν ′ kU2k ([±(5N)n ])               kf ′ kUk ([±(5N)n ])
(A.1)                                           and
                         kνkU2k ([±N]n )                    kf kUk ([±N]n )
are bounded from above and below by positive numbers depending only on k, n.
Then by the theorem for n = 1 with slightly compromised exponents (to make up
for the difference caused by the ratios (A.1)) one can find data G/Γ, F : G/Γ → C
and g ′ : Z → G satisfying

                           E        f ′ (x)F(g ′ (x)) ≥ exp exp(δ −Ok (1) ).
                      x∈[±(5N)n ]

Define a polynomial map g : Zn → G by the composition (recall that every additive
map Zn → Z is a polynomial map)
                                               φ      g′
                                       g : Zn −
                                              → Z −→ G.
As we know that the expectations computed on [±N]n and [±(5N)n ] are not so
different:
                                                 
                                           ′    ′       10Nn + 1
         E n f (x)F(g(x))           E n f (x)F(g (x)) =            ≍n 1,
      x∈[±N]                    x∈[±(5N) ]              (2N + 1)n
the assertion for n follows.                                                                       
Remark A.2. Our main problem in this paper is to show kΛK − ΛSiegel,Q kUs+1 [±N]n <
(log log N)−cs,n for some small 0 < cs,n ≪s,n 1 (Theorem 11.1). Theorem A.1 tells
us that, modulo the need of the W-trick to guarantee a pseudorandom majorant,
for this purpose it suffices to show a bound of the form (where the Os,n (1) constants
are given by the theorem and potentially huge)

(A.2)       E      (ΛK − ΛSiegel,Q )(x) · F(g(x))
         x∈[±N]n
                                                                                        −1
                                                      < exp exp((log log N)Os,n (cs,n ) )

   7This    trick   appears    for   example               in     Terence         Tao’s   blog   post:
https://terrytao.wordpress.com/2015/07/24/
72                                      WATARU KAI


                 ∼ Zn −  g                F
for all data OK =           → G → G/Γ −   → C where G/Γ has degree s and dimension
≤ (log log N)Os,n (cs,n ) , and its complexity and the Lipschitz constant of F are both
≤ exp exp((log log N)Os,n (cs,n ) ).
   If we demand that cs,n is small enough that the quantities Os,n (cs,n ) become
less than 1/2 say, then the quantities exp exp((log log N)Os,n (cs,n ) ) are smaller than
any quantity of the form exp((log N)c ) (c > 0) when N is large enough depending
on c. So it strengthens the problem if we attempt to show (A.2) after replacing
exp exp((log log N)Os,n (cs,n ) )’s by exp((log N)c )’s, and that is what we do in the
main part of the text.
A.2. The equidistribution theory of polynomial sequences.
Definition A.3 (Smoothness norm [13, (2.2)]). Let g : Zn → R be a polynomial
map. Let
                                    X
                             g(x) =      βi xi
                                              i∈Nn

be its expansion (βi ∈ R non-zero only for finitely many i). Define the smoothness
norm kgkC∞ ([±N]n ) of g in scale N ≥ 1 by
                             kgkC∞ ([±N]n ) := sup βi R/Z N|i| .
                                              i∈Nn


                                                       the variant
   As is explained in [13, Lemma 2.1], this differs from                        used
                                                                  of this norm    
                                             P        x            x     Qn      xk
in [12] (which uses the expansion g(x) = i αi             where       = k=1          )
                                                       i           i             ik
only by a factor ≍s,n 1, where s is the degree of g.
Theorem A.4 (Quantitative Leibman Theorem on Zn ). The quantitative Leibman
Theorem in [30, Theorem A.3] remains true for n ≥ 1. Namely, let m ≥ m∗ ≥ 0,
N ≥ 1 be integers and let 0 < δ < 1/2.
   Let G/Γ be a filtered nilmanifold of degree s, dimension m, and nonlinearity
dimension m∗ [12, pp. 482, 503].
   Let g : Zn → G be a polynomial sequence which is not δ-equidistributed in G/Γ.
    (1) Suppose G/Γ has complexity < 1/δ with respect to some Mel’cev basis. Then
        there exists a horizontal character η : G → R/Z with
                    0 < |η| < Os,n (1) · δ −Os,n (1)·exp((m+m∗ )            )
                                                                   Os (1)



        such that
               kη ◦ gkC∞ ([±N]n ) ≤ Os,n (1) · δ −Os,n (1)·exp((m+m∗ )               ).
                                                                            Os (1)




     (2) Even when one is not sure if the complexity comp(G/Γ) is less than 1/δ,
         the assertion stays true if we replace the bounds in the conclusion by
                                           Os,n (1)·exp((m+m∗ )Os (1) )
                 Os,n (1) · δ −1 comp(G/Γ)                                ,
        because one always has comp(G/Γ) ≤ comp(G/Γ)/δ.
Proof. For n = 1, this is exactly [30, Theorem A.3]. Green–Tao [13] prove this with
an unspecified exponent −Os,n,m (1) instead of −Os,n (1) · exp((m + m∗ )Os (1) ). In
their proof [13, §3], they show that if the assertion for n = 1 holds with bounds
δ −Cm,m∗ ,s for some Cm,m∗ ,s > 0, then the assertion for general n holds with bounds
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                       73


Os,n (1) · δ −Os,n (1)mCm,m∗ ,s . For n = 1, we know we can take Cm,m∗ ,s = exp((m +
m∗ )Os (1) ) by Tao–Teräväinen [30]. Therefore the assertion for the general n follows.
                                                                                       
Remark A.5. Theorem A.4 probably holds for the Gowers norm on cubes with
unequal sides. To verify it, one would only have to do a similar analysis of [13, §4].
   Note that the following partial converse (existence of such a character ⇒ non-
equidistribution) is straightforward to prove. Spelling out an explicit estimate helps
us be concrete.
Proposition A.6. Let G/Γ be as in Theorem A.4 and g : Zn → G be a polyno-
mial map. Suppose there is a non-trivial horizontal character η : G → R such that
kη ◦ g(x) − η ◦ g(0)kR/Z ≤ 0.2 for all x ∈ [±N]n . Then the polynomial map g is not
  1                           n
21|η| -equidistributed on [±N] .
    Consequently, there is some constant On,s (1) > 1 depending only on n and
s = deg(g) such that the same conclusion holds when kη ◦ gkC∞ [±N]n ≤ On,s1 (1) .

Proof. Let χ = χ0.2 : R/Z → R be the piecewise linear function whose value on
                                                                      2
[−0.2, 0.2] is 1, and −1 on [0.3, 0.7]. It has Lipschitz constant 0.1   = 20. Since
any horizontal character η : G/Γ → R/Z has Lipschitz constant ≤ |η| by definitions
(Definitions 4.3, 4.5), the function F := χ(η(−) − η(g(0))) : G/Γ → R has Lipschitz
constant ≤ 20|η| and so kFkLip := kFk∞ + (Lip. const.) < 21|η|.
  Now suppose that η ◦ g(−) − η ◦ g(0) : Zn → G/Γ → R/Z carries [±N]n into
[±0.2]. As χ has constant value 1 on this interval, we have
                                                                  1
            E F(g(x)) =         E χ(η(g(x)) − η(g(0))) = 1 >          kFkLip .
         x∈[±N]n             x∈[±N]n                            21|η|
                                         1
Therefore g violates the definition of 21|η| -equidistribution on [±N]n .
  The “consequently” part follows because for any polynomial map f : Zn → R of
degree s and x ∈ [±N]n , we have a bound of the form
                                            kxk∞
                   kf (x) − f (0)kR/Z = On,s (    · kf kC∞ [±N]n )
                                               N
and hence f = η◦g can vary at most On,s (kη ◦ gkC∞ [±N]n ) on [±N]n . This completes
the proof.                                                                        
    In the next theorem, a polynomial map ε : Zn → G (the target being equipped
with a Mel’cev basis) is said to be (M, [±N]n )-smooth (M, N ≥ 3) if for all x ∈ [±N]n
we have d(ε(n), 1G ) ≤ M and d(ε(x), ε(x + ei )) ≤ M/N for all 1 ≤ i ≤ n, where ei
is the ith elementary vector [12, Definition 9.1].
    A polynomial map γ : Zn → G is said to be M-rational if for every x ∈ Zn , the
                                                        M′
residue class γ(x)Γ contains an element gx such that gx x = 1 for some 0 < M′x ≤ M.
[12, Definition 1.7]. When the Mel’cev basis has complexity ≤ M, modulo raising
M to the mO(1) st power, this is the same as saying that its values via the Mel’cev
coordinates G ∼= Rdim G are all in M1′ Zdim G for some 0 < M′ ≤ M [12, Lemma A.11]
Theorem A.7 (Factorization Theorem). The quantitative Factorization Theorem
[30, Theorem A.6] remains true for polynomial maps on Zn : namely,
   Let m ≥ 0, M0 ≥ 2, A ≥ 2, N ≥ 1, d ≥ 0. Given:
      • a filtered nilmanifold G/Γ of dimension m, degree s and complexity ≤ M0 ;
74                                          WATARU KAI


      • a polynomial map g : Zn → G,
there exist:
                                                 O    (1)
                                            (2+m) s,n
      • some M with M0 ≤ M ≤ MA      0           ;
      • a subgroup G′ ⊂ G which is M-rational with respect to the given Mal’cev
        basis of G (which gives G′ a Mal’cev basis)
      • a decomposition g = εg ′ γ into polynomial maps (pointwise product)
such that
    (1) ε is (M, [±N]n )-smooth;
    (2) g ′ takes values in G′ and is totally 1/MA -equidistributed in G′ /Γ′
    (3) γ is M-rational and is periodic in G/Γ with period M′ Zn for some 0 < M′ ≤
        M.
Proof. The proof goes as in [12, §§9–10] (see also [30, p. 53] for the choice of the
parameters δi ). One uses Theorem A.4 to prove Factorization of poorly-distributed
polynomial sequences like [12, Proposition 9.2] and apply it repeatedly.          
Proposition A.8 (Polynomial Vinogradov theorem, [13, Proposition 2.3]). Let
                                                                       δ
g : Zn → R be a polynomial map of degree s, and 0 < δ < 1 and 0 < ε < 10 be
positive numbers.
    If the bound
                                         kg(x)kR/Z ≤ ε
holds for at least δNn values of x ∈ [±N]n , then there is some 0 < Q < δ −Os,n (1)
such that
                               kQgkC∞ ([±N]n ) < δ −Os,n (1) ε.
Proposition A.9 (Extrapolation, [13, Lemma 8.4]). Let s, n ≥ 1 be integers. Let
q0 , N ≥ 1 be integers, q0 being sufficiently large depending on s, n, and g : Zn → R
be a polynomial map of degree ≤ s.
    Let a = (a1 , . . . , an ), b = (b1 , . . . , bn ) ∈ Zn be vectors satisfying
                                     |ai | ≤ q0 N,    |bi | ≤ q0 .
                        O      (1)
Then there is 0 < q < q0 s,n         such that we have
                                        O    (1)
               kqgkC∞ ([±N]n ) < q0 s,n            · kg(a + b · (−))kC∞ ([±N]n ) .
Proof. This statement differs from [13, Lemma 8.4] in that we allow |ai | ≤ q0 N
rather than |ai | ≤ q0 in loc. cit. But the same proof works (which is in any case
easy).                                                                          
Proposition A.10 (Decomposition by averaged nilsequence). Let G/Γ be an s-step
nilmanifold, g : Zn → G a polynomial map and F : G/Γ → C a 1-bounded Lipschitz
function whose Lipschitz constant is bounded from above by Lip(F) ≥ 1.
   Let 0 < ǫ < 1 be a positive number and N > 1 be a positive integer. Then there
is a decomposition
                                F(g(x)) = F1 (x) + F2 (x),
                n
where F1 , F2 : Z → C are functions, F1 being 1-bounded, satisfying
                                                                     Os,n (1)
           Ex∈[±N]n F1 (x)f (x) ≪s,n (Lip(F)/ǫ)dim(G)                           kf kUs+1 [±N]n
              LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                               75


for any f : [±N]n → C, and
                             F2 (x) ≪s,n ǫ            for all x ∈ [±N]n .

Proof. For n = 1 this is due to Green–Tao [15, Proposition 11.2] 8 strengthened by
the comment by Tao–Teräväinen in [30, Proof of Proposition 7.1, p. 36]. Their proof
turns out to work for general n ≥ 1 just by replacing all Z/NZ by (Z/(2N + 1)Z)n
and Z/N′ Z by (Z/N′ Z)n , where N′ := 10sN. The implicit constants O(1) depend
on n in addition to s because they arise from Fourier analysis on (Z/N′ Z)n(s+1) and
the theory of Gowers Us+1 -norm on Zn (see the lines around [15, (11.7) on p. 1802]
for both of these points).                                                         
A.3. Conjugacy preserves equidistribution. We state and record a proof of
Proposition A.11 below, an explicitly quantitative version of [11, Claim on p. 547],
the details of whose proof are not written in loc. cit. It is used in the reduction of
the main theorem to the equidistributed case.
   As in [30, Appendix A], for an integer m ≥ 2 and a positive number M > 3 we
write
                                                 polym (M)
                                                                              O(1)
for a value bounded from above by an exp(exp(mO(1) ))Mexp(m ) where O(1)’s
                                                                          O(1)
can be taken to be absolute constants. (So it is actually also an Mexp(m ) .) Note
the the product of O(exp(mO(1) )) many polym (M)’s is still a polym (M) with new
O(1) constants.
   Below we always use the remark [30, the paragraph before Lemma A.4] by Tao–
Teräväinen that in Green–Tao’s summary [12, Appendix A] of the basic properties
of Mel’cev basis, the rationality bounds QOm (1) can actually be taken as polym (Q)’s.
Proposition A.11. Let G/Γ be an m-dimensional nilmanifold equipped with an
M-rational Mel’cev basis adapted for some s-step filtration G• . Let γ ∈ G be an M-
rational point and G′ ⊂ G be an M-rational subgroup. Equip G′ and its conjugate
G′γ := γ −1 G′ γ with the induced filtration from G and an polym (M)-rational Mel’cev
basis each (which exist by [12, Proposition A.10 and Lemma A.13]). Let g : Zn → G′
be a polynomial map which is totally δ-equidistributed as a map [±N]n → G′ /Γ ∩ G′
for some N ≥ 1 and 0 < δ < 1/2.
   Then the conjugate
                                 γ −1 gγ : [±N]n → G′γ
                                                      x 7→ γ −1 g(x)γ
                                 Os,n (1)
is totally polym (M)δ 1/ exp(m              )
                                                -equidistributed as a map [±N]n → G′γ /Γ ∩ G′γ .
   For the proof of Proposition A.11, we need the following lemma, whose proof is
deferred to §A.3.1
                                                                         ′
Lemma A.12. In the situation of Proposition A.11, let ψ ′ : G′ ∼ = Rdim G be the
coordinate defined by the chosen Mel’cev basis. Then the subgroup
                              Γ ∩ (γΓγ −1 ) ∩ G′           ⊂    Γ ∩ G′

   8I think their cutoﬀ function σ : R → [0, 1] on [15, p. 1801] should be supported on [0, 1] and
equal to 1 on [1/3, 2/3] (say), instead of [−1, 2] and [0, 1].
76                                          WATARU KAI

                                        ′
contains the set (ψ ′ )−1 (CZdim G ) for some C = polym (M) and this subset is a
                                                                       ′
subgroup. Consequently, this subgroup has fintie index (polym (M))dim G .

Proof of Proposition A.11 assuming Lemma A.12. The main part of this proof will
                                                                               Os,n (1)
be the claim that g as a map [±N]n → G′ /Γ∩(γΓγ −1 )∩G′ is polym (M)δ 1/ exp(m          )
                                                                                          -
equidistributed.
   Let us first verify that this claim can be used to prove Proposition A.11. In the
following diagram, where we write G′γ := γ −1 G′ γ:

                                              γ −1 (−)γ
                            g : Zn → G′      −−−∼−−→ G′γ
                                                 =
                                     ↓                     ↓
                G′ /Γ ∩ (γΓγ −1 ) ∩ G′          99K        G′γ /γ −1 Γγ ∩ Γ ∩ G′γ
                                     ↓                     ↓
                           G′ /Γ ∩ G′                      G′γ /Γ ∩ G′γ ,

endow the intermediate quotients G′ /Γ ∩ (γΓγ −1 ) ∩ G′ and G′γ /γ −1 Γγ ∩ Γ ∩ G′γ
with polym (M)-rational Mel’cev bases.9
   The conugacy map G′ /Γ ∩ (γΓγ −1 ) ∩ G′ → G′γ /γ −1 Γγ ∩ Γ ∩ G′γ has Lipschitz con-
stant polym (M) by [12, Lemma A.17] applied to the inclusions G′ ⊂ G ⊃ G′γ . Thus
                                                                                               Os,n (1)
by the assumption that g : [±N]n → G′ /Γ∩(γΓγ −1 )∩G′ is polym (M)δ 1/ exp(m )
                                                                               -
                           −1                     n      ′   −1           ′
equidistributed, the map γ gγ seen as a map [±N] → Gγ /γ Γγ ∩Γ∩Gγ remains
                     Os,n (1)
polym (M)δ 1/ exp(m     )
                          -equidistributed.
  The quotient map to G′γ /Γ ∩ G′γ always preserves equidistribution (at least at
the cost of compromising a polym (M) factor caused by the difference of the Mel’cev
bases).
  This proves a weaker version of Proposition A.11 where the adverb “totally” in
the conclusion is omitted. To draw the full assertion, let
                                                                Os,n (1)
                                N′ > N · polym (M)δ 1/ exp(m                )


be an integer and [±N′ ]n ֒→ [±N]n be a map given by a map of the form x 7→
ax + x0 (a ∈ N, x0 ∈ [±N]n ). Since N′ > δ 1/2 N, we know that g(a(−) + x0 )
as a map [±N′ ]n → G′ /Γ ∩ G′ is still totally δ 1/2 -equidistributed. By the weaker
version of Proposition A.11 that we have just proven, we conclude that its conjugate
                                                                                 Os,n (1)
γ −1 g(a(−) + x0 )γ as a map [±N′ ]n → G′γ /Γ ∩ G′γ is polym (M)(δ 1/2 )1/ exp(m          )
                                                                                            -
equidistributed. This proves Proposition A.11, assuming the claim made at the
beginning of the proof.
   It remains to verify this key claim. Let us state it again.
                                                          Os,n (1)
Claim A.13. The map g is polym (M)δ 1/ exp(m                         )
                                                                         -equidistributed when seen as
a map [±N]n → G′ /Γ ∩ (γΓγ −1 ) ∩ G′ .

     The rest of this proof is devoted to the verification of Claim A.13.


   9They exist by [12, Proposition A.9] applied to the already given Mel’cev bases for the smaller
quotients, seen as polym (M)-weak bases for the subgroups in question; these are weak bases by
Lemma A.12.
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                         77


   Suppose it is not δ ′ -equidistributed for some δ ′ > 0. By the quantitative Leibman
theorem A.4 there exist a non-zero horizontal character η : G′ → R satisfying
                       η(Γ ∩ (γΓγ −1 ) ∩ G′ ) ⊂ Z
                                                                             Os,n (1)
                                               |η| < (δ ′ )− exp((2m)                   )

                                                                             Os,n (1)
                               kη ◦ gkC∞ [±N]n < (δ ′ )− exp((2m)                       )
                                                                                            .
                                                ′              −1            ′
By Lemma A.12, the index C = (Γ∩G : Γ∩(γΓγ )∩G ) = polym (M) satisfies the
condition that Cη carries Γ ∩ G′ into Z. We conclude that the non-zero horizontal
character Cη satisfies
                        Cη(Γ ∩ G′ ) ⊂ Z,
                                                                                     Os,n (1)
                                  |Cη| < polym (M) · (δ ′ )− exp((2m)                           )

                                                                                     Os,n (1)
                   kη ◦ gkC∞ [±N]n < polym (M) · (δ ′ )− exp((2m)                               )
                                                                                                    .
    The (easier) converse of the Leibman theorem (Proposition A.6) implies that then
                                                                 Os,n (1)
g : [±N]n → G′ /Γ ∩ G′ is not totally polym (M)−1 (δ ′ )exp((2m)          )
                                                                            -equidistributed.
As we are assuming that it is totally δ-equidistributed, we conclude that
                                                             Os,n (1)
                             polym (M)−1 (δ ′ )exp((2m)                 )
                                                                            < δ,
in particular
                                                                 Os,n (1)
(A.3)                          δ ′ < polym (M)δ 1/ exp((2m)                  )
                                                                                 .
   By contraposition, for any δ ′ violating (A.3), we know that g as a map [±N]n →
  ′
G /Γ ∩ (γΓγ −1 )G′ is δ ′ -equidistributed. Taking δ ′ as the right hand side of (A.3),
the proof of Claim A.13 and hence of Proposition A.11 is complete.
  (But remember that Lemma A.12 remains to be shown.)                                
A.3.1. The proof of Lemma A.12. We will make repeated use of the following de-
scription of the group structure through the lens of a Mel’cev basis.
Lemma A.14. Let M > 1 be a positive number and let G/Γ be an m-dimensional
nilmanifold equipped with an M-Mel’cev basis adapted to some filtration. Let G ∼ =
Rm be the corresponding Mel’cev coordinate.
   Then the multiplication and inversion on G is written by polynomials as follows:
for x = (x1 , . . . , xm ), y = (y1 , . . . , ym ) ∈ G ∼
                                                       = Rm , we have
(A.4)           x · y = (xi + yi + Pi (x1 , . . . , xi−1 ; y1 , . . . , yi−1 ))i=1,...,m ,
                             e i (x1 , . . . , xi−1 ))i=1,...,m .
                x−1 = (−xi + P
Here, Pi , Pe i are polynomials of degree ≤ m whose coefficients are rational numbers
of height ≤ polym (M) Moreover, the polynomials Pi only have terms of bidegree
≥ (1, 1) in x and y (meaning that each term must contain one of the xi ’s and one
of the yi ’s). The polynomials P e i only have terms of degree ≥ 2.

Proof. This is [12, Lemma A.3] with the height bound clarified in [30, the paragraph
before Lemma A.4]. The claims about degrees do not appear in loc. cit., but follow
from the specific form of the Baker–Campbell–Hausdorff formula
                                                  1
                   exp(X) · exp(Y) = exp(X + Y + [X, Y] + · · · ),
                                                  2
78                                            WATARU KAI


where the higher terms are nested Lie brackets with rational coefficients in which
X and Y both appear at least once.                                              


Proof of Lemma A.12. The first assertion of Lemma A.12 was that the subgroup
                                                     ′
Γ ∩ (γΓγ −1 ) ∩ G′ contains the set (ψ ′ )−1 (CZdim G ) for some C = polym (M) when
G/Γ admits an M-rational Mel’cev basis, and G′ and γ ∈ G are M-rational.
   Recall that by using [12, Proposition A.9], G′ /Γ ∩ G′ and G′γ /Γ ∩ G′γ are given
polym (M)-rational Mel’cev bases (adapted to some filtration) obtained as polym (M)-
rational linear combinations of that for G/Γ. By Lemma A.14, the conjugacy map
composed with the Mel’cev coordinates
                                                 ′                 ′
(A.5)                          γ −1 (−)γ :     Rm ∼= G′ → G′γ ∼
                                                              = Rm

(m′ = dim G′ ) is represented by constant-term-free polynomials of degree ≤ m
with rational coefficients of height ≤ polym (M). Let C = polym (M) be a common
multiple of the denominators appearing there. Then it is easy to see that the map
                    ′          ′                             ′
(A.5) carries CZm into Zm . This implies that (ψ ′ )−1 (CZm ) ⊂ γΓγ −1 . Since we
                           ′       ′
trivially know that CZm ⊂ Zm = ψ ′ (Γ ∩ G′ ),this establishes the first assertion.
                                     ′
    Next we want to prove that CZm is a subgroup of Γ∩G′ by possibly modifying C
by a factor ≤ polym (M). By Lemma A.14 applied to G′ /Γ ∩ G′ , the multiplication
and inversion of the group G′ is represented by polynomials Pi , Pe i with rational
coefficients of height ≤ polym (M). We add the requirement that C is also a common
multiple of the denominators appearing there. Then by the description (A.4) and
                                                                                    ′
the condition that Pi only have terms of bidegree ≥ (1, 1), we conclude that CZm
                                                                ′
is closed under multiplication and inversion of G′ , namely CZm is a subgroup.
                                 ′     ′               ′
    Lastly we prove that CZm ⊂ Zm has index Cm , and in particular that Γ ∩
                             m′                                                     ′
γΓγ ∩G has index ≤ C = polym (M) in Γ∩G . Use the identification G′ ∼
     −1    ′                                      ′
                                                                              = Rm
                                                         ′
by the Mel’cev coordinates. Let us write Γ′(C) := CZm ⊂ Γ∩G′ . It suffices to show
that a fundamental domain for the quotient G′ /Γ′(C) can be taken as the product
        ′
[0, C)m of intervals, an analogous statement to [12, Lemma A.14]. The verification
goes exactly as in loc. cit.10
    This completes the proof of Lemma A.12 (and therefore of Proposition A.11,
phew!).                                                                            



                          Appendix B. Elementary inequalities
   We recall a few inequalities from [10, Appendix A]. As we need them in slightly
different formats than in loc. cit., we will include complete proofs of them.

Proposition B.1 (Eliminating the characteristic function of cubes). Let B be a
finite set and J(β) ⊂ Zn a bounded cube given for each β ∈ B. Let B × Zn → C
be a function and N ≥ 2 an integer. Then there is a homomorphism ξ : Zn → Q/Z



     10We believe that the order m, m − 1, . . . , 1 in the proof in loc. cit. has to be reversed.
              LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                    79


such that we have
                                           2
         X       X
(B.1)                  1J(β) (x)K(β, x)
         β∈B x∈[±N]n
                                                                                                2
                                                            X      X
                                            ≪n (log2n N)                    e2πiξ(x) K(β, x) .
                                                            β∈B   x∈[±N]n

Proof. This is essentially taken from [10, Lemma A.2]. We identify the set [±N]n
with the additive group (Z/(2N + 1)Z)n . By Fourier analysis, for any cube J we
can write
                                  X
               1J (x) =                       h1J , e2πiξ(−) i · e2πiξ(x)
                              ξ∈Hom((Z/(2N+1)Z)n ,Q/Z)

where h1J , e2πiξ(−) i = Ex∈(Z/(2N+1)Z)n 1J (x)e−2πiξ(x) .
  Suppose J is the product [a1 , b1 ] × · · · × [an , bn ], and that under the bijection
                                                       1
               Hom((Z/(2N + 1)Z)n , Q/Z) ∼
                                         =(                 Z)n /Zn ∼
                                                                    = [±N]n ,
                                                     2N + 1
the map ξ corresponds to the tuple (ξ1 , . . . , ξn ) ∈ [±N]n . Then
                                     n                bi
                                                                        !
                                    Y         1      X         2πi
                         2πiξ(−)                            − 2N+1 ξi x
                 h1J , e         i=                       e               .
                                    i=1
                                        2N + 1 x=a
                                                            i


By the sum of geometric series, unless ξi = 0 we have
                  Xbi                           2πi             2πi
             1            2πi          1    e− 2N+1 ξi ai − e− 2N+1 ξi (bi +1)
(B.2)                 e− 2N+1 ξi x =                         2πi
           2N + 1 x=a                2N + 1         1 − e− 2N+1 ξi
                          i

                                                           1        2          1
                                                     ≤         · 2π         =
                                                         2N + 1 2N+1  |ξi |   π|ξi|

and when ξi = 0 the left hand side equals (bi − ai + 1)/(2N + 1) which is ≤ 1. Let
us denote this upper bound by b(ξi ):
                                (
                                    1
                                        if ξ ∈ [±N] \ {0}
                         b(ξ) := π|ξ|
                                  1     if ξ = 0,

so that |h1J , e2πiξ(−) i| ≤ b(ξ1 ) · · · b(ξn ).
   By the triangle inequality for the l2 -norm, we have

                                                                                               1/2
                                                                                            2
                       X             X        X                                          
(L.H.S. of (B.1))1/2 =                              h1J(β) , e−2πiξ(−) ie2πiξ(x) K(β, x) 
                               β∈B ξ∈[±N]n x∈[±N]n
                                                                                           1/2
                                                                                        2
                              X X             X                                         
                      ≤                            h1J(β) , e−2πiξ(−) ie2πiξ(x) K(β, x)           .
                          ξ∈[±N]n     β∈B x∈[±N]n
80                                           WATARU KAI


By the relation |h1J(β) , e2πiξ(−) i| ≤ b(ξ1 ) · · · b(ξn ), this is bounded as follows:
                                                                                    
                                                                                   2 1/2
                         X                           X X 2πiξ(x)                    
                   ≤            b(ξ1 ) · · · b(ξn )                e      K(β, x) 
                          ξ∈[±N]n                           β∈B x∈[±N]n

                                                                                                  1/2
                                                                                                 2
            X                                    X                X                          
     ≤             b(ξ1 ) · · · b(ξn ) · max n                            e2πiξ(x) K(β, x)              .
                                            ξ∈[±N]
          ξ∈[±N]n                                          β∈B x∈[±N]n


By (B.2), we know
            X                              Yn                     
                                                  2    1         1
                   b(ξ1 ) · · · b(ξn ) ≤       1 + (1 + + · · · + ) ≪n logn N.
                                           i=1
                                                  π    2         N
         ξ∈[±N]n

This completes the proof of Proposition B.1.                                                                    

Proposition B.2 (A version of Cauchy–Schwarz). Let A, B be finite sets and let
f : A → C, F : A × B → C be functions. Then
                                                                                                      1/2
        XX                                                        X X
                  f (a)F(a, b) ≤ max |f (a)|(#A)1/2                             F(a, b)F(a, b )  ′
                                     a∈A
        a∈A b∈B                                                   a∈A b,b′ ∈B

Proof. This is taken from [10, Lemma A.10]. By the triangle inequality
     XX                           X              X                                 X X
               f (a)F(a, b) ≤          |f (a)|         F(a, b) ≤ max |f (a)|                     F(a, b) .
                                                                       a∈A
     a∈A b∈B                     a∈A             b∈B                               a∈A b∈B
                                               P
By Cauchy–Schwarz for the functions 1 and a 7→   b∈B F(a, b) on A, we have
                                                      
                                                      2 1/2
          X X                          X X
                 F(a, b) ≤ (#A)1/2            F(a, b) 
               a∈A b∈B                                   a∈A b∈B
                                                                                     1/2
                                                         X X
                                    = (#A)1/2                         F(a, b)F(a, b′ )     .
                                                         a∈A b,b′ ∈B

These two inequalities imply the assertion of Proposition B.2.                                                  

                     Appendix C. The pseudoradom majorant
  As usual, let a be a non-zero fractional ideal of K equipped with a norm-length
compatible basis a ∼= Zn . Fix once and for all a C∞ -function χ : R → [0, 1] sup-
ported in [−1, 1] and satisfying χ(0) = 1. Set
                                     Z 1
                               cχ :=     χ′ (t)2 dt > 0.
                                                 0

Q Whenever a positive real number w > 0 is given, we write W := P(w) :=
 p<w p ∈ N.
  The following definition is taken from [20, §§6–7].
            LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                            81


Definition C.1. Let R, w > 0 be positive numbers. Let b ∈ a be coprime to W in
                                                  a
the sense that Wa + bOK = a. Define the function νR,w,b : a → R≥0 by
(C.1)
                                                                                       
                                                       X                               2
 a              ϕK (W) ress=1 (ζK (s)) log R                                  log N(d) 
νR,w,b (x) :=         ·                     ·                    µK (d)χ                   ,
                 Wn             cχ                                               log R
                                                  (Wx+b)a−1 ⊂d

where d runs through the non-zero ideals of OK containing (Wx + b)a−1 .
   We want to use this function to majorize the W-tricked ΛK . In fact, it is more
convenient to consider the following variant where we ignore the contribution from
prime powers of exponents ≥ 2:
                         Λ′K (d) := 1[d is a prime ideal] · ΛK (d),
                         Λ′a        ′
                          K (x) := ΛK (xa
                                          −1
                                             )    for x ∈ a \ {0}.
Proposition C.2. Assume 0 < w < (log N)0.5 and b ∈ [0, W − 1]n ⊂ a (a complete
set of representatives for a/Wa). Then we have a bound
                      ϕK (W) ′               log N a
(C.2)                       ΛK (Wx + b) ≪K,χ      ·ν     (x)
                       Wn                    log R R,w,b
for all x ∈ [±N]n ⊂ a satisfying N(Wx + b) > R · N(a).
   In particular, set R := N1/10t for some integer t ≥ 1. Then
                  ϕK (W) ′                       a
(C.3)                    ΛK (Wx + b) ≪K,χ 10t · νN 1/10t ,w,b (x)
                    Wn
for all but ≪K Nn−0.8 many x ∈ [±N]n ⊂ a.
Proof. When (Wx+b)a−1 is not a prime ideal, the assertion is trivially true because
the left hand side is zero.
   Assume (Wx + b)a−1 is a prime ideal. Then the left hand side is ϕKW(W)
                                                                       n  N((Wx +
b)a−1 ). By the assumptions on w, b, we know Wx+b ∈ [±2WN]n and thus N((Wx+
b)a−1 ) ≪K (WN)n < Nn+1 . Therefore the left-hand side is
                                       ϕK (W)
                                   ≪K         log N.
                                        Wn
On the other hand, since p := (Wx + b)a−1 is assumed to be prime, the only
choices for b in (C.1) are b = p, OK . But p does not contribute by the assumptions
N(p) > R and Supp(χ) ⊂ [−1, 1]. So we can compute as:
           a             ϕK (W) ress=1 (ζK (s)) log R      ϕK (W)
          νR,w,b (x) =         ·                      ≫K,χ        · log R.
                          Wn             cχ                 Wn
This proves (C.2).
   To prove (C.3) we have to bound the number of x ∈ [±N]n satisfying N((Wx +
b)a−1 ) ≤ R. By Proposition E.1 and Lemma E.3, we know that the number of
y ∈ [±2WN]n satisfying N(ya−1 ) ≤ R is
                          ≪K R + OK ((WN)n−1 ) ≪K Nn−0.8 .
Since the map x 7→ y := Wx + b is injective and carries [±N]n into [±2WN]n , we
deduce that the number of x ∈ [±N]n satisfying N((Wx + b)a−1 ) ≤ R is subject to
the same bound. This completes the proof.                                     
82                                     WATARU KAI


  Now we want to verify that our majorants satisfy suitable pseudorandomness
condition. Though the concrete pseudorandomness conditions needed in Theorem
A.1 and Theorem F.4 are slightly different, they are both derived from the main
computation in our earlier work [20].
Theorem C.3. Let N, t, d, L > 0 be positive integers and let
                                   φ1 , . . . , φt : Zd → a
be linear maps of coefficients ≤ L with respect to a norm-length compatible basis of
a. Assume that they all have finite cokernels and that their kernels do not contain
each other.                                                                Q
   Let 1 < w < (log N)0.5 be a real number and set W = P(w) := p<w p. Choose
any b1 , . . . , bt ∈ a coprime to W in the sense that Wa + bi OK = a. Choose any
intervals I1 , . . . , Id ⊂ Z of ≥ N1/2 elements and set B := I1 × · · · × Id ⊂ Zd .
   If N > Ot,K (1) and w > OK,d (LOn (1) ) + O(4nt ), we have
                                " t                       #
                                  Y
                                     a
                         1− E       νN1/10t ,w,bi (φi (x)) = Oχ,t,n (1/w).
                       x∈B
                             i=1

Proof. This is a specialized form (R := N1/10t ) of [20, Theorem 6.33, Remark 6.32]
(see also [20, comment before Remark 6.30]).                                     
Corollary C.4 (majorization, Gowers-close to 1). Let s ≥ 1 be an integer. Let
Os,K (1) < w < (log N)0.5 be a positive number and let b ∈ a be coprime to W =
P(w). Set t := 2s+1 . Then for any cuboid B ⊂ Zn ∼         = a that is the product of
intervals of ≥ N1/2 elements, we have
                               a                           1
                         1 − νN  1/10t ,w,b          ≪χ,s,n .
                                            Us+1 (B)       w
   Proposition C.2 and Corollary C.4 can be summarized that except for negligibly
few (< Nn−0.8 ) points in [±N]n , the W-tricked Λ′aK is bounded from above up to a
constant factor OK,χ (t) by a function which is only Oχ,s,n (1/w) away from 1 in the
Gowers Us+1 -norm.
Corollary C.5 (simultaneous majorization, linear forms condition). Let N, t, d, L ≥
1 be integers and assume N > L100 + Ot,d,K(1).
               On (1)
   Let OK,d
         Q (L         ) + O(4nt ) < w < (log N)0.5 be a positive number and set W =
P(w) = p<w p. Choose any b1 , . . . , bt ∈ [0, W − 1]n ⊂ a coprime to W. Then
there exists a function ν : a → R≥0 that satisfies the (t, d, L)-linear forms condition
in scale ≥ N0.52 within error < Ot,n (1/w) (Definition F.3) such that we have a
pointwise bound
                                1, Λ′a
                                    W,bi (x) ≪K t · ν(x)

for all 1 ≤ i ≤ t and all but < Nn−0.8 many x ∈ [±N]n ⊂ a.
Proof. Choose any C∞ function χ : R → [0, 1] as in the beginning of this section.
                    1       a                    a
Then the function t+1 (1+νN   1/10t,w,b1 +· · ·+νN1/10t,w,bt ) works thanks to Proposition

C.2 and Theorem C.3.
   When verifying the linear forms condition, there is a “wraparound” issue aris-
ing from the somewhat artificial definition of ν| [± p2 ]n in Definition F.3 which goes
through the bijection Fnp ∼
                          = [±p/2]n. This can be handled by chopping the domain
of summation (which is the product of copies of [±p/2]n, p ≥ N0.52 ) into cuboids
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                          83


of side lengths ∈ [N1/2 , 2N1/2 ] and disregarding not nice cuboids as in [9, p. 527]
(their contribution is ≪t,d LN1/2 /p).                                             
C.1. Variant for the localization OK [S−1 ]. When we treat the localization OK [S−1 ]
in relation to the application for the Hasse principle in §13, we will want to have
a pseudorandom majorant for its von Mangoldt function ΛOK [S−1 ] . For this we
modify (C.1) by only considering ideals d coprime to S:
  νSa−1 ,R,w,b (x) :=
                                                                                   2
                                                                        
  |(OK [S−1 ]/(W))× | ress=1 (ζK (s)) log R 
                                               X                 log N(d) 
                                                                           
                     ·                     ·           µK (d)χ             .
    |OK [S−1 ]/(W)|            cχ                                  log R  
                                             d∈IdealsK                    
                                                          coprime to S
                                                         d|(Wx+b)a−1

Here it will be useful to know the following description of the coefficient:
                                                             
                        |(OK [S−1 ]/(W))× |               Y        ϕK (p) 
                                           =
                                            
                                                                           .
                          |OK [S−1 ]/(W)|                           N(p) 
                                                         p|W
                                                     coprime to S

   Proposition C.2 holds by exactly the same proof:
         |(OK [S−1 ]/(W))× | ′
                            ΛOK [S−1 ] (Wx + b) ≪K,χ 10t · νSa−1 ,N1/10t ,w,b (x).
           |OK [S−1 ]/(W)|
   To see that Theorem C.3 and its corollaries C.4 C.5 continue to hold for νSa−1 ,N1/10t ,R,w,b ,
one has to go through the proof of it in [20, §6]. Everything in loc. cit. works equally
just by focusing on ideals coprime to S. The error terms do not need modification
because there are less terms to deal with. We conclude:
Theorem C.6. Let s, N ≥ 1 be integers. Let Os,K (1) < w < (log N)0.5 be a positive
number and let b ∈ a be coprime to W = P(w) in a[S−1 ], i.e., b ∈      / pa for all p | W
that is coprime to S. Then there is a function νSa−1 ,N1/2s+5 ,w,b : a → R≥0 such that
                                                                         1
                           1 − νSa−1 ,N1/2s+5 ,w,b              ≪s,n,χ
                                                     Us+1 (B)            w
for any B ⊂ a that is the product of intervals of lengths ≥ N1/2 with respect to a
norm-length compatible basis a ∼
                               = Zn , and that we have a pointwise bound on [±N]na
              n−0.8
except for < N      points:
           |(OK [S−1 ]/(W))× | ′
                              ΛOK [S−1 ] (W(−) + b) ≪s,K,χ νSa−1 ,N1/2s+5 ,w,b .
             |OK [S−1 ]/(W)|
        Appendix D. Supplements from algebraic number theory
D.1. Mertens’ theorem.
Proposition D.1 (Mertens’ theorem for number fields; [25, Theorem 2]). For
positive numbers x > 0 we have:
               Y          1
                              −1
                     1−           = eγ · res (ζK (s)) · log x + OK (1).
                p
                         N(p)            s=1
               N(p)<x
84                                        WATARU KAI


Here, γ is Euler’s constant.
D.2. Sieve theory for ideals. In the proof of Proposition 5.2, we used part (1) of
the following lemma (for the usual context of integers Z). Part (2) was used when
we performed a Vaughan-type decomposition of the Cramér/Siegel models of ΛK
in Proposition 8.5.
             sq−free
   Let IdealsK       be the set of square-free elements (i.e., the products n = p1 · · · pr
of distinct prime ideals, r ≥ 0). Choose a total order “<” on the set of non-zero
prime ideals, compatible with the norm in the sense that
(D.1)                        p1 < p2 implies N(p1 ) ≤ N(p2 ).
For an ideal n and a real numbers z, let us write n < z (resp. n ≤ z, . . . ) to mean
N(n) < z (resp. N(n) ≤ z, . . . ). For z > 2, let P(z) be the ideal
                                             Y
                                    P(z) :=      p.
                                                   p<z

Lemma D.2 (Fundamental Lemma). Let z > 0, κ > 0 be real numbers and let
D ≥ z 9κ+1 .
                sq−free
  Let g : IdealsK       → [0, 1) ⊂ R be a multiplicative function. Assume that we
have a bound
                          Y                             κ
                                                   log z
(D.2)                          (1 − g(p))−1 ≤ M
                                                   log w
                            w≤p<z

for some constant M > 0 and all 2 ≤ w < z.
   Let (an )n∈IdealsK be a family of non-negative real numbers, zero except for finitely
many n, and X > 0 be a real number. For each ideal d ≤ D dividing P(z), let rd be
the remainder defined by the relation
                                  X
(D.3)                                   an = Xg(d) + rd .
                                n∈IdealsK
                                   d|n

Then:
                    P
   (1) Write S(z) := n∈IdealsK an 1n+P(z)=(1) . We have
                                                                                               
                                      !
                    Y                                 log D         X      
        S(z) = X           (1 − g(p)) (1 + O(M10 e9κ− log z )) + O 
                                                                      |rd |
                                                                            .
                   0<p<z                                                      1≤d≤D
                                                                              d|P(z)

     (2) There are functions (depending on D) λ± : IdealsK → {−1, 0, 1}; d 7→ λ±
                                                                               d
         satisfying:
            • λ±(1) = 1;
                +
            • λ is supported on IdealsK,≤D ;
            • for all n ∈ IdealsK , we have
                              X                  X
                                   λ−
                                    d ≤ 1n=(1) ≤   λ+
                                                    d;
                                d|n                      d|n
                      ±
                                P                  P            ±
            • Write S (z) :=        n∈IdealsK an    d|(n+P(z)) λd . We have
                                       log D             Y                     X
           S(z) − S± (z) < O(e9κ− log z M10 ) · X ·            (1 − g(p)) +            |rd |.
                                                         p<z                  d|P(z)
                                                                               d<D
            LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                   85


Proof. When K = Q, this is [18, pp. 153–159], notably (6.19), (6.20), Theorem 6.1,
Corollary 6.2 and Lemma 6.3 in loc. cit. (We are writing D for their y.) Consult
also [5, §§6.4–6.5] for clearer definitions and more careful proofs.
   One can check, slightly amuzingly, that the definitions and arguments in the
above continue to make sense and work for any free commutative monoid I gener-
ated by a countable set, equipped with:
      • a multiplicative function (the “norm”) N : I → N such that for every
         n ∈ N, the inverse image N−1 (n) ⊂ I is finite;
      • a total order on the set of irreducible elements (“prime ideals”) compatible
         with the norm in the sense of (D.1).
In particular they apply to I = IdealsK with the usual norm and the chosen
ordering.                                                                         
D.3. Hecke characters. We make a minimum recollection on the notion of Hecke
characters. See [19, §2.3] for references.                     Q
  Let IK be the group of idèles of K. For non-zero ideals q = p pnp ⊂ OK , denote
by C(q) the following quotient of IK :
                                                                
                                     M                        M
          C(q) := (K ⊗Q R)× ×          K× /(1 + pnp OK,p ) ×   Z /K× .
                                         p|q                          p∤q
                  ′          ′
An inclusion q ⊂ q , or q | q, induces a surjection C(q) ։ C(q′ ). When a non-zero
fractional ideal a is coprime to q, we have a well-defined class
                                          [a] ∈ C(q).
   A Hecke character of the number field K is a continuous homomorphism from
the group of idèles to the group of complex numbers of absolute value 1:
                          ψ : IK → S1 := {z ∈ C× | |z| = 1}.
The continuity implies that ψ factors through C(q) for some non-zero ideal q. In
this case ψ is called a mod q Hecke character. There is a maximum ideal q such
that this factorization happens; we call it the conductor of ψ.
   For a non-zero fractional ideal a, let us write
           (a/qa)× := {x ∈ a/qa | x generates a/qa as an OK -module},
               a×,q := a ×a/qa (a/qa)×
                      = {x ∈ a | x generates a/qa as an OK -module}.
There is a natural map of sets, which we also denote by incl:
                                     incl : (a/qa)× → C(q),
induced by the maps (a/qa)× → K× /(1 + pnp OK,p ) for p | q, and the constant maps
(a/qa)× → {vp (a)} ⊂ Z for p ∤ q. Let us write
                                 ×
                      ψ (a/qa) := ψ ◦ incl : (a/qa)× → C(q) → S1 .
   By the restriction ψ a : a → C of ψ to a we mean the zero-extension of the
following composite map to a:
                (incl,can)                              incl + incl         ψ
                                                          → S1 ⊂ C× .
      ψ a : a×,q −−−−−−→ (K ⊗Q R)× × (a/qa)× −−−−−−→ C(q) −
86                                         WATARU KAI


   Suppose that ψ has discrete image (as in the case of a Siegel character) and
that we are given a subset Ω ⊂ (K ⊗Q R)× of constant sign in the sense that for
each real embedding σ : K ֒→ R, the image σ(Ω) is contained in either R>0 or R<0 .
Then by continuity, the image ψ(incl(Ω)) ⊂ S1 consists of one point, which we write
ψ(ω) ∈ S1 for short. Then we have
                                            ×
                     ψ a (x) = ω · ψ (a/qa) (x)         for all x ∈ a×,q ∩ Ω,

and in particular the restriction of ψ a to a ∩ Ω factors through a/qa.


                     Appendix E. Lattice points in a subset
   The intuition that the number of lattice points in a subset of Rn should be well
approximated by its volume is deeply rooted in our genes. In this section we recall
a quantitative result to this effect.
   By convention, subsets of the Euclidean spaces Rn are given the usual l2 -metric
(also called the Euclidean metric) and its restriction in this section.
   A lattice Λ in Rn means a discrete subgroup isomorphic to Zn . Its determinant
det(Λ) is defined to be the volume of the compact quotient Rn /Λ. We write λ1 for
the smallest length of non-zero elements:
                               λ1 := min{|v| | v ∈ Λ \ {0}}.
The choice of notation is based on the fact that it is the first of the so-called
successive minima of Λ.
   The following proposition involves the notion of subsets of Lipschitz class Lip(n, Z, L).
We recall it in Definition E.2.
Proposition E.1. Let Λ ⊂ Rn be a lattice.
     (1) Let v1 , . . . , vn ∈ Λ be a basis. Write
                F = {a1 v1 + · · · + an vn | ai ∈ [0, 1)R for all 1 ≤ i ≤ n}
         for the associated fundamental domain. Let C ≥ 1 be a positive number
         such that
                             |vi | ≤ Cλ1        for all i = 1, . . . , n.

         Then for every subset S ⊂ Rn of Lipschitz class Lip(n, Z, L) with L ≥ λ1 ,
         we have
                                                       n−1
                                                   n2    L
                 #{v ∈ Λ | (v + F) ∩ S 6= ∅} ≪n ZC               .
                                                        λ1
     (2) Let Ω ⊂ Rn be a closed set whose boundary ∂Ω is of Lipschitz class Lip(n, Z, L)
         with L ≥ λ1 . Then we have
                                                     n−1
                                      Vol(Ω)          L
                        #(Ω ∩ Λ) −             ≪n Z
                                     | det(Λ)|       λ1
Proof. These are specialized forms of [32, Proposition 5.2 and Corollary 5.3].       

     Above we used the following notion.
              LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                                      87


Definition E.2 (subsets of certain Lipschitz classes). Let Z ≥ 1 be an integer and
L > 0 be a positive real number. A subset S ⊂ Rn is said to be of Lipschitz class
Lip(n, Z, L) if there are maps
                             ψi : [0, 1]n−1 → Rn ,           i = 1, . . . , Z
                                                                                                   SZ                 n−1
which have Lipschitz constant ≤ L and cover S in the sense that S ⊂                                  i=1 φi ([0, 1]         ).
   This is taken from [33, Definition 2.2]. The same notion is written as Lip(n, 1, Z, L)
in [32, Definition 2.1].
                                                         n
   Note that when we have finitely many sets Ωi ⊂     T R whose boundary ∂Ωi is of
             P Lip(n, Zi , Li ), then the intersection i Ωi has boundary of Lipschitz
Lipschitz class
class Lip(n, i Zi , maxi Li ) at worst.
   Convex sets in the cube [−N, N]n are known to have boundary of Lipschitz class
Lip(n, 1, On (N)) [33, Theorem 2.6]. Other than that, Proposition E.1 is used mainly
to subsets with the following type of boundary:
Lemma E.3 (The sets with constant norm are Lipschitz). Let N ≥ 2 be a positive
real number and set
                                   C≤N := {z ∈ C | |z| ≤ N}.
Let r1 , r2 ≥ 0 be integers and consider the norm function
                                            N : Rr 1 × Cr 2 → R
                                                                       r1
                                                                       Y          r2
                                                                                  Y
                  (x, z) = (x1 , . . . , xr1 ; z1 , . . . , zr2 ) 7→         xi         |zj |2 .
                                                                       i=1        j=1

Then for any a ∈ R the subset
                 S≤N (a) := {(x, z) ∈ [−N, N]r1 × Cr≤N
                                                     2
                                                       | N(x, z) = a}
is in Lipschitz class Lip(r1 + 2r2 , Or1 ,r2 (1), Or1 ,r2 (N)): in other words, there are
continuous maps φi (1 ≤ i ≤ Or1 ,r2 (1))
                                                      φi
                                  [0, 1]r1 +2r2 −1 −→ Rr1 × Cr2
with Lipschitz constants ≤ Or1 ,r2 (N) such that
                                      [
                          S≤N (a) ⊂      φi ([0, 1]r1 +2r2 −1 ).
                                               i
Proof. This is elementary but we include a proof for the sake of completeness. The
norm map N factors as
                                                                       N
                Rr 1 × Cr 2 →      Rr1 × Rr≥0      2
                                                           −→                 R
                     (x, z) 7→ (x; |z1 |, . . . , |zr2 |),
                                                                              Q
                                                                              r1          Q
                                                                                          r2
                                                (x, y)                 7→           xi         yj2
                                                                              i=1        j=1

and for any a ∈ R if we set
       S≤N (a) := {(x, y) ∈ [−N, N]r≤N
                                     1
                                       × [0, N]r2 | N(x, y) = a} ⊂ Rr1 × Rr≥0
                                                                            2
                                                                              ,
we can recover S≤N (a) by
  S≤N (a) =
   {(x; y1 e2πiθ1 , . . . , yr2 e2πiθr2 ) ∈ Rr1 × Cr2 | (x, y) ∈ S(a), (θj )1≤j≤r2 ∈ [0, 1]r2 }.
88                                       WATARU KAI


This reduces the problem to showing that S≤N (a) is of Lipschitz class Lip(r1 +
r2 , Or1 ,r2 (1), Or1 ,r2 (N)). While it is easy to construct an explicit covering with this
Lipschitz property, here we choose to describe a quick proof using the case of the
boundary of a convex set.
    By the symmetry ±xi one can restrict attention to S≤N (a) ∩ [0, N]r1 +r2 and
assume a ≥ 0. Since N is a convex function on [0, N]r1 +r2 , the set Ω≤N (a) := {x ∈
[0, N]r1 +r2 | N(x) ≥ a} is a convex set. As ∂Ω≤N (a) is known to be of Lipschitz class
Lip(r1 + r2 , 1, Or1 +r2 (N)) by [33, Theorem 2.6] and we have S≤N (a) ⊂ ∂Ω≤N (a), we
conclude that S≤N (a) is of the same Lipschitz class. This completes the proof. 
  The next proposition could also be formulated in the Lipschitz boundary setting,
but we do not need to do so.
Proposition E.4. Let Ω ⊂ [±N]nR be a convex set and M, Y > 1 be positive numbers.
Then
    (1) There is a decomposition of the indicator function 1Ω : [±N]n → C of Ω into
        a sum of the form
                                             
                                   X
(E.1)                      1Ω =       cξ · ξ  + G + H,
                                        ξ∈Ξ

         where
            • Ξ ⊂ Qn is a finite set of size On (Yn ), and each ξ = (ξ1 , . . . , ξn ) ∈ Qn is
              seen as a function on Zn by ξ(x1 , . . . , xn ) := exp(2πi(ξ1 x1 + · · · + ξn xn ));
            • |cξ | ≤ 1 for all ξ ∈ Ξ;
            • the values of G have absolute values ≤ 1 and # supp(G) = On (Nn /M);
            • kHk∞ = On (M logYY ).
     (2) Furthermore, suppose a lattice Λ ⊂ Zn and a residue class a ∈ Zn /Λ is
         given. Then the indicator function 1Ω∩(a+Λ) is written as a sum of the
         same form (E.1), where some of the conditions on Ξ, G and kHk∞ are
         relaxed to
            • #Ξ = On (Yn ) · #(Zn /Λ),
            • the values of G have absolute values
                                                        ≤ #(Zn /Λ),
            • kHk∞ = On M logYY · #(Zn /Λ) .

Proof. Part (1) follows from [10, Lemma A.9] and [15, Corollary A.3].
   For part (2), by Fourier analysis on the finite abelian group Zn /Λ, the indicator
function 1a+Λ : Zn → C can be written as a C-linear combination
                                          X
                               1a+Λ =           cη · η,
                                                \
                                              η∈Z n /Λ


      \
where Z n /Λ = Hom(Zn /Λ, C× ) ֒→ Hom(Zn , C× ) is the dual abelian group. To

conclude, multiply (E.1) by 1a+Λ .                                          

     Appendix F. The von Neumann theorem for the Gowers norms
   The (generalized) von Neumann theorem for the Gowers norms gives a criterion
                            P             Q
for when a sum of the form x∈[−N,N]n∩Ω ti=1 fi (φi (x)), where Ω ⊂ Rn is a convex
set, φi : Zd → Zn are affine-linear maps and fi : Zn → C are functions.
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                             89


   We state it (Theorem F.4) after explaining the complexity s ≥ 0 of the set of
linear maps φ̇1 , . . . , φ̇t and the linear forms condition on a function Zn → R≥0 .
   Our exposition is different from [15, Appendix C] in that we consider Zn instead
of Z, we make it explicit that the so-called correlation condition from loc. cit. is not
needed, and we write down an explicit bound because unlike [15], the decay rate
matters to us.
   We will use bold face letters such as x to denote tuples instead of underlined
ones x because after some experiments, the author thinks they are easier to read
in this section, where we use so many sub/superscripts.
F.1. Preliminary notions.
Definition F.1 (complexity of a set of linear maps). Let ψ1 , . . . , ψt : Zd → Zn
linear maps.
    (1) They are said to have (Cauchy–Schwarz)n               complexity
                                                                       o   ≤ s at the index i ∈
                                                                          Ss+1
        {1, . . . , t} if there is a partition 1, . . . , bi, . . . , t =
                                                                       k=1     Ck such that for
         all k ∈ {1, . . . , s + 1}, the restriction of ψi :
                                          \
                                     ψi :     ker(ψj ) → Zn
                                       j∈Ck

        has finite cokernel. (For this to hold, of course each ker(ψi ) must have rank
        ≥ n.)
    (2) They are said to have complexity ≤ s if they do at every index.
    (3) They are said to be in s-normal form at the index i if there are disjoint sets
        B1 , . . . , Bs+1 (or less members) of standard vectors of Zd such that
         (a) for all j 6= i, there is a 1 ≤ k ≤ s + 1 such that ψj is the zero map on
               ZBk ;
         (b) for all 1 ≤ k ≤ s + 1, the restriction of ψi :
                                       ψi : ZBk → Zn
              has finite cokernel.
  Note that if the maps {ψj }1≤j≤t are in s-normal form at i, then they have
                                                               n            o
Cauchy–Schwarz complexity ≤ s at i because we can take Ck := j ψj |ZBk = 0 .
  The next fact can be used to reduce problems involving linear maps of Cauchy–
Schwarz complexity ≤ s to the case of s-normal forms.
Proposition F.2. Let ψ1 , . . . , ψt : Zd → Zn be linear maps having Cauchy–Schwarz
complexity ≤ s at some index i ∈ {1, . . . , t}.
                                    ′
    Then there is a surjection Zd → Zd with d′ ≤ (s + 2)d such that the composites
        ′
ψi′ : Zd → Zd → Zn (i = 1, . . . , t) are in s-normal form at the index i.
    Moreover, if ψj ’s have coefficients of sizes ≤ L for some positive L, then ψj′ ’s
can be taken to have coefficients ≤ Od,n (LOn (1) ).
                                                     T
Proof. A standard algorithm gives us a basis of j∈Ck ker(ψj ) having coefficients
                                                          T
≤ Od,n (LOn (1) ). Let dk (≤ d) be its rank and Zdk −   → j∈Ck ker(ψj ) ⊂ Zd be the
                                                        ∼   =
corresponding map. Then the surjection
                                          s+1
                                          M
                                   Zd ⊕         Zdk −→ Zd
                                          k=1
90                                        WATARU KAI


satisfies the desired properties.                                                       

     Next we formulate the linear forms condition.
Definition F.3 (Linear forms condition). Let t, d, L, N be positive integers and
0 < ρ < 1 a positive real number.
   A function ν : Zn → R≥0 is said to satisfy the (t, d, L)-linear forms condition in
scale ≥ N and within error < ρ if the following is always true:
                           ′
   Let ψ1 , . . . , ψt : Zd → Zn (t′ ≤ t, d′ ≤ d) be linear maps such that:
      (1) their linear parts ψ̇i have coefficients of size ≤ L,
      (2) for every pair of distinct indices i 6= j, we have ker(ψ̇i ) 6⊂ ker(ψ̇j ),
      (3) coker(ψi ) are all finite.
Then for any prime number p ≥ N, we have
                             ′                     
                             Yt
                      1 − E  (ν| [± p ]d′ ◦ ψi,Fp ) < ρ.
                                     2
                                Fd
                                 p   i=1
                                                              ′
Here, ψi,Fp is the Fp -linear map ψi,Fp := ψi ⊗ Fp : Fdp → Fnp and ν| [± p2 ]n denotes
the composite
                                           ∼
                                             h p in
                                           =             ν
                         ν| [± p2 ]n : Fnp ←
                                           − ±      ⊂ Zn −
                                                         → R≥0 .
                                               2
F.2. The statement of the generalized von Neumann theorem. The next
is a direct generalization of [15, Proposition 7.1] to the case where the target is Zn
rather than Z. There, kψkN ≤ L means that the affine-linear map ψ : Zd → Zn has
linear coefficients of l∞ -norm ≤ L and constant term of l∞ -norm ≤ NL.
Theorem F.4. Let t, d, L, n > 0 be positive parameters. Then there exisits N0 =
Od,n (LOn (1) ) such that for all N > N0 , the following holds:
  Let ψ1 , . . . , ψt : Zd → Zn be affine-linear maps, kψi kN ≤ L, having Cauchy–
Schwarz complexity ≤ s. Let f1 , . . . , ft : Zn → C be functions satisfying:
      (1) kfi kUs+1 ([−(d+1)LN,(d+1)LN]n) ≤ δ for some i and positive δ > 0.
      (2) We have a pointwise bound |fi | ≤ ν on [±(d+1)LN]n for all i where ν : Zn →
          R≥0 is a function satisfying the (t2s+1 , 4(s+2)d, Od,n (LOn (1) ))-linear forms
          condition in scale ≥ N with error < ρ for some positive ρ.
Let Ω ⊂ [−N, N]d ⊂ Rd be a convex body.
   Then for any positive value M, X > 0 we have
              t
              Y                                                         
                                 d    d  1/2s+2   t 1/2s+1    1    log X
   E 1Ω     (fi ◦ ψi ) ≪d,n,s L X (δ + ρ        +2 ρ       )+   +M         .
 [−N,N]d
         i=1
                                                              M      X

   We will give an outline of the proof in the next subsection. It follows the strategy
below.
Strategy F.5. The proof will go through several reduction steps:
      (1) we go modulo p, where p is a prime number comparable in size to (d+ 1)LN;
          this step account for the factor Ld in the right hand side.
      (2) in order to dispose of the characteristic function 1Ω , we first replace it with
                                                                                   1
          functions with Lipschitz constants ≤ M. This account for the term M        .
            LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                       91


    (3) we write the Lipschitz function(s) as a Fourier series containing at most
        Od (Xd ) terms and an error term. The error term accounts for the term
        M logXX and the number of terms in the Fourier series accounts for the factor
        Xd .
    (4) the trigonometric functions in the Fourier series can be absorbed into the
        functions fi so that we can ignore them.                        Qt
    (5) we are reduced to the estimation of averages of the form EFdp i=1 fi ◦ ψi .
                                                s+2          s+1
        This will be bounded in size by δ + ρ1/2    + 2t ρ1/2 .

F.3. Proof of the von Neumann theorem. We first treat the mod p version of
Proposition F.4, where the convex set Ω is also omitted.

Proposition F.6. Let t, d, L, n > 0 positive parameters. Then there exists N0 =
Od,n (LOn (1)) such that for all N > N0 :
   Let ψ1 , . . . , ψt : Zd → Zn be affine-linear maps satisfying kψi k ≤ L and having
Cauchy–Schwarz complexity ≤ s for some integer s ≥ 0.
   Let p > N0 any prime number and f1 , . . . , ft : Fnp → C be functions whose ab-
solute values are pointwise bounded by a function ν that satisfies the (t2s+1 , 4(s +
2)d, Od,n(LOn (1) ))-linear forms condition in scale ≥ N0 and with error ≤ ρ for some
positive ρ.
   Also assume kfi kUs+1 (Fnp ) ≤ δ for some i and positive δ > 0.
   Then for any prime number p > N0 we have
                                t
                                Y                             s+2
                           E          (fi ◦ ψi ) ≤ 8(δ + ρ1/2       ).
                           Fd
                            p   i=1

Proof. By symmetry in the indices i = 1, . . . , t, we may assume kf1 kUs+1 (Fnp ) ≤ δ.
By Proposition F.2, we may assume ψi are in s-normal form at the index 1. Note
that because of this maneuver, every O(LO(1) )-type quantities appearing below
must be taken as an Od,n (−)On (1) of it for the validity of the proposition in the
general case. Also, the rank d gets replaced by at most (s + 2)d.
  Using the disjoint sets B1 , . . . , Bs+1 (or less members) from Definition F.1, write
                                                       s+1
                                                       M
                            Xk := ZBk and X :=               Xk .
                                                       k=1
                                                                         Ss+1
Also, let Y be the subspace spanned by those standard vectors not in       k=1 Bk . We
have a decomposition
                                 Zd = X1 ⊕ · · · ⊕ Xk ⊕ Y
and we know
    (1) for all j ∈ {2, . . . , t}, the map ψ̇j is zero on some Xk ;
    (2) for all 1 ≤ k ≤ s+ 1, the restriction ψ̇1 : Xk → Zn has finite cokernel (whose
        order is On (Ln ) by elementary Z-linear algebra).
Let us use the symbol xk to denote elements of Xk and y to denote elements of Y.
We denote elements of X = X1 ⊕ · · · ⊕ Xs+1 by the symbol x = (x1 , . . . , xs+1 ).
  Now we go modulo p. Denote by Xk , X and Y the Fp -vector spaces Xk ⊗Z Fp ,
X ⊗Z Fp and Y ⊗Z Fp . We can rewrite the average EFdp as a nested one Ey∈Y Ex∈X .
92                                            WATARU KAI


By the triangle inequality we have
                              t
                              Y                             t
                                                            Y
(F.1)                    E          fj ◦ ψj ≤ E         E        fj (ψj (x + y))
                         Fd
                          p                    y∈Y x∈X j=1
                              j=1

We apply the Cauchy–Schwarz–Gowers inequality [15, Corollary B.4] to the situa-
tion A = {1, . . . , s + 1}, X = X1 × · · · × Xs+1 and functions

        fj (ψj (− + y)) :       X1 × · · · × Xs+1        → C
                                 (x1 , . . . , xs+1 )   7→ fj (ψj (x1 + · · · + xs+1 + y)).

Note that as ψj (j 6= 1) is zero on some Xk , we know Ω(j) ( {1, . . . , s + 1} for
j 6= 1. Hence the previous value (F.1) is bounded as:
                                                 Y        2|B| /2s+1
(F.2)        ≤ E kf1 (ψ1 (− + y))kA (νA,y ,XA )   kνB,y k (ν ;X ) ,
                                                                                 B   B,y    B
                  y∈Y                                           B(A

where we have set
                                                                                       !!
                                                 Y                     X
                  νB,y (xk ; k ∈ B) :=                      ν   ψj           xk + y          .
                                            j s.t. Ω(j)=B              k∈B


The quantity (F.2) is the average of the product of 2s+1 functions. Recall Hölder’s
inequality: E XYZ ≤ (E Xp )1/p (E Yq )1/q (E Zr )1/r for positively valued functions
X, Y, Z and exponents p, q, r satisfying (1/p) + (1/q) + (1/r) = 1, and similarly
when there are more factors. By this we can bound (F.2) as
(F.3)
                                          !1/2s+1
                           2s+1                   Y            2|B|
                                                                              1/2s+1
  ≤     E kf1 (ψ1 (− + y))kA (νA,y ;XA )             E kνB,y kB (νB,y ;XB )
        y∈Y                                                           y∈Y
                                                            B(A

We treat the first factor and the latter ones seprately.

Lemma F.7. For all B ⊂ A we have
                                                                      !
                                                    2|B|
                                1−      E    kνB,y kB (νB,y ;XB )        < ρ.
                                       y∈Y

In particular, the latter factors of (F.3) are bounded as:
                                                 !1/2s+1
              Y                 2|B|
                                                                Y                    s+1
                    E    kνB,y kB (νB,y ;XB )              <         (1 + ρ)1/2           < 1 + ρ.
           B(A     y∈Y                                          B(A

Proof. By the definition of the box norm k−kB (νB,y ;XB ) and the function νB,y , we
have
(F.4)                                                                               
          2|B|                           Y          Y                 X      (ω )
 E kνB,y kB (νB,y ,XB ) = E    E                            ν ψj        xk k + y  .
y∈Y                            y∈Y x(1) ,x(2) j s.t. Ω(j)⊂B                                     k∈Ω(j)
                                   L                        ω∈{0,1}Ω(j)
                                  ∈ k∈B Xk
               LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                                   93


By some linear algebra, it turns out we can use the pseudorandomness of ν to the
                                                                     Ω(j)
linear maps (given for each pair of j ∈ {2, . . . , t} and ω ∈ {0, 1}     )

                                         L            2
           Ψj,ω :              Y⊕            k∈B Xk              →                 Zn
                                                                                                !
                                                                                P
                               (0)                (1)                                       (ω )
                           y, xk               , xk              7→ ψj      y+             xk k         .
                                         k∈B           k∈B                       k∈Ω(j)

                                           Pt
The number of linear maps listed here is j=2 2|Ω(j)| < t2s . They have coefficients
                             ′
≤ L. Via the surjection Zd ։ Zd at the beginning of the proof of Proposition F.6,
                                                                               ′    ′
this translates to coefficients ≤ Od,n (LOn (1) ). The source (a subspace of Zd ⊕ Zd )
has rank ≤ 2d′ ≤ 2(s + 2)d.
   We conclude that the difference between (F.4) and 1 is less than ρ. This com-
pletes the proof of Lemma F.7.                                                      


  By Lemma F.7, the second factor of (F.3) is < 1+ρ < 2. So far we have obtained:

                    t
                                                                                      !1/2s+1
                    Y                                                   2s+1
(F.5)          E          fj ◦ ψj < 2 ·         E kf1 (ψ1 (− + y))kA (νA,y ;XA )                   .
               Fd
                p                              y∈Y
                    j=1


We move on to the computation of the right hand side. By unfolding definitions we
see:



                                  2s+1
   E kf1 (ψ1 (− + y))kA (νA,y ;XA )
  y∈Y

                                                                      !                                                   
                           Y                          s+1
                                                      X                     Y         Y                         X
                                                            (ω )                                                     (ω )
= E        E                         C|ω| f1 (ψ1            xk k + y   )                         ν(ψj              xk k + y )
  y∈Y x(0) ,x(1)
                        ω∈{0,1}s+1                    k=1                   j6=1 ω∈{0,1}   Ω(j)             k∈Ω(j)
         ∈X


                                                         − x(0) to delete x(1) . We
We introduce a variable h = (h1 , . . . , hs+1 ) := x(1) P
                   (0)                                       (ωk )
write x afresh for
                Px     and replace the expressions         kx      by the expression
x + ω · h := x + k ω · hk . This gives us:


                                                                                                                        
                          Y                                            Y        Y
   = E E                           C|ω|
                                           f1 (ψ1 (x + ω · h + y)) ·                       ν(ψj (x + ω · h + y)) .
        y∈Y x,h               s+1
            ∈X       ω∈{0,1}                                           j6=1 ω∈{0,1} Ω(j)




Since ψj is affine-linear, we know

                        ψj (x + ω · h + y) = ψ̇j (x + y) + ψ̇j (ω · h) + ψj (0).
94                                                    WATARU KAI


Let us introduce new variables z := ψ̇1 (x + y) ∈ Fnp and k := ψ̇1 (h) ∈ Fnp . Denote
                                            ′
by φi (x)j the j th component of φi (x) ∈ Zd . This gives us:
                       
                                 Y
(F.6)     =       E n                      C|ω| f1 (z + ω · k + ψ1 (0))
              z,k∈Fp
                           ω∈{0,1}s+1
                                                                                                       
                                              Y         Y                                           
                       ·      E         E                        ν ψ̇j (x + y) + ψ̇j (ω · h) + ψj (0) 
                           (x,y)7→z h7→k
                                              j6=1 ω∈{0,1}Ω(j)


Where E(x,y)7→z means the average over all (x, y) that map to the given z. Similarly
for Eh7→k .
   Note that without the gigantic ν-factor, the expression (F.6) would be exactly
                      2s+1
Ey∈Y kf1 (− + ψ1 (0))kUs+1 (Fnp ) by the definition of the Gowers Us+1 -norm. Because
                                                                                                     2s+1
the Gowers Us+1 -norm is invariant under translation on Fnp , it equals Ey∈Y kf1 kUs+1 (Fnp ) =
        s+1
kf1 k2Us+1 (Fn ) . Thus we want to show that we can ignore the ν-factor in (F.6). We
             p
introduce a shorthand symbol:
                                Y     Y                                         
      W(z, k) := E          E                ν ψ̇j (x + y) + ψ̇j (ω · h) + ψj (0) .
                       (x,y)7→z h7→k
                                            j6=1 ω∈{0,1}Ω(j)

  By (F.6) we have the next equality. We want to show that this value is sufficiently
small:
               2s+1                                            2s+1
(F.7)     kf1 kUs+1 (Fnp ) − E kf1 (ψ1 (− + y))kA (νA,y ;XA )
                                  y∈Y
                                                                                                    
                                              Y
                      =      E                         C|ω| f1 (z + ω · k + ψ1 (0)) · (1 − W(z, k)) .
                           z,k∈Fn
                                p                 s+1
                                        ω∈{0,1}

By the triangle inequality, its absolute value is bounded as:
                                                                       
                          Y
(F.8)      ≤ E                   ν (z + ω · k + ψ1 (0)) · |1 − W(z, k)| .
                   n
                  z,k∈Fp
                                 ω∈{0,1}s+1

We use the Cauchy–Schwarz inequality in the following form: for non-negatively
valued functions X, Y , we have | E XY| ≤ (E X)1/2 (E X|Y|2 )1/2 . The absolute value
of (F.8) is bounded as:
                                                                 1/2
                           Y
(F.9)     ≤E                         ν (z + ω · k + ψ1 (0))
                z,k
                      ω∈{0,1}s+1
                                                                                                1/2
                                               Y
                               ·E                       ν (z + ω · k + ψ1 (0)) · |1 − W(z, k)|2        .
                                      z,k          s+1
                                            ω∈{0,1}

By expanding |1 − W(z, k)|2 , we are reduced to showing the next estimate.
                 LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                         95


Lemma F.8. For a = 0, 1, 2, we have
                                                             
                    Y
         1 − E             ν (z + ω · k + ψ1 (0)) · W(z, k)a  < ρ.
                              ω∈{0,1}s+1

   Admitting Lemma F.8 for a while, we obtain
                         (L.H.S. of (F.9)) < (1 + ρ)1/2 (4ρ)1/2 < 3ρ1/2 .
This establishes a bound on the right-hand side of (F.7). We conclude
                                               2s+1                     2s+1                1/2
                  E kf1 (ψ1 (− + y))kA (νA,y ;XA ) = kf1 kUs+1 (Fnp ) + O1 (ρ                    )
                 y∈Y

(with the implied constant in O1 being ≤ 3). By (F.5) we will conclude
         t
         Y                         s+1
                                                      1/2s+1       s+1        1/2s+1
    E          fj ◦ ψj < 2 · kf1 k2Us+1 (Fn ) + 3ρ1/2         < 4 · δ2   + ρ1/2         .
                                                 p
    Fd
     p   j=1

           s+1
Either δ 2       ≤ ρ1/2 or the other way around, this is bounded as:
                                s+1       s+1                     s+1                 s+2
                       ≤ 4(2δ 2       )1/2      + 4(2ρ1/2 )1/2          ≤ 8δ + 8ρ1/2        .
This shows the assertion of Proposition F.6. In the above argument, we had to
assume p exceeds finitely many quantities of the form Od,n (LOn (1) ). Let N0 be the
maximum of them.
   This completes the proof of Proposition F.6 except that we have assumed Lemma
F.8.                                                                              

  The proof of Proposition F.6 above depended on Lemma F.8, which we now
prove:

Proof of Lemma F.8. Our task is to show that the next value (a = 0, 1, 2) is close
to 1:
                                                              
                      Y
(F.10)         E            ν (z + ω · k + ψ1 (0)) · W(z, k)a  .
                       z,k
                              ω∈{0,1}s+1

Recall by definition
                                         Y           Y                                     
           W(z, k) = E             E                        ν ψ̇j (v) + ψ̇j (ω · h) + ψj (0) .
                             v7→z h7→k
                                         j6=1 ω∈{0,1}Ω(j)

Let us consider the hardest case a = 2. By expanding W(z, k)2 we get
                          Y       Y                                    
  W(z, k)2 = E        E                 ν ψ̇j (v) + ψ̇j (ω · h) + ψj (0) ·
                     v7→z h,h7
                   v,e      e →k
                                      j6=1 ω∈{0,1}Ω(j)
                                                                                                       
                                                                        ν ψ̇j (e              e + ψj (0)
                                                                               v ) + ψ̇j (ω · h)

Substituting this in (F.10) we end up with an expression of the form
                                     Y
                              E              ν(φ(v))
                                         v∈V
                                               φ: finitely many
96                                      WATARU KAI


where the average is over the vector space
               V :=(Fdp × Fdp ) ⊕ (X × X)
                        Fn
                         p            Fn
                                       p
                   n                                                      o
                  = (v, v     e | ψ̇1 (v) = ψ̇1 (e
                        e; h, h)                                        e ,
                                                 v ) and ψ̇1 (h) = ψ̇1 (h)
and φ runs through the following set of affine-linear maps
                          s+1
  (I) for each ω ∈ {0, 1} ,
                                   e 7→ ψ̇1 (v) + ψ̇1 (ω · h) + ψ1 (0)
                             e; h, h)
                  ψ1,ω : (v, v
       (which equals ψ̇1 (e              e + ψ1 (0));
                          v ) + ψ̇1 (ω · h)
                                                              Ω(j)
  (II) for each pair j, ω of j ∈ {2, . . . , t} and ω ∈ {0, 1}     ,
                                     e 7→ ψ̇j (v) + ψ̇j (ω · h) + ψj (0);
                               e; h, h)
                    ψj,ω : (v, v
                                                               Ω(j)
                     j, ω of e
 (III) for each pair e                              e ∈ {0, 1}
                             j ∈ {2, . . . , t} and ω                 ,
                   ψeej,eω : (v, v     e 7→ ψ̇j (e
                                 e; h, h)                       e + ψj (0).
                                                 v ) + ψ̇j (ω · h)
                                                         P
(The number of affine-linear maps is 2s+1 + 2 tj=2 2|Ω(j)| ≤ t2s+1 . They have
                                               ′
coefficients ≤ L. Via the surjection Zd ։ Zd at the beginning of the proof of
Proposition F.6, this means coefficients ≤ Od,n (LOn (1) ). The dimension of the
source is ≤ 4d′ ≤ 4(s + 2)d.)
   In order to be able to use the (t2s+1 , 4(s + 2)d, Od,n (LOn (1) ))-linear forms con-
dition assumed for ν, we want to show that the linear parts of the Z-coefficient
versions of the above maps:
    (1) have finite cokernels, and
    (2) the kernels do not contain each other.
We omit the tedious but elementary verification of these facts. The procedure is
more complicated but similar to [15, pp. 1826–27].11 This completes the proof of
Lemma F.8 and therefore Proposition F.6.                                              
   Now we want to upgrade Proposition F.6 by adding a Lipschitz function into the
picture. Embed the abelian group Fp into R/Z by
                                         
                      Fp = Z/pZ ∼  =      1
                                          p Z /Z ֒→ R/Z
                      x mod pZ ↔ xp mod Z
and regard a function on (R/Z)d as a function on Fdp through this embedding.
   Equip (R/Z)d with the l∞ -metric, where the metric on R/Z is induced from the
standard one on R through the quotient map R → R/Z. This allows us to talk
about Lipschitz constants of functions on (R/Z)d .
Proposition F.9. Let t, d, L, n > 0 be positive integers. Let N0 = Od,n (LOn (1) ) be
as in Proposition F.6.
   Let M, X > 0 be further positive parameters. Let F : (R/Z)d → C be a 1-bounded
Lipschitz function with Lipschitz constant ≤ M.
   Let ψ1 , . . . , ψt : Zd → Zn be affine-linear maps with ψ̇i ≤ L such that

   11Note that in loc. cit. they make an oversimpliﬁcation after the sentence “C is empty” at
2/3 of p. 1826 based on the false premise {0, 1}∅ = ∅, but luckily the case of the only element
ω∅ ∈ {0, 1}∅ can also be worked out.
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                  97


     (1) coker(ψi ) are all finite;
     (2) Cauchy–Schwarz complexity ≤ s.
Let p > N0 be a prime number and f1 , . . . , ft : Fnp → C be functions whose ab-
solute values are pointwise bounded by a function ν satisfying the (t2s+1 , 4(s +
2)d, Od,n(LOn (1) ))-linear forms condition in scale ≥ N0 with error ≤ ρ. Assume
kfi kUs+1 (Fnp ) ≤ δ for some index i and δ > 0.
   Then we have
                       Yt                               s+2
                                                                  log X
                 EF·       fi ◦ (ψi ⊗ Fp ) ≪d Xd δ + ρ1/2      +M·       .
                  d
                 Fp
                       i=1
                                                                     X

   For the proof we need some input from Fourier analysis. For a “frequency”
                                     d      !
                                 1
                     ξ ∈ Hom       Z/Z , R/Z = (Z/pZ)d ,
                                 p
denote by eξ the function
                                eξ : (R/Z)d → C
                                          x 7→ e2πi ξ(x) .
The elementary Fourier analysis says that the functions eξ form a C-basis of the
vector space Map(Fdp , C). In general, the expression of a function Fdp → C as a
linear combination of eξ ’s can contain at most pd terms. The next assertion offers a
way to approximate a given Lipschitz function by a linear combination containing
less terms.
Proposition F.10 (see [10, Lemma A.9]). Let M, X > 0 be arbitrary positive num-
                  d
bers. If F : (R/Z) → C is a 1-bounded Lipschitz function with Lipschitz constant
≤ M, then there is a decomposition
                                       X
                              F| Fdp =   cξ eξ + H,
                                           ξ∈I

where I ⊂ (Z/pZ)d is a subset of size Od (Xd ), the coefficients
                                                               satisfy |cξ | ≤ 1, and
H : Fdp → C is a function that satisfies kHk∞ ≤ Od M · logXX .

Proof of Proposition F.9. By Proposition F.10, we have
                      t
                      Y                         X             t
                                                              Y
(F.11)          EF·         fi ◦ (ψi ⊗ Fp ) ≤          E eξ         fi ◦ (ψi ⊗ Fp )
                Fd
                 p                                     Fd
                                                        p
                      i=1                       ξ∈I           i=1
                                                              t
                                                              Y
                                                + EH·               fi ◦ (ψi ⊗ Fp ) .
                                                      Fd
                                                       p      i=1

The second term in the right-hand side can be bounded as
                  Yt                                     Yt
                                                log X
           E  H ·     f i ◦ (ψi ⊗ F p ) ≤O d  M         E      ν ◦ (ψi ⊗ Fp )
          Fdp     i=1
                                                  X     Fd
                                                         p i=1

                                           Qt
and by Proposition F.6 we know EFdp             i=1 ν ◦ (ψi ⊗ Fp )        = O1 (1) (note that the
                                                                            s+2
linear forms condition implies kνkUs+1 (Fn ) = (1 + O1 (ρ))1/2                    = O1 (1)). So the
                                                p
98                                               WATARU KAI

                                                                                      
second term in the right-hand side of (F.11) can be absorbed in the Od M logXX
term of the conclusioin of Proposition F.9.
    Next, we show that the first term in the right-hand side of (F.11) is an Od (Xd )(δ+
  1/2s+2
ρ        ). There are two cases to consider depending on the nature of ξ. To formulate
                                                  d
them, note that the homomorphism ξ : p1 Z/Z → R/Z can be regarded as an
Fp -linear map ξ : Fdp → Fp via the isomorhpism p1 Z/Z ∼  = Fp .
                   Tt
Case 1. ker(ξ) 6⊇ i=1 ker(ψ̇i ).
                                               Tt
    Take a 1-dimensional Fp -subspace ℓ ⊂ i=1 ker(ψ̇i ) not containedd in ker(ξ).
Take a direct sum decomposition Fdp = ℓ ⊕ V. By writing the average EFdp as the
successive average over v ∈ V and w ∈ ℓ, we have
                t
                                 !                         t
                                                                                !
               Y                                          Y
        E eξ      fi ◦ (ψi ⊗ Fp ) = E        E eξ (v + w)     fi (ψi,Fp (v + w))
        Fd
         p
                                                 v∈V      w∈ℓ
                  i=1                                                       i=1
                                            = E 0 = 0.
                                                 v∈V
                        Tt
Case 2. ker(ξ) ⊇ i=1 ker(ψ̇i ).
  Note the following elementary fact.
                                                                                        Tt
Claim F.11. Under the assumption of Case 2 (that ker(ξ) ⊇                                  i=1 ker(ψ̇i )), there
                                           Pt
are linear maps ηi : Fnp → Fp such that ξ = i=1 ηi ◦ ψ̇i .
Proof. Let prj : Fnp → Fp be the j th projection. The assumption is equivalent to
the membership relation ξ ∈ hprj ◦ψ̇i ii,j where the right-hand side is the Fp -span in
                                                              P
the dual space (Fnp )∗ . So there are ai,j ∈ Fp such that ξ = i,j ai,j prj ◦ψ̇i . Then
     P
ηi := j ai,j prj give desired maps, completing the proof of Claim F.11.              
     Using Claim F.11, consider the functions fi′ : Fnp → C defined by
                                 fi′ (y) = fi (y) · exp (2πi ηi (y)/p) .
For every x ∈ Fdp we have
                  t                        t
                                                       !                 t
                                                                                       !
                  Y                        Y                         2πi X
                        fi′ (ψi (x)) =           fi (x)     · exp           ηi (ψi (x)) .
                  i=1                      i=1
                                                                      p i=1
By the choice of ηi , we have
              t
              X                      t
                                     X                                            t
                                                                                  X
                    ηi (ψi (x)) =          ηi (ψ̇i (x) + ψi (0)) = ξ(x) +               ηi (ψi (0)),
              i=1                    i=1                                          i=1
the second term of which is a constant independent of x. Therefore we have (with
c a complex number of absolute value 1):
                             t
                             Y                      t
                                                    Y
                                   fi′ (ψi (x)) =          fi (ψi (x)) · eξ (x) · c.
                             i=1                    i=1
We apply Proposition F.6 to the functions fi′ , which have the same Gowers norms
as fi by [15, (B.11) in Appendix B]. We conclude
                    t
                    Y                                t
                                                     Y                                          s+2
             E eξ         fi ◦ (ψi ⊗ Fp ) = E              fi′ ◦ (ψi ⊗ Fp ) ≪1 (δ + ρ1/2               ).
             Fd
              p                                   Fd
                                                   p i=1
                    i=1
                  LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                           99

                                                                        Qt
     By Cases 1 and 2, for every ξ we obtain EFdp eξ                      i=1 fi ◦ (ψi ⊗ Fp )         = O1 (δ +
      s+2
ρ1/2        ). Noting |I| = Od (Xd ), it follows that
                       X            t
                                    Y                                                   s+2
                             E eξ         fi ◦ (ψi ⊗ Fp ) = Od (Xd )(δ + ρ1/2                 ),
                             Fd
                              p
                       ξ∈I          i=1

completing the proof of Proposition F.9.                                                                       

  Now we consider the situation where the sum is taken over a given convex body
Ω ⊂ (R/Z)d . As always, we embed Fdp ֒→ (R/Z)d .

Proposition F.12. Let t, d, L, n > 0 be positive integers. Let N0 = Od,n (LOn (1) )
be as in Proposition F.9 (which uses the one from Proposition F.6).
   Let Ω ⊂ [−1/3, 1/3]d be a convex body which we regard as a subset of (R/Z)d .
Let 1Ω : (R/Z)d → {0, 1} be its indicator function.
     Let ψ1 , . . . , ψt : Zd → Zn be affine-linear maps with ψ̇i ≤ L such that
      (1) coker(ψi ) are all finite;
      (2) Cauchy–Schwarz complexity ≤ s.
Let p > N0 be a prime number and f1 , . . . , ft : Fnp → C be functions whose ab-
solute values are pointwise bounded by a function ν satisfying the (t2s+1 , 4(s +
2)d, Od,n(LOn (1) ))-linear forms condition in scale ≥ N0 with error ≤ ρ. Also, as-
sume kfi kUs+1 (Fn ) ≤ δ for some index i and δ > 0.
                 p
   Then, for any positive numbers M, X > 0, we have
               t
               Y                                           s+2                    s+1              log X  1
     E 1Ω ·         fi ◦ (ψi ⊗ Fp ) ≪d Xd (δ + ρ1/2              ) + 2t Xd ρ1/2         + 2t M           + .
     Fd
      p       i=1
                                                                                                     X    M

Proof. There is a decomposition
                                                1Ω = FM + GM
where FM , GM are 1-bounded functions such that FM is Lipschitz with Lipschitz
constant ≤ M and |GM | is dominated by a non-negatively valued Lipschitz func-
tion G′M with Lipschitz constant ≤ M and having support ⊂ (R/Z)d of volume
Od (1/M). (For example, writing d for the metric on (R/Z)d , we can take FM (x) :=
min {0, 1 − M · d(Ω, x)}, GM := 1Ω − FM and G′M (x) := min {0, 1 − M · d(∂Ω, x)}
as in [15, p. 1820].)
   By the triangle inequality, we have
(F.12)
        Yt                           t
                                     Y                          Yt
 E 1Ω ·     fi ◦ (ψi ⊗ Fp ) ≤ E FM ·   fi ◦ (ψi ⊗ Fp ) + E GM ·    fi ◦ (ψi ⊗ Fp ) .
Fd
 p                                        Fd
                                           p                                 Fd
                                                                              p
            i=1                                  i=1                                      i=1
                                                                          s+1
                                                                               
By Proposition F.9, the first term in the right-hand side is ≪d Xd δ + ρ1/2      +
M logXX .
   The second term in the right-hand side is bounded as:
                                                   t
                                                   Y
(F.13)                               ≤ E G′M ·           ν ◦ (ψi ⊗ Fp ) .
                                           Fd
                                            p      i=1
100                                                    WATARU KAI


Write ν as the sum ν = 1 + (ν − 1). The product in (F.13) expands into the sum
of 2t terms. If gi denotes either 1 or ν − 1, they are of the following form:
                                                       t
                                                       Y
                                                   ′
                                              E GM ·         gi ◦ (ψi ⊗ Fp ) .
                                              Fd
                                               p       i=1
                                                                                                         s+1
                                                                                                               ρ 1/2s+1
By the linear forms condition satisfied by ν, we know kν − 1kUs+1 (Fn ) ≤ (22                                   )         =
                                                                                                p
  1/2s+1                                                                                 t
2ρ     . Therefore except the case gi = 1 for all i (there are 2 −1 such possibilities),
we have by Proposition F.9
                                    t
                                    Y
                             ′                                                  s+1        log X
                        E GM ·            gi ◦ (ψi ⊗ Fp ) ≪d Xd ρ1/2                  +M         .
                        Fd
                         p          i=1
                                                                                             X

When gi = 1 for all i, we have

                                          ′                       ′
                                    E GM ≤ vol(Supp GM ) = Od (1/M)
                                   Fd
                                    p


by the assumption on the support of G′M . It follows that we have
                             t
                             Y
                    ′                                                     s+1            log X  1
                 E GM ·            ν ◦ (ψi ⊗ Fp ) ≪d 2t Xd ρ1/2                 + 2t M         + .
                 Fd
                  p          i=1
                                                                                           X    M

  Combining the bounds that we have obtained for the right-hand side of (F.12),
we conclude
               t
               Y                                                 s+2                   s+1            log X  1
      E 1Ω ·         fi ◦ (ψi ⊗ Fp ) ≪d Xd (δ + ρ1/2                   ) + 2t Xd ρ1/2        + 2t M         + .
      Fd
       p       i=1
                                                                                                        X    M

This completes the proof of Proposition F.12.                                                                       

Remark F.13. Assume, more weakly than convexity, that Ω ⊂ [−1/3, 1/3]d regarded
as a subset of Rd has boundary of Lipschitz class Lip(d, Z, L) for some Z, L ≥ 1.
(See Definition E.2 for this condition.) Then the conclusion of Proposition F.12
stays valid if we replace the term 1/M by ZLd−1 /M. This is because the bound
Vol(Supp(G′M )) ≪d 1/M gets replaced by ≪d ZLd−1 /M as any set of Lipschitz class
Lip(d, Z, L) has 1/M-neighborhood of volume ≪d εZLd−1 /M.
   We are now ready to prove our main result of this section. For the convenience
of reference, let us reproduce verbatim the generalized von Neumann theorem that
we want to prove:
Theorem F.4 (reproduced). Let t, d, L, n > 0 be positive parameters. Then there
exisits N0 = Od,n (LOn (1) ) such that for all N > N0 , the following holds:
   Let ψ1 , . . . , ψt : Zd → Zn be affine-linear maps, kψi kN ≤ L, having Cauchy–
Schwarz complexity ≤ s. Let f1 , . . . , ft : Zn → C be functions satisfying:
      (1) kfi kUs+1 ([−(d+1)LN,(d+1)LN]n) ≤ δ for some i and positive δ > 0.
      (2) We have a pointwise bound |fi | ≤ ν on [±(d+1)LN]n for all i where ν : Zn →
          R≥0 is a function satisfying the (t2s+1 , 4(s+2)d, Od,n (LOn (1) ))-linear forms
          condition in scale ≥ N with error < ρ for some positive ρ.
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                  101


Let Ω ⊂ [−N, N]d ⊂ Rd be a convex body.
   Then for any positive value M, X > 0 we have
            t
            Y                                                           
                                 d       1/2s+2
                                           d      t 1/2s+1    1    log X
   E 1Ω     (fi ◦ ψi ) ≪d,n,s L X (δ + ρ        +2 ρ       )+   +M         .
 [−N,N]d
         i=1
                                                              M      X

Proof of Theorem F.4. By the assumption kψi kN ≤ L, we have
                                    ψi ([±N]d ) ⊂ [±(d + 1)LN]n .
Let p be a prime number satisfying 2(d + 1)LN ≤ p ≤ 4(d + 1)LN, which exists by
Bertrand’s postulate (Chebyshev’s theorem).
   Let ι : [±(d + 1)LN]n ֒→ Fnp be the restriction of the mod p map Zn → Fnp
and ι! fi : Fnp → C be the zero-extention of the map fi| [±(d+1)LN]n . Namely, on the
image of ι, the map ι! fi carries the point ι(x) to fi (x), and takes the value 0 outside
ι([±(d + 1)LN]n ). By [15, Lemma B.5], we have
(F.14)                kι! fi kUs+1 (Fn ) = Os,n (1) kfi kUs+1 ([±(d+1)LN]n ) .
                                      p


As [±N]d ֒→ Fdp is also an injection, we can regard Ω ∩ Zd as a subset of Fdp . Let us
write Ω ∩ Fdp when it is convenient to distinguish. By the commutative diagram
                                                    ψi
                    Ω ∩ Zd      ⊂     [±N]
                                         _
                                            d           / [±(d + 1)LN]n
                                                                    _ ❑
                                                                        ❑❑
                                                                          ❑❑fi
                         k                                          ι         ❑❑
                                                                                 ❑❑
                                                   ψi ⊗Fp                ι! fi
                                                                                   ❑❑
                                                                                      %
                    Ω ∩ Fdp     ⊂         Fdp                  / Fnp                 / C,

we can rewrite the average in question in the following way.
                         t
                         Y                               XYt
                                                   1
(F.15)      E       1Ω       (fi ◦ ψi ) =                     fi (ψi (x))
          [−N,N]d
                         i=1
                                               (2N + 1)d  i=1
                                                            x∈Ω
                                                         XYt
                                                   1
                                          =                   ι! fi (ψi ⊗ Fp (x))
                                               (2N + 1)d  i=1
                                                            x∈Ω
                                                    d                Yt
                                                  p
                                          =              E   1 Ω∩F d     (ι! fi ) ◦ (ψi ⊗ Fp )
                                               (2N + 1)d Fdp       p
                                                                     i=1
                                                             t
                                                             Y
                                       ≪d Ld E 1Ω∩Fdp          (ι! fi ) ◦ (ψi ⊗ Fp ) ,
                                                   Fd
                                                    p        i=1

where the last inequality follows from the assumption p ≤ 4(d + 1)LN. Let δFp :=
max1≤i≤t kι! fi kUs+1 (Fnp ) . The right-most term in (F.15) can be bounded thanks to
Proposition F.12:
                                                                      
                        d          1/2s+2   t 1/2s+1    1     t  log X
              ≪d X (δFp + ρ               +2 ρ       )+    +2 M          .
                                                        M          X
By (F.14), we have δFp ≪n,s δ. This gives us a further bound
                                                                 
                               s+2          s+1    1        log X
             ≪n,s Xd (δ + ρ1/2     + 2t ρ1/2 ) +     + 2t M         ,
                                                   M          X
completing the proof of Theorem F.4.                                                              
102                                          WATARU KAI


Remark F.14. If we assume, more weakly than convexity, that Ω ⊂ [−N, N]d has
boundary of Lipschitz class Lip(d, Z, LN) for some Z, L ≥ 1, then the conclusion
of Theorem F.4 stays valid if we replace the term 1/M by ZLd−1 /M. See Remark
F.13.

  Appendix G. Verification of the localized variant of main results
   In this appendix we supply a proof of Theorem 13.1, which is about simultaneous
prime values in OK [S−1 ].
P The idea the following: suppose for example that we want to estimate the sum
  n∈[1,N] ΛZ[1/6] (n), where ΛZ[1/6] is a variant of the von Mangoldt function which
assigns to n the value log p if n = 2a 3b pk for some a, b ≥ 0, k ≥ 1 and prime p 6= 2, 3,
and 0 otherwise. We can morally estimate the sum as follows, where in practice
the sum in a, b ≥ 0 should be truncated at some large enough threshold:
                                                                       
                X                        X               X                             
(G.1)                   ΛZ[1/6] (n) =                                 ΛZ[1/6] (2a 3b n)
                                                                                       
              n∈[1,N]                    a,b≥0       n∈[1,2−a 3−b N]
                                                      coprime to 6
                                                                           
                                         X                X
                                     ;                                Λ(n) ,
                                         a,b≥0       n∈[1,2−a 3−b N]

then we apply Prime Number Theorem:
                       X
                     ;     2−a 3−b N
                             a,b≥0
                                 X           X                      3
                            =N         2−a         3−b = N · 2 ·      = 3N.
                                                                    2
                                 a≥0         b≥0
                        P
In general one finds n∈[1,N] ΛZ[1/f ] (n) ; (f /ϕ(f )) · N.
            Parguments
   Our actual    Qt     are more involved because we want to estimate the sum
of products x i=1 ΛaOK [S−1 ] (ψi (x)) and so we go though the W-tricked Gowers
norm estimate.

G.1. Preliminary discussions. Under the setting of Theorem 13.1,S let a0 ⊂
                                                                          t
a[S−1 ] be the (finitely generated) OK -submodule generated by the subset i=1 ψi (Zd ).
By condition (13.1) we know a0 [S−1 ] = a[S−1 ]. As the statement of Theorem 13.1
only depends on a[S−1 ], we may assume that a0 = a, in particular the maps ψi land
in a ⊂ a[S−1 ]. By the torsion cokernel assumptions, the set of maps
                                 ψi : Zd → a          (i = 1, . . . , t)
has finite complexity (say s ≥ 1) in the sense of Appendix F.
    We want to repeat the arguments of §12 for the function ΛaOK [S−1 ] in place of ΛaK .
When actuating the W-trick, we continue to use the values w = (log log N)1/3 and
W := P(w).
    A pseudorandom majorant for the W-tricked ΛaOK [S−1 ] can be constructed paral-
lelly to the one for ΛaK . See Theorem C.6.
    We want to establish:
             LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                103


Proposition G.1. Assume that N ≫s,K,S 1 is large enough that w is larger than
all the residue characteristics of the primes p ∈ S. For every b ∈ [0, W−1]na coprime
to W in a[S−1 ], we have
           1        ϕK (W) a
                  −       ΛOK [S−1 ]                         ≪s,K,S (log log N)−1/Os,n (1) .
     res (ζK (s))    Wn                         [±N]n
     s=1                               Us+1 (a∩     a −b )
                                                   W

  Its proof will be completed at the end of §G.4. It turns out to be convenient to
make use of a Cramér model, which we define in the next subsection.

G.2. The Cramér      model in the localized setting. Let us continue to use the
                  √                         Q
quantities Q = e log N/Os (1) ∈ R and P(Q) = p<Q p ∈ N, which vary with N > 1.
We may assume that N ≫S 1 is large enough that Q is larger than all the residue
characteristics of the primes p ∈ S.
Definition G.2. Let ΛOK [S−1 ],Q : IdealsOK [S−1 ] ∪{(0)} → R≥0 be the Q-Cramér
model of the von Mangoldt function defined by
                       n
                 P(Q) ·         1
                                         if a + (P(Q)) = (1) in OK [S−1 ],
                  ϕK (P(Q)) res (ζK (s))
           a 7→             s=1
                0                       if not.
For a non-zero fractional ideal a of OK , define ΛaOK [S−1 ]
   We are not using the decoration “Cramér” anymore because we will not introduce
other models.
   Our trick, as we saw in (G.1), is to deduce everything from the case of OK using
the following sum description. Note that for our purposes, we may replace the von
Mangoldt function ΛaOK [S−1 ] by the function Λ′a  OK [S−1 ] which is defined using the
modification Λ′OK [S−1 ] of ΛOK [S−1 ] where we set the values at higher prime powers
pk (k ≥ 2) to be zero because the contribution of such prime ideals is negligible.
   For q ∈ IdealsK , let us say it is supported in S and write
                                         |q| ⊂ S
when all the prime divisors of a are in S. We say q is coprime to S if no prime
divisor of q is in S.
Lemma G.3. For all non-zero fractional ideal a over OK , the following equality of
functions on a holds:
                                      X
(G.2)                 ΛaOK [S−1 ],Q =      1qa Λqa
                                                Cramér,Q .
                                        q∈IdealsK
                                          |p|⊂S

Also, except at points x ∈ a such that the ideal xa−1 ⊂ OK is supported on S, the
following holds:
                                         X
(G.3)                      Λ′a
                             OK [S−1 ] =        1qa Λ′qa
                                                     K .
                                          q∈IdealsK
                                            |p|⊂S

There are only ≪K (log N)|S|+n such exceptional points in a cube [±N]na with respect
to a norm-length compatible basis, and the difference of both sides at such points
are ≪K,S 1.
104                                 WATARU KAI


   Furthermore, there is a constant CK depending only on K such that on the cube
[±N]na in a (with respect to any norm-length compatiblePbasis), the values of the
right-hand sides do not change if we restrict the sum    q to those q satisfying
N(q) ≤ CK Nn .
Proof. For x ∈ a, For the Cramér model, the value of both sides of (G.2) are non-
zero precisely when the ideal xa−1 + P(Q) of OK is supported on S and the non-zero
                       n
values are both ϕKP(Q)
                    (P(Q)) .
   For the equality (G.3), the value Λ′a OK [S−1 ] (x) at x ∈ a is non-zero precisely
when xa−1 has the form qp where q is an ideal of OK satisfying |q| ⊂ S and p
is a prime ideal away from S. When this is the case, the value of 1qa Λqa  K at x is
non-zero precisely for this q and the non-zero values of both sides coincide and
equal log N(p). The right-hand side is non-zero precisely when xa−1 has the form
qp where q is supported on S and p is any prime ideal. The event that the left-
hand side is zero but the right-hand side is non-zero happens precisely when xa−1
is a non-unit ideal supported
                         P     on S (vice versa does not happen); the value of the
right-hand side is then p∈S such that x∈pa log N(p), which is ≤ |S| maxp∈S log N(p).
   For the bound of the number of points violating (G.3), there are ≪K (log N)|S|
ideals supported on S and having norm ≤ CK Nn . For each such ideal, there are
≪K (log N)n−1 points corresponding to it in the cube [±N]na by the consideration
of the O×K -action.
   For the existence of a claimed constant CK > 1, note that by Proposition 3.4
all the elements x ∈ [±N]na have norm ≪K Nn . Hence the existence of a non-zero
element x ∈ [±N]na ∩ qa implies N(q) ≤ N(xa−1 ) ≪K Nn .                            

Remark G.4. The constant function obviously fails to satisfy the conclusion of
Lemma G.3. This is why the Cramér model is more convenient here.
G.3. von Mangoldt and Cramér are close over OK [S−1 ]—Fubini type in-
equality. Now we are in a position to state and prove an intermediate step toward
Proposition G.1, namely the comparison of the von Mangoldt function to its Cramér
model:
Proposition G.5. For any N ≫s,K,S 1, any non-zero ideal a over OK equipped
with a norm-length compatible basis and any b ∈ a such that bOK [S−1 ] + Wa[S−1 ] =
a[S−1 ], we have
            ϕK (W)  a              a
                                               
                    Λ O  [S −1 ] − ΛO [S−1 ],Q   (W(−) + b)                 
              Wn       K              K
                                                            Us+1 a∩
                                                                    [±N]n
                                                                        a −b
                                                                     W

                                                                −1/Os,n (1)
                                              ≪s,K,S (log log N)              .
    To prove this, we need to recall a Fubini type inequality of the Gowers norm. Let
f : G → C be a finitely supported function on an abelian group G. Its unnormalized
Gowers uniformity norm kf kU       e s+1 (G) ≥ 0 is defined by:
                                             X          Y
                              2s+1
              (kf kU
                   e s+1 (G) )     :=                         C|ω| f (x + ω · h).
                                 x∈G,h∈Gs+1 ω∈{0,1}s+1

When A ⊂ G is a finite subset and f : G → C is a function, we already defined
the (normalized) Gowers norm kf kUs+1 (A) in Definition 2.1. The relationship of the
            LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                              105


normalized and unnormalized norms is:
                                           e s+1 (G) / k1A kU
                     kf kUs+1 (A) = kf 1A kU                e s+1 (G) .

In particular, if F is a finite group and we set A = F, we have
                                                                       s+1
                                                         −(s+2)/2
                                         e s+1 (F) · |F|
                      kf kUs+1 (F) = kf kU                                   .
  The following Fubini type inequality is formulated naturally using this unnor-
malized norm.
Lemma G.6 ([30, Lemma 4.1]). Let f : G → C be a finitely supported function on
an abelian group G and let H ⊂ G be a subgroup. Then
                                                              
              e s+1 (G) ≤
          kf kU            a (mod H) 7→ kf (a + (−))kU
                                                     e s+1 (H)       .
                                                                 s+1              e
                                                                                  U        (G/H)

   We are interested in a situation where G ∼
                                            = Zn and A is the intersection A =
 n                      n
Z ∩ Ω where Ω ⊂ [±N] is a convex set whose volume is typically comparable to
Nn , say
                                     Vol(Ω) ≥ Nn /C
for some C > 1. (By abuse of notation, let us write Ω also for the intersec-
tion A = Zn ∩ Ω when there is no risk of confusion.) In this situation we have
                            (s+2)/2s+1
     e s+1 (G) ≍s,n,C Vol(Ω)
k1Ω kU                                 when N ≫s,n,C 1.
   Also, let us assume that H ⊂ G has finite index and the support of f is contained
in H. The above relations give the following inequality for the normalized Gowers
norm:

                                 s+1
kf kUs+1 (Ω) ≍s,n Vol(Ω)−(s+2)/2       kf 1Ω kU
                                              e s+1 (G)
                                                           (                                            !
                     −(s+2)/2s+1                                kf 1Ω∩H kU
                                                                         e s+1 (H)           if a = 0
           ≤ Vol(Ω)                     a (mod H) 7→
                                                                0                            if not          e s+1 (G/H)
                                                                                                             U
                              s+1
           = Vol(Ω)−(s+2)/2                  e s+1 (H) 1{0} U
                                    kf 1Ω∩H kU              e s+1 (G/H)
                              s+1
           = Vol(Ω)−(s+2)/2         kf 1Ω∩H kU
                                             e s+1 (H)
                              s+1
           = Vol(Ω)−(s+2)/2                e s+1 (H) kf kUs+1 (H∩Ω) .
                                    k1Ω∩H kU
Furthermore, assume that |G/H| ≤ Nn and that H has a basis consisting of vectors
of l2 -lengths in [ C1 |G/H|1/n , C|G/H|1/n ] with respect to the chosen basis G ∼
                                                                                 = Zn
(by possibly enlarging the constant C > 1). Then by Proposition E.1 we have
                                                                                 s+1
                                                        (s+2)/2
                         e s+1 (H) ≍s,n,C (Vol(Ω)/|G/H|)
                  k1Ω∩H kU                                                             .
Therefore under these assumptions we obtain
                                                           s+1
(G.4)           kf kUs+1 (Ω) ≪s,n,C |G/H|−(s+2)/2                kf kUs+1 (H∩Ω) .
                                                                                                                    s+1
   Even if |G/H| > Nn , it is certainly true that k1Ω∩H kU                         n (s+2)/2
                                                         e s+1 (H) ≪s,n,C (Vol(Ω)/N )
so that we still have
                                                          s+1
(G.5)              kf kUs+1 (Ω) ≪s,n,C N−n(s+2)/2               kf kUs+1 (H∩Ω)
when |G/H| > Nn .
106                                       WATARU KAI


Proof of Proposition G.5. We apply §G.3 to the following W-tricked situation (this
means we are using the above general facts in the rescaled way N      N/W). For
each q, consider the following function 1Ω fq : a → C, where

                                  ϕK (W) ′qa
                      fq := 1qa         (ΛK − Λqa
                                               Cramér,Q )(W(−) + b)
                                   Wn
           [±N]n
               a⊗R −b
and Ω :=       W      . When N(q) < Nn /Wn , by (G.4) we have
                                                           s+1
                 kfq kUs+1 (a∩Ω) ≪s,K N(q)−(s+2)/2               kfq kUs+1 (qa∩Ω) .

We give qa a norm-length compatible basis. By norm-length compatibility, we know
                                               N        n
that the set Ω ∩ qa is contained in [±OK (1) WN(q) 1/n ]qa . By (the proof of) Lemma

12.2, under the assumption N(q) < Nn /Wn we have

                        kfq kUs+1 (qa∩Ω) ≪s,K (log log N)−1/Os,n (1) .

Therefore we conclude
                                                            s+1
(G.6)       kfq kUs+1 (a∩ [±N]na −b ) ≪s,K N(q)−(s+2)/2           (log log N)−1/Os,n (1)
                             W



under the assumption N(q) < Nn /Wn .
   By Lemma G.3 and the triangle inequality, we obtain (noting that the points
violating (G.3) in the lemma contribute only an Os,K,S (N−1/Os (1) ) to the Gowers
norm)

         ϕK (W) ′a
(G.7)          (ΛOK [S−1 ] − ΛaOK [S−1 ],Q )(W(−) + b)
          Wn                                           Us+1 (a∩Ω)
              X                                   X
        ≤             kfq kUs+1 (a∩Ω) +                        kfq kUs+1 (a∩Ω)
                   q                                   q
                |q|⊂S                               |q|⊂S
            N(q)≤Nn /Wn                         n     n
                                              N /W <N(q)<OK (1)Nn

                                                                          + Os,K,S (N−1/Os (1) ).

The first sum can be bounded using (G.6) as follows:
        X
                kfq kUs+1 (a∩Ω)
         q
      |q|⊂S
  N(q)≤Nn /Wn
                             X                  s+1
                      ≪s,K           N(q)−(s+2)/2     (log log N)−1/Os,n (1)
                                q
                             |q|⊂S
                      Y                  1
                                                    −1
                  =     1−                                (log log N)−1/Os,n (1)
                      p∈S
                                  N(p)(s+2)/2s+1

                                                            = OK,S (1)(log log N)−1/Os,n (1) .
              LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                     107


  For the second sum, we use (G.5) and the pointwise bound kfq kUs+1 (qa∩Ω) ≤
kfq k∞ ≪K log N (Proposition 6.3) to get:
             X
                           kfq kUs+1 (a∩Ω)
           q
         |q|⊂S
    n  n
   N /W <N(q)<OK (1)Nn

                                                    X                          −n(s+2)/2s+1
                                                                            N
                                 ≪s,K                                                           log N,
                                                 q
                                                                            W
                                              |q|⊂S
                                         n  n
                                        N /W <N(q)<OK (1)Nn

and as there are ≪K (log N)|S| ideals q satisfying |q| ⊂ S and N(q) < OK (1)Nn ,
this last sum is:
                                −n(s+2)/2s+1
                           |S|  N
                 ≪K (log N)                     log N < N−1/Os (1) .
                                W
By plugging these two bounds in (G.7), the proof of Proposition G.5 is now complete.
                                                                                 

G.4. End of Gowers norm bound. On the other hand, it is rather straightfor-
ward to compare the Cramér model and the constant function.
Proposition G.7. For any b ∈ [0, W − 1]na coprime to W in OK [S−1 ], we have

           1        ϕK (W)
                  −        ΛOK [S−1 ],Q (W(−) + b)
     res (ζK (s))    Wn                                                 [±N]n
    s=1                                                      Us+1 (a∩       a −b )
                                                                           W

                                                                   ≪s,K (log log N)−1/Os,n (1) .

Proof. One first establishes a variant of Proposition 5.2 (with the same error term)
with ΛaCramér,z replaced by ΛaOK [S−1 ],Q and the βp (ψ1 , . . . , ψt ) factors in the leading
term replaced by
                                                                                     
                                     n t             t
                                                       [           [
                                      p                                              
       βp,S−1 (ψ1 , . . . , ψt ) :=         1 − 1                            −1
                                                                             ψi,p (0) 
                                     ϕK (p)       d
                                                  p i=1                               ,
                                                                       p|p
                                                                  p coprime to S

where
                                   ψi,p : Zd /pZd → a/pa

is the affine-linear map induced by ψi . Of course we have βp,S−1 (ψ1 , . . . , ψt ) =
βp (ψ1 , . . . , ψt ) if p is coprime to S in OK . We indicate what modifications are
needed. We will be using the next related quantity given for each prime number p:

                                        t
                                        [         [
                                                              −1
                         gS−1 (p) :=                         ψi,p (0) /pd ,
                                        i=1        p|p
                                              coprime to S
108                                     WATARU KAI


which again coincides with g(p) in the proof of Proposition 5.2 if p is coprime to S
in OK . Write
                                       Y
                         T :=                      p ∈ N.
                                 p not coprime to S in OK

To verify the variant, one applies the Fundamental Lemma D.2 of Sieve Theory to
the monoid IdealsZ[T−1 ] together with the following data. Set
            Σ := {x ∈ Ω ∩ Zd | ψi (x) coprime to T in a[S−1 ] for all i}.
Here y ∈ a[S−1 ] is said to be coprime to T if yOK [S−1 ] + Ta[S−1 ] = a[S−1 ]. Define
the “norm map” Nψ     1 ,...,ψt
                     T−1        : Zd → IdealsZ[T−1 ] ∪{(0)} by
                                     t
                                                      !
                                     Y
                             x 7→      N(ψi (x)a−1 ) · Z[T−1 ].
                                 i=1

For each m ∈ IdealsZ[T−1 ] , let Σm be the fiber of Σ over m and set am := |Σm |.
   For square-free f ∈ IdealsZ[T−1 ] (which we represent by a positive integer co-
prime to T), one can see parallely to the proof of Proposition 5.2 that am ’s and
the multiplicative extension g : IdealsZ[T−1 ] → [0, 1]Qof g(p)’s satisfy the condi-
tion (D.3) in Fundamental Lemma D.2 with X = p|T (1 − g(p)) · Vol(Ω) and
rf = Od,M1 ,M2 (f TNd−1 ).
   This establishes the variant of Proposition 5.2 for ΛaOK [S−1 ],Q .
   The assertion of Proposition G.7 now follows parallelly to Corollary 5.4.      

   Combining Propositions G.5 and G.7, the proof of Proposition G.1 is now com-
plete.

G.5. End of proof of Theorem 13.1. Now we have enough tools to repeat the
proof of Theorem 12.1 in our localized setting. Let us indicate how the computation
of the main term goes.
   Recall from the statement of Theorem 13.1 that we want to evaluate:
                                 X      t
                                        Y
                                              ΛaOK [S−1 ] (ψi (x)).
                              x∈Zd ∩Ω   i=1

                             d
Dividing the source into W residue classes mod WZd , this equals
                      X            X             t
                                                 Y
                                                     ΛaOK [S−1 ] (ψi (x))
                   a∈[0,W−1]d x∈Ω∩(WZd +a) i=1

                      X          X        t
                                          Y
               =                                 ΛaOK [S−1 ] (Wψi (y) + ψi (a)).
                   a∈[0,W−1]d y∈ Ω−a ∩Zd i=1
                                  W


  Thanks to Proposition G.1 and Theorem C.6, theQ     von Neumann theorem F.4 is
                                                       t
applicable, which allows us to replace the function i=1 ΛaOK [S−1 ] (W(−) + ψi (a))
by the constant
                                                   !t
                                 Wn         1
                               ϕK (W) res (ζK (s))
                                              s=1
                LINEAR PATTERNS OF PRIME ELEMENTS IN NUMBER FIELDS                                      109


if ψi (a) (1 ≤ i ≤ t) are all coprime to W in a[S−1 ] for the given a, and by 0 if not.
The previous sum is approximated by
                                 t
                                                                         !
            1         X         Y   Wn                                     X
                  t
                                         1ψi (a) coprime to W in a[S−1 ]        1.
      res (ζK (s))          d
                                   ϕ (W)
                                i=1 K                                      Ω−a
     s=1            a∈[0,W−1]                                                             y∈ W ∩Zd
            P                                              d
The sum         y 1 is approximately Vol(Ω)/W                   for all a. Therefore
                                        t                    " t                                  #
              Vol(Ω)             Wn                              Y
        ;                                          E                1ψi (a) coprime to W in a[S−1 ]
            res (ζK (s))t       ϕK (W)        a∈[0,W−1]d
                                                                i=1
            s=1
              Vol(Ω)        Y
        =                         βp,S−1 (ψ1 , . . . , ψt ),
            res (ζK (s))t
            s=1             p|W

where the product over p | W does not change much when extended to the product
over all the primes p. This completes the proof of Theorem 13.1.

                                               References
 1. Paul T. Bateman and Roger A. Horn, A heuristic asymptotic formula concerning the
    distribution of prime numbers, Mathematics of Computation 16 (1962), no. 79, 363–367,
    https://doi.org/10.1090/S0025-5718-1962-0148632-7 .
 2. J. W. S. Cassels and A. Fröhlich (eds.), Algebraic Number Theory, Academic Press Inc. (Lon-
    don) Ltd, 1967, https://www.lms.ac.uk/publications/algebraic-number-theory .
 3. David Conlon, Jacob Fox, and Yufei Zhao, A relative Szemerédi theorem, Geom. Funct. Anal.
    25 (2015), no. 3, 733–762, https://doi.org/10.1007/s00039-015-0324-9.
 4. L. E. Dickson, A new extension of Dirichlet’s theorem on prime numbers, Messenger of Math-
    ematics 33 (1904), 155–161.
 5. John Friedlander and Henryk Iwaniec, Opera de Cribro, American Mathematical Society,
    Providence, RI, 2010, https://bookstore.ams.org/coll-57 .
 6. Christina Giannitsi, Ben Krause, Michael T. Lacey, Hamed Mousavi, and Yaghoub Rahimi,
    Average over the Gaussian primes: Goldbach’s conjecture and improving estimates, arXiv
    2309:14249v1 (2023), 36 pages, https://arxiv.org/abs/2309.14249.
 7. W.T. Gowers, A new proof of Szemerédi’s theorem, GAFA, Geom. funct. anal. 11 (2001),
    465–588, https://doi.org/10.1007/s00039-001-0332-9.
 8. Ben Green, Roth’s theorem in the primes, Ann. of Math. (2) 161 (2005), no. 3, 1609–1636,
    https://doi.org/10.4007/annals.2005.161.1609 . MR 2180408
 9. Ben Green and Terence Tao, The primes contain arbitrarily long arithmetic progressions, Ann.
    of Math. (2) 167 (2008), no. 2, 481–547, https://doi.org/10.4007/annals.2008.167.481.
10.         , Quadratic uniformity of the Möbius function, Annales de l’Institut Fourier 58 (2008),
    no. 6, 1863–1935 (en), http://www.numdam.org/articles/10.5802/aif.2401/. MR 2473624
11.         , The Möbius function is strongly orthogonal to nilsequences, Ann. of Math. 175 (2012),
    no. 2, 541–566, https://doi.org/10.4007/annals.2012.175.2.3.
12.         , The quantitative behaviour of polynomial orbits on nilmanifolds, Ann. of Math. 175
    (2012), no. 2, 465–540, https://doi.org/10.4007/annals.2012.175.2.2 (mind the Erratum).
13.         , On the quantitative distribution of polynomial nilsequences - erratum, Ann. of Math.
    179 (2014), no. 3, 1175–1183, (arXiv version https://arxiv.org/abs/1311.6170 is more de-
    tailed, which we site).
14. Ben Green,        Terence Tao,        and Tamar Ziegler,          An inverse theorem for
    the Gowers Us+1 [N]-norm,             Ann. of      Math.     (2)   176 (2012),       1231–1372,
    http://dx.doi.org/10.4007/annals.2012.176.2.11.
15. Benjamin Green and Terence Tao, Linear equations in primes, Ann. of Math. (2) 171 (2010),
    no. 3, 1753–1850, https://doi.org/10.4007/annals.2010.171.1753. MR 2680398
16. G. H. Hardy and J. E. Littlewood, Some problems of ‘Partitio numerorum’; iii: On the
    expression of a number as a sum of primes, Acta Mathematica 44 (1923), no. 1, 1–70,
    https://doi.org/10.1007/BF02403921 .
110                                  WATARU KAI


17. Yonatan Harpaz, Alexei N. Skorobogatov, and Olivier Wittenberg, The Hardy–
    Littlewood conjecture and rational points, Comp. Math. 150 (2014), 2095–2111,
    https://doi.org/10.1112/S0010437X14007568 .
18. Henryk Iwaniec and Emmanuel Kowalski, Analytic Number Theory, Colloquium
    Publications, vol. 53, American Mathematical Society, Providence, RI, 2004,
    http://dx.doi.org/10.1090/coll/053 .
19. Wataru Kai, Notes on Mitsui’s Prime Number Theorem with Siegel zeros, arXiv
    https://arxiv.org/abs/2209.11816 (2022), 38 pages.
20. Wataru Kai, Masato Mimura, Akihiro Munemasa, Shin-ichiro Seki, and Kiyoto Yoshino, Con-
    stellations in prime elements of number fields, arXiv https://arxiv.org/abs/2012.15669
    (2020), 149 pages.
21. Freddie Manners, Quantitative bounds in the inverse theorem for the Gowers Us+1 -norms
    over cyclic groups, arXiv https://arxiv.org/abs/1811.00718v1 (2018), 123 pages.
22. Takayoshi Mitsui, Generalized prime number theorem, Jpn. J. Math. 26 (1956), 1–42,
    https://doi.org/10.4099/jjm1924.26.0_1.
23. Hugh L. Montgomery and Robert C. Vaughan, Multiplicative Number Theory I. Classical
    Theory, Cambridge University Press, 2006, www.cambridge.org/9780521849036 .
24. Jürgen Neukirch, Algebraic Number Theory, Grundlehren der Mathematischen Wis-
    senschaften [Fundamental Principles of Mathematical Sciences], vol. 322, Springer-
    Verlag, Berlin, 1999, Translated from the German by Norbert Schappacher,
    https://doi.org/10.1007/978-3-662-03983-0.
25. Michael Rosen, A generalization of Mertens’ theorem, J. Ramanujan Math. Soc. 14 (1999),
    no. 1, 1–19, https://www.researchgate.net/publication/266272896_A_generalization_of_Mertens%27_theorem.
26. Imre Z. Ruzsa, On an additive property of squares and primes, Acta Arith. 49 (1988), 281–289,
    https://doi.org/10.4064/aa-49-3-281-289 .
27. Andrzej Schinzel and Waclaw Sierpiński, Sur certaines hypothèses concernant les nombres
    premiers, Acta Arith. 4 (1958), no. 3, 185–208, http://eudml.org/doc/206115; Errata, ibid.
    5, no. 2, p. 259 (1959) https://doi.org/10.4064/aa-5-2-259 , ibid. 7, no. 1, 1–8 (1961)
    https://doi.org/10.4064/aa-7-1-1-8.
28. Wenbo      Sun,      Sarnak’s    conjecture    for  nilsequences    on    arbitrary   number
    fields and applications,        Advances in Mathematics 415 (2023),                91 pages,
    https://doi.org/10.1016/j.aim.2023.108883 https://arxiv.org/abs/1902.09712.
29. Terence Tao,        Higher Order Fourier Analysis,           Graduate Studies in Math-
    ematics,     vol. 142,     American Mathematical Society,           Providence,    RI, 2012,
    https://terrytao.wordpress.com/books/higher-order-fourier-analysis/ .
30. Terence Tao and Joni Teräväinen, Quantitative bounds for Gowers uniformity of the Möbius
    and von Mangoldt functions, arXiv https://arxiv.org/abs/2107.02158 (2021), 56 pages.
31. Alfred Weiss, The least prime ideal, J. Reine Angew. Math. 338 (1983), 56–94,
    https://eudml.org/doc/152493.
32. Martin Widmer, Counting primitive points of bounded height, Trans. Amer. Math. Soc. 362
    (2010), no. 9, 4793–4829, https://doi.org/10.1090/S0002-9947-10-05173-1.
33.          ,      Lipschitz     class,      narrow     class,       and     counting     lattice
    points,      Proc.    Amer.      Math.      Soc.   140      (2011),    no.     2,    677–689,
    https://www.ams.org/journals/proc/2012-140-02/S0002-9939-2011-10926-2 .

  Mathematical Institute, Tohoku University, Aoba 6-3, 980-8578 Sendai, Japan
  Email address: kaiw@tohoku.ac.jp
