Part II, chapter 12
From the table to G(x)
Averaging over translates forgets the column, the product of two quadratic characters expands into four smoothed prime sums, and two classical estimates do the rest: the three twisted sums are small for a well-chosen pair of auxiliary primes, and the cells with tiny weights are negligible. Together they give the bound on that chapter 4 turns into the Riemann Hypothesis. Behrend's construction and a random choice supply the two sets of columns.
draft, under review24 minfirst published in v0.1.0, 2026-11-22
Each cell is an arithmetic progression
This chapter is classical analytic number theory, and the exposition proves it in full from (M) and two estimates (Part II, §4–5; Part III, §III.1–III.3). The prime powers in a given cell are those in one pair of residue classes modulo with a prescribed value of ; the coefficient then selects the odd powers of primes inert in . For fixed moduli and scale tending to infinity, the prime number theorem in progressions gives each cell the fraction of the primes, half of them inert, and of chapter 11 is the resulting main term, with its constants. The identity is exact, but no uniformity is claimed at this point: at the scale there are far more cells than primes, and a single need not be small. The argument uses only the average over translates. At the large scale the uniformity is Estimate C.
Two scales. A cell with weight tests primes up to . For a distinguished cell this is : the scale we care about. For every other cell it is at least , an enormous scale, where the distribution of primes in these progressions can be controlled with a saving better than any power of from the classical zero-free region for Dirichlet -functions. In the finite example those cells account for of the mean excess .
Averaging over translates
Fix and first replace each distinguished weight by . For a column , the equation with has exactly solutions , so for each admissible prime power ,
The column label is gone. Multiplying by gives the right contribution at the three special primes as well, and hence, with and ,
This is an identity for every argument , and the map sending a sum with expansion to its remainder is linear, so the same identity holds for the remainders: . Since ,
where, for a primitive character , is the analogue of for (chapter 6’s family statistic). The function appears with coefficient . In the example each of the four row-1 cells is distinguished once, and the four remainders give , which is ; a separate check from the four ‘s at (, , , ) gives .
Discarding the other scale. For the moduli of the construction and , every one of the primitive characters that occur when the cells are expanded satisfies (Estimate C below). Each remainder is a combination of the with Fourier coefficients whose absolute values sum to , so a non-distinguished cell contributes at most , and summed over and divided by this is : exponential decay beats the polynomial factor. Changing the distinguished weights from to with costs , and moving to within costs . Combining,
With (M) this gives Estimate A: for and the parameters of the construction,
Only an upper bound follows, which is all chapter 4 needs.
The three twisted sums: Estimate B
To pass from to one needs the three twists to be small. Estimate B. Let . For all large there are primes , with , , , such that for and all .
Is this circular? It looks like assuming the Riemann Hypothesis for three -functions. It is not, for a reason of scale. The moduli and are astronomically larger than : their logarithms are powers of . The quantity has two parts, the constant , an infinite sum over prime powers, and the finite sum over . The tail of the constant beyond is small by a zero-density estimate for zeros close to the line , which discards a small proportion of the moduli and uses nothing about zeros near . What remains is a sum over , still very short compared with and , and mean-square estimates over the modulus show that for most pairs such a sum is as small as a random sum, about . One only needs one good pair. The archive proves this with the exponent and on any interval :
UpperTheory.Top.WinPairstructureCharacterBoxes/ExistsPageN.lean:27The pair: prime, , ; prime, , ; ; and every odd prime divides .
structure WinPair (eps Y : ℝ) (q d : ℕ) : Prop
The pair: prime, , ; prime, , ; ; and every odd prime divides .
Full declaration with proof
structure WinPair (eps Y : ℝ) (q d : ℕ) : Prop where q_prime : q.Prime q_mod : q % 8 = 3 q_lo : Y ^ (eps / 5) / 2 < Real.log q q_up : Real.log q ≤ Y ^ (eps / 5) d_prime : d.Prime d_mod : d % 16 = 7 d_lo : Y ^ (eps / 5) * Real.log Y ^ 2 / 2 < Real.log d d_up : Real.log d ≤ Y ^ (eps / 5) * Real.log Y ^ 2 d_q : q ∣ d + 1 d_small : ∀ p : ℕ, p.Prime → p ≠ 2 → (p : ℝ) ≤ Y ^ (eps / 5) → p ∣ d + 1
UpperTheory.Top.PairGoodstructureCharacterBoxes/PairGood.lean:18A good pair for a modulus : a window pair coprime to such that every twist with of a character modulo has and on , and every real such twist has no zero in the box , .
structure PairGood (M : ℕ) (eps Y X : ℝ) (q d : ℕ) : Prop
A good pair for a modulus : a window pair coprime to such that every twist with of a character modulo has and on , and every real such twist has no zero in the box , .
Full declaration with proof
structure PairGood (M : ℕ) (eps Y X : ℝ) (q d : ℕ) : Prop where
pair : WinPair eps Y q d
coprime : Nat.Coprime M (q * d)
bounds : ∀ (ξ : DirichletCharacter ℂ M) (i j : Fin 2), (i ≠ 0 ∨ j ≠ 0) →
∀ (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N), An.Induces χ (tw (fun a => ξ (a : ZMod M)) q d i j) (2 * M * q * d) →
∀ y : ℝ, Y ≤ y → y ≤ X → ‖An.gChi χ y‖ ≤ y ^ ((1 : ℝ) / 2 + eps / 2) ∧ ‖An.logDerivativeAtOne χ‖ ≤ 4 * Real.log y
boxes : ∀ ρ : PChar, ρ.IsReal → ρ.N ∣ 8 * M → ∀ i j : Fin 2, (i ≠ 0 ∨ j ≠ 0) →
∀ (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N), An.Induces χ (tw ρ.val q d i j) (2 * M * q * d) →
ZeroBox (height M eps Y j) χUpperTheory.Top.PairExdefCharacterBoxes/PairGood.lean:28For every , and there is such that every has a good pair on .
def PairEx : Prop
For every , and there is such that every has a good pair on .
Full declaration with proof
def PairEx : Prop :=
∀ (M : ℕ), 0 < M → ∀ eps A : ℝ, 0 < eps → eps < 1 / 52 → 1 ≤ A →
∃ Y1 : ℝ, ∀ Y ≥ Y1, ∃ q d : ℕ, PairGood M eps Y (Y ^ A) q dQH.pairExtheoremMeanSquareBounds/pairEx.lean:112The theorem that proves it, from a mean-square estimate over the modulus and the zero-density input (the exposition's Theorem III.1.1).
theorem pairEx : UpperTheory.Top.PairEx
The theorem that proves it, from a mean-square estimate over the modulus and the zero-density input (the exposition's Theorem III.1.1).
Full declaration with proof
theorem pairEx :
UpperTheory.Top.PairEx := by
intro M hM eps A heps heps' hA
obtain ⟨C, hC, hpair⟩ := pair_exists
obtain ⟨Y₀, hY₀⟩ := hpair eps (eps / 2) A (8 * M) heps heps' (by linarith) hA (by omega)
obtain ⟨Y₁, hY₁⟩ := kappa4 eps 3 heps heps' (by norm_num)
refine ⟨max (max Y₀ Y₁) (Real.exp (1 + Real.log (8 * M))), fun Y hY => ?_⟩
have hYa : Y₀ ≤ Y := le_trans (le_trans (le_max_left _ _) (le_max_left _ _)) hY
have hYb : Y₁ ≤ Y := le_trans (le_trans (le_max_right _ _) (le_max_left _ _)) hY
have hYc : Real.exp (1 + Real.log (8 * M)) ≤ Y := le_trans (le_max_right _ _) hY
have hM1 : (1 : ℝ) ≤ M := by exact_mod_cast hM
have hlog8 : 0 ≤ Real.log (8 * M) := Real.log_nonneg (by linarith)
have hY1 : 1 ≤ Y := le_trans (Real.one_le_exp (by linarith)) hYc
have hz0 : 0 ≤ Y ^ (eps / 5) * Real.log Y ^ 2 := by
have := Real.log_nonneg hY1
positivity
have hA2 : 1 ≤ A ^ 2 := by nlinarith
obtain ⟨q, d, hR, hq, hQ, hD⟩ := hY₀ Y hYa (Y ^ A) (Y ^ (eps / 5) * Real.log Y ^ 2) le_rfl le_rfl
(le_mul_of_one_le_left hz0 hA2)
have hq2 : q ≠ 2 := by
intro h2
have hm := hR.q_mod
rw [h2] at hm
norm_num at hm
haveI : NeZero (8 * M) := ⟨by omega⟩
have hM8 : M ∣ 8 * M := Dvd.intro_left 8 rfl
refine ⟨q, d, ?_, ?_, ?_, ?_⟩
· refine ⟨hR.q_prime, hR.q_mod, hR.q_gt, hR.q_le, hR.d_prime, hR.d_mod, hR.d_gt, hR.d_le, ?_, ?_⟩
· exact Nat.dvd_of_mod_eq_zero (hR.d_class q hR.q_prime hq2 (Or.inr rfl))
· intro p hp hp2 hpl
exact Nat.dvd_of_mod_eq_zero (hR.d_class p hp hp2 (Or.inl hpl))
· have hqM : ¬ q ∣ M := fun h => by
have := Nat.le_of_dvd hM h
omega
have hdM : ¬ d ∣ M := fun h => by
have := Nat.le_of_dvd hM h
have := hR.q_lt_d
omega
exact Nat.Coprime.mul_right ((Nat.Prime.coprime_iff_not_dvd hR.q_prime).mpr hqM).symm
((Nat.Prime.coprime_iff_not_dvd hR.d_prime).mpr hdM).symm
· intro ξ i j hij N _ χ hI y hy1 hy2
have hB := pairEx_box M hM C (eps / 2) Y (Y ^ A) (Y ^ (eps / 5)) (Y ^ (eps / 5) * Real.log Y ^ 2) q d
hR hq hQ hD (fun a ↦ ξ a) (DirichletCharacter.changeLevel hM8 ξ)
(fun n hn => pairEx_lift hM8 ξ n hn) i j hij N χ hI
obtain ⟨hgood, _, hG⟩ := hB
have hne : χ ≠ 1 := hgood.1
constructor
· rw [pairEx_g χ hne]
exact hG y ⟨hy1, hy2⟩
· obtain ⟨hk1, hk2⟩ := log_exp_product_bounds M hM eps Y heps hYc (j : ℕ) (Nat.lt_succ_iff.mp j.isLt)
have hk := hY₁ Y hYb _ N χ hk1 hk2 hgood
have hlog : Real.log Y ≤ Real.log y := Real.log_le_log (by linarith) hy1
exact le_trans hk (by linarith)
· intro ρ hρ hρN i j hij N _ χ hI
have hB := pairEx_box M hM C (eps / 2) Y (Y ^ A) (Y ^ (eps / 5)) (Y ^ (eps / 5) * Real.log Y ^ 2) q d
hR hq hQ hD ρ.val (DirichletCharacter.changeLevel hρN ρ.χ)
(fun n hn => pairEx_lift hρN ρ.χ n hn) i j hij N χ hI
exact hB.1.2.2UpperTheory.Top.ZeroBoxdefCharacterBoxes/PairGood.lean:12No zero with and .
def ZeroBox (Q : ℝ) {N : ℕ} [NeZero N] (χ : DirichletCharacter ℂ N) : Prop
No zero with and .
Full declaration with proof
def ZeroBox (Q : ℝ) {N : ℕ} [NeZero N] (χ : DirichletCharacter ℂ N) : Prop :=
∀ s : ℂ, 1 - 1 / 400 < s.re → |s.im| ≤ Q → DirichletCharacter.LFunction χ s ≠ 0The last condition of the window pair has a consequence not visible in the plain statement: every odd prime up to divides , so for all of them, and . Every small prime splits in ; the inert primes, which carry the whole argument, all exceed .
The large scale: Estimate C
Estimate C. For the same primes and every , every one of the primitive characters that occur when the cells are expanded (their conductors divide ) satisfies for all , with a constant , for the trivial character. It rests on the classical zero-free region ; it is available because and are much smaller than , and because and were chosen so that no exceptional real zero interferes (the zero boxes of the good pair).
UpperTheory.Top.ThinHdefCharacterBoxes/PairGood.lean:36There is such that for and large, every host whose odd level is bounded, whose conductor satisfies and which has no real zero in the box, satisfies the Chebyshev-type character bound at scale with constant .
def ThinH : Prop
There is such that for and large, every host whose odd level is bounded, whose conductor satisfies and which has no real zero in the box, satisfies the Chebyshev-type character bound at scale with constant .
Full declaration with proof
def ThinH : Prop :=
∃ c : ℝ, 0 < c ∧ ∀ B eps : ℝ, 0 < eps → eps < 1 / 52 → ∃ x0 : ℝ, ∀ x ≥ x0, ∀ (φ : Frame) (H : HostRaw φ),
((ordCompl[2] H.QS : ℕ) : ℝ) ≤ B → Real.log (H.condN : ℝ) ≤ 2 * x ^ (eps / 5) * Real.log x ^ 2 → RealBox H →
H.ChebyshevCharacterBound x eps cQH.thinHtheoremMeanSquareBounds/GaussSumFunctionEq.lean:55Its proof (the exposition's Theorem III.2.1).
theorem thinH : UpperTheory.Top.ThinH
Its proof (the exposition's Theorem III.2.1).
Full declaration with proof
theorem thinH :
UpperTheory.Top.ThinH := by
refine ⟨1, one_pos, fun B eps he he52 => ?_⟩
obtain ⟨c₀s, hc₀s, hsmall⟩ := small_zeros (8 * ⌊B⌋₊)
have hc₀ : 0 < min c₀s (1 / 400) := lt_min hc₀s (by norm_num)
obtain ⟨x₀, hx₀⟩ := thin eps 2 1 (min c₀s (1 / 400)) he two_pos one_pos hc₀
refine ⟨x₀, fun x hx φ H hB hlog hRB => ?_⟩
intro N _ χ hχ y hy
rw [gauss_sum_function_eq]
have hprim : χ.IsPrimitive := by
obtain ⟨θ, hθ⟩ := hχ
exact hθ.1
have hNd : N ∣ H.condN := level_dvd H χ hχ
have hNpos : 0 < N := Nat.pos_of_ne_zero (NeZero.ne N)
have hlogN : Real.log N ≤ 2 * x ^ (eps / 5) * Real.log x ^ 2 :=
(Real.log_le_log (by exact_mod_cast hNpos)
(by exact_mod_cast Nat.le_of_dvd H.condN_pos hNd)).trans hlog
refine hx₀ x hx N χ hprim hlogN ?_ y hy
intro h2 h1 β hβ hβ1
have hq : H.q.Prime := H.hyp.1
have hd : H.d.Prime := H.hyp.2.1
by_cases hqd : H.q ∣ N ∨ H.d ∣ N
· exact hRB (Formalism.HC.PChar.mk N χ hprim) hχ (isReal_of_sq χ h2) hqd β
(by have := min_le_right c₀s (1 / 400); linarith)
· push_neg at hqd
have hQ0 : H.QS ≠ 0 := (H.QS_pos).ne'
have hsplitQ := Nat.ordProj_mul_ordCompl_eq_self H.QS 2
have hprimes : ∀ p : ℕ, p.Prime → p ∣ N → p ∣ 8 * (H.QS / 2 ^ H.QS.factorization 2) ∨ p = H.q ∨ p = H.d := by
intro p hp hpN
have hpc : p ∣ H.QS * H.q * H.d := hpN.trans hNd
rcases (Nat.Prime.dvd_mul hp).1 hpc with h | h
· rcases (Nat.Prime.dvd_mul hp).1 h with h' | h'
· left
by_cases hp2 : p = 2
· subst hp2
exact Dvd.dvd.mul_right (by norm_num) _
· apply Dvd.dvd.mul_left
rw [← hsplitQ] at h'
have hcop : Nat.Coprime p (2 ^ H.QS.factorization 2) :=
Nat.Coprime.pow_right _ ((Nat.coprime_primes hp Nat.prime_two).2 hp2)
exact hcop.dvd_of_dvd_mul_left h'
· exact Or.inr (Or.inl ((Nat.prime_dvd_prime_iff_eq hp hq).1 h'))
· exact Or.inr (Or.inr ((Nat.prime_dvd_prime_iff_eq hp hd).1 h))
have hdiv := real_cond (8 * (H.QS / 2 ^ H.QS.factorization 2)) H.q H.d N χ hprim h2
(dvd_mul_right 8 _) hq hd hprimes
have hcq : Nat.Coprime N H.q := ((Nat.Prime.coprime_iff_not_dvd hq).2 hqd.1).symm
have hcd : Nat.Coprime N H.d := ((Nat.Prime.coprime_iff_not_dvd hd).2 hqd.2).symm
have hN0 : N ∣ 8 * (H.QS / 2 ^ H.QS.factorization 2) :=
hcq.dvd_of_dvd_mul_right (hcd.dvd_of_dvd_mul_right hdiv)
have hopos : 0 < H.QS / 2 ^ H.QS.factorization 2 := Nat.ordCompl_pos 2 hQ0
have hofl : H.QS / 2 ^ H.QS.factorization 2 ≤ ⌊B⌋₊ := Nat.le_floor hB
have hNle : N ≤ 8 * ⌊B⌋₊ := (Nat.le_of_dvd (by omega) hN0).trans (by omega)
exact hsmall N χ hNle h1 β (by have := min_le_left c₀s (1 / 400); linarith) hβ1UpperTheory.Top.RealBoxdefCharacterBoxes/PairGood.lean:32The no-exceptional-zero condition: real characters of the host divisible by or have for real .
def RealBox {φ : Frame} (H : HostRaw φ) : Prop
The no-exceptional-zero condition: real characters of the host divisible by or have for real .
Full declaration with proof
def RealBox {φ : Frame} (H : HostRaw φ) : Prop :=
∀ ψ : PChar, H.IsCharE ψ.χ → ψ.IsReal → (H.q ∣ ψ.N ∨ H.d ∣ ψ.N) →
∀ β : ℝ, 1 - 1 / 400 < β → DirichletCharacter.LFunction ψ.χ β ≠ 0From A and B, with A itself using (M), B and C: on the interval. By chapter 4 this proves the Riemann Hypothesis. The archive bundles the window, the pair and the parameters into one datum per character:
UpperTheory.Top.WinDatumstructureCharacterBoxes/TwistForm.lean:19For a character : , a good pair for the modulus of on , with , and the Galois-cohomology bound for the field built from (chapter 14).
structure WinDatum (ψ : PChar) (eps J c x Y : ℝ) (q d e : ℕ) : Prop
For a character : , a good pair for the modulus of on , with , and the Galois-cohomology bound for the field built from (chapter 14).
Full declaration with proof
structure WinDatum (ψ : PChar) (eps J c x Y : ℝ) (q d e : ℕ) : Prop where
lo : x ^ (1 / J) ≤ Y
up : Y ≤ x
good : PairGood ψ.N eps Y x q d
n_lo : x ^ (2 + 8 * eps) ≤ c * 2 ^ e
n_up : c * 2 ^ e ≤ 2 * x ^ (2 + 8 * eps)
bound : ∀ (E : Type) [Field E] [NumberField E], IsChiField ψ e q d E →
VVle E ⌊x ^ (400 : ℝ)⌋₊ (Real.sqrt (Real.exp (x ^ eps)))UpperTheory.Top.winPairstheoremCharacterBoxes/WinPairs.lean:5From the cohomological window (`VWinAt`, chapter 14) and the existence of good pairs: for every there is such that every has a window datum.
theorem UpperTheory.Top.winPairs : ∀ (ψ : PChar) (eps c : ℝ), 0 < eps → eps < 1 / 52 → 1 ≤ c → VWinAt ψ 401 → PairEx → ∃ J : ℝ, 1 ≤ J ∧ ∀ y : ℝ, ∃ Z : ℝ, y ≤ Z ∧ ∀ x : ℝ, Z ≤ x → x ≤ Z ^ ((3 : ℝ) / 2) → ∃ (Y : ℝ) (q d e : ℕ), WinDatum ψ eps J c x Y q d e
From the cohomological window (`VWinAt`, chapter 14) and the existence of good pairs: for every there is such that every has a window datum.
Excerpt: the first 60 of 77 lines
theorem UpperTheory.Top.winPairs :
∀ (ψ : PChar) (eps c : ℝ), 0 < eps → eps < 1 / 52 → 1 ≤ c → VWinAt ψ 401 → PairEx →
∃ J : ℝ, 1 ≤ J ∧ ∀ y : ℝ, ∃ Z : ℝ, y ≤ Z ∧ ∀ x : ℝ, Z ≤ x → x ≤ Z ^ ((3 : ℝ) / 2) →
∃ (Y : ℝ) (q d e : ℕ), WinDatum ψ eps J c x Y q d e := by
intro ψ eps c heps heps52 hc hV hP
obtain ⟨e, he⟩ := exists_pageN eps heps
obtain ⟨J, hJ, X0, hX0⟩ := hV eps heps heps52 e he
have hN : 0 < ψ.N := Nat.pos_of_ne_zero (NeZero.ne _)
obtain ⟨Y1, hY1⟩ := hP ψ.N hN eps J heps heps52 hJ
have ha : 0 < 2 + 8 * eps := by linarith
have hc0 : 0 ≤ c := by linarith
obtain ⟨k, hk1, hka⟩ : ∃ k : ℝ, 1 ≤ k ∧ k ^ (2 + 8 * eps) = c := by
refine ⟨c ^ (1 / (2 + 8 * eps)), Real.one_le_rpow hc (one_div_nonneg.2 ha.le), ?_⟩
rw [one_div, Real.rpow_inv_rpow hc0 ha.ne']
have hk0 : 0 ≤ k := by linarith
refine ⟨J, hJ, fun y => ?_⟩
have hJ0 : J ≠ 0 := ne_of_gt (by linarith)
have hJi : 0 ≤ 1 / J := one_div_nonneg.2 (by linarith)
obtain ⟨M, hM1, hMy, hMY1, hMk3, hMk400⟩ : ∃ M : ℝ, 1 ≤ M ∧ y ≤ M ∧ Y1 ≤ M ∧
k ^ (3 : ℝ) ≤ M ∧ k ^ (400 : ℝ) ≤ M :=
⟨max 1 (max y (max Y1 (max (k ^ (3 : ℝ)) (k ^ (400 : ℝ))))), by simp, by simp, by simp, by simp, by simp⟩
obtain ⟨X, hXX0, hXM⟩ : ∃ X : ℝ, X0 ≤ X ∧ M ^ J ≤ X := ⟨max X0 (M ^ J), le_max_left _ _, le_max_right _ _⟩
have hM0 : 0 ≤ M := by linarith
have hX1 : 1 ≤ X := (Real.one_le_rpow hM1 (by linarith)).trans hXM
have hX0' : 0 ≤ X := by linarith
have hY0M : M ≤ X ^ (1 / J) := by
calc M = (M ^ J) ^ (1 / J) := by rw [one_div, Real.rpow_rpow_inv hM0 hJ0]
_ ≤ X ^ (1 / J) := Real.rpow_le_rpow (Real.rpow_nonneg hM0 _) hXM hJi
have hXJ : (X ^ (1 / J)) ^ J = X := by rw [one_div, Real.rpow_inv_rpow hX0' hJ0]
obtain ⟨q, d, hpg⟩ := hY1 (X ^ (1 / J)) (hMY1.trans hY0M)
obtain ⟨W, hW0, hW2, hWV⟩ := hX0 X hXX0 q d hpg.pair
have hWM : M ≤ W := hY0M.trans hW0
have hW1 : 1 ≤ W := hM1.trans hWM
have hWnn : 0 ≤ W := by linarith
have hk3 : k ^ (3 : ℝ) ≤ W := hMk3.trans hWM
have hlem : (k * W) ^ ((3 : ℝ) / 2) ≤ W ^ (2 : ℝ) := by
have h1 : (k * W) ^ ((3 : ℝ) / 2) = ((k * W) ^ (3 : ℝ)) ^ ((1 : ℝ) / 2) := by
rw [← Real.rpow_mul (mul_nonneg hk0 hWnn)]
norm_num
have h2 : W ^ (2 : ℝ) = (W ^ (4 : ℝ)) ^ ((1 : ℝ) / 2) := by
rw [← Real.rpow_mul hWnn]
norm_num
rw [h1, h2]
apply Real.rpow_le_rpow (Real.rpow_nonneg (mul_nonneg hk0 hWnn) _) _ (by norm_num)
rw [Real.mul_rpow hk0 hWnn, show (4 : ℝ) = 1 + 3 by norm_num, Real.rpow_add (by linarith : 0 < W),
Real.rpow_one]
exact mul_le_mul_of_nonneg_right hk3 (Real.rpow_nonneg hWnn _)
refine ⟨k * W, hMy.trans (hWM.trans (le_mul_of_one_le_left hWnn hk1)), fun x hZx hxZ => ?_⟩
have hkpos : 0 < k := by linarith
have hxW2 : x ≤ W ^ (2 : ℝ) := hxZ.trans hlem
have hxX : x ≤ X := hxW2.trans hW2
have hx1 : W ≤ x := (le_mul_of_one_le_left hWnn hk1).trans hZx
have hx0 : 0 ≤ x := by linarith
obtain ⟨x', rfl⟩ : ∃ x', x = k * x' := ⟨x / k, by field_simp⟩
have hWx' : W ≤ x' := le_of_mul_le_mul_left hZx hkpos
have hx'0 : 0 ≤ x' := hWnn.trans hWx'
have hx'1 : 1 ≤ x' := hW1.trans hWx'
have hx'x : x' ≤ k * x' := le_mul_of_one_le_left hx'0 hk1
have hpage : x' ^ (2 + 8 * eps) ≤ 2 ^ (e x') ∧ 2 ^ (e x') ≤ 2 * x' ^ (2 + 8 * eps) := he x' hx'1
have hpow : (k * x') ^ (2 + 8 * eps) = c * x' ^ (2 + 8 * eps) := by rw [Real.mul_rpow hk0 hx'0, hka]
…The complete declaration runs to line 81 of Development/AutomorphicArithmetic/CharacterBoxes/WinPairs.lean in the archive; the statement above is its full header.
The two sets of columns
The table of chapter 11 has columns, indexed by the cyclic group ; write it additively as . The construction singles out two sets of columns, both needed only through combinatorial properties.
The set : a construction of Behrend. Let be an integer with . For large there is a set of positive integers with for every , , and no relation: if are distinct and , , then . For , this says contains no three-term arithmetic progression. The proof is Behrend's (background): among the vectors in some sphere contains at least of them, and three points of a sphere are never collinear; writing the vectors in the base turns the sphere into a set of integers with no relation, and the parameters , make its density , which exceeds for large . The archive uses Mathlib’s Behrend.map for the base- encoding and proves the orbit property too: among any consecutive terms of a progression whose step has order above , at most two lie in a translate .
Formalism.FrobeniusOrbits.HostThickExistsdefFrobeniusOrbits/HostThickExists.lean:30There is such that for all and there is a finite set of naturals with on , no relation at level , and .
def HostThickExists : Prop
There is such that for all and there is a finite set of naturals with on , no relation at level , and .
Full declaration with proof
def HostThickExists : Prop :=
∃ C : ℝ, 0 < C ∧ ∀ n L : ℕ, 2 ≤ L → ∃ T : Finset ℕ, (∀ s ∈ T, 4 * L * s < n) ∧ NoRel T L ∧
(n : ℝ) * Real.exp (-C * Real.sqrt (Real.log n * Real.log L)) / L ≤ T.cardFormalism.FrobeniusOrbits.NoReldefFrobeniusOrbits/HostThickExists.lean:13No relation: for distinct and with , .
def NoRel (T : Finset ℕ) (L : ℕ) : Prop
No relation: for distinct and with , .
Full declaration with proof
def NoRel (T : Finset ℕ) (L : ℕ) : Prop :=
∀ s₁ ∈ T, ∀ s₂ ∈ T, ∀ s₃ ∈ T, s₁ ≠ s₂ → s₁ ≠ s₃ → s₂ ≠ s₃ →
∀ i j : ℤ, 0 < |i| → |i| ≤ L → 0 < |j| → |j| ≤ L → i ≠ j →
j * ((s₂ : ℤ) - s₁) ≠ i * ((s₃ : ℤ) - s₁)Formalism.FrobeniusOrbits.hostThickExiststheoremFrobeniusOrbitsProofs/ThickExists.lean:181The proof by the sphere construction.
theorem hostThickExists : HostThickExists
The proof by the sphere construction.
Excerpt: the first 60 of 154 lines
theorem hostThickExists : HostThickExists := by
unfold HostThickExists
refine ⟨32, by norm_num, ?_⟩
intro n L hL
have hL2 : (2 : ℝ) ≤ L := by exact_mod_cast hL
have hLpos : (0 : ℝ) < L := by linarith
obtain ⟨y, hy⟩ : ∃ y : ℝ, y = Real.log (L : ℝ) := ⟨_, rfl⟩
obtain ⟨x, hx⟩ : ∃ x : ℝ, x = Real.log (n : ℝ) := ⟨_, rfl⟩
obtain ⟨s, hs⟩ : ∃ s : ℝ, s = Real.sqrt (x * y) := ⟨_, rfl⟩
have hrw : Real.sqrt (Real.log (n : ℝ) * Real.log (L : ℝ)) = s := by rw [hs, hx, hy]
rw [hrw]
have hy_half : (1 : ℝ) / 2 < y := by
have h1 := Real.log_two_gt_d9
have h2 := Real.log_le_log (by norm_num) hL2
rw [hy]
linarith
have hy0 : 0 < y := by linarith
by_cases hsmall : (n : ℝ) * Real.exp (-32 * s) / L ≤ 1
· rcases Nat.eq_zero_or_pos n with hn | hn
· refine ⟨∅, by simp, ?_, by simp [hn]⟩
unfold NoRel
intro s₁ hs₁
simp at hs₁
· refine ⟨{0}, ?_, ?_, ?_⟩
· intro m hm
rw [Finset.mem_singleton] at hm
subst hm
simpa using hn
· unfold NoRel
intro s₁ hs₁ s₂ hs₂ s₃ hs₃ h12
rw [Finset.mem_singleton] at hs₁ hs₂
exact absurd (hs₁.trans hs₂.symm) h12
· rw [Finset.card_singleton, Nat.cast_one]
exact hsmall
push_neg at hsmall
have hnpos : (0 : ℝ) < n := by
rcases Nat.eq_zero_or_pos n with hn | hn
· rw [hn] at hsmall
norm_num at hsmall
· exact_mod_cast hn
have eL : Real.exp y = L := by rw [hy, Real.exp_log hLpos]
have en : Real.exp x = n := by rw [hx, Real.exp_log hnpos]
have hpos : 0 < x + -32 * s - y := by
rw [← Real.exp_lt_exp, Real.exp_zero, Real.exp_sub, Real.exp_add, eL, en]
exact hsmall
have hs0 : 0 ≤ s := by rw [hs]; exact Real.sqrt_nonneg _
have hxpos : 0 < x := by linarith
have hs2 : s ^ 2 = x * y := by rw [hs]; exact Real.sq_sqrt (mul_pos hxpos hy0).le
have hs32 : 32 * y < s := by
by_contra hc
push_neg at hc
nlinarith [mul_nonneg hs0 (sub_nonneg.mpr hc), mul_pos hpos hy0, sq_nonneg y]
have hs16 : 16 < s := by linarith
obtain ⟨S, hSdef⟩ : ∃ S : ℕ, S = ⌊s / y⌋₊ := ⟨_, rfl⟩
have hS1 : (S : ℝ) ≤ s / y := by rw [hSdef]; exact Nat.floor_le (div_nonneg hs0 hy0.le)
have hS2 : s / y < S + 1 := by rw [hSdef]; exact Nat.lt_floor_add_one _
have hSy : (S : ℝ) * y ≤ s := (le_div_iff₀ hy0).mp hS1
have hSy2 : s < (S + 1) * y := (div_lt_iff₀ hy0).mp hS2
have hS31 : (31 : ℝ) < S := by
have h := lt_of_mul_lt_mul_right (show (32 : ℝ) * y < (S + 1) * y by linarith) hy0.le
…The complete declaration runs to line 334 of Formalism/FrobeniusOrbits/FrobeniusOrbitsProofs/ThickExists.lean in the archive; the statement above is its full header.
Formalism.FrobeniusOrbits.HostThickOrbitdefFrobeniusOrbits/HostThickExists.lean:22Arithmetic progressions meet translates of rarely: at most two of consecutive terms when the step has order above , at most one point of the whole progression otherwise.
def HostThickOrbit : Prop
Arithmetic progressions meet translates of rarely: at most two of consecutive terms when the step has order above , at most one point of the whole progression otherwise.
Full declaration with proof
def HostThickOrbit : Prop :=
∀ (n L : ℕ), 0 < n → 2 ≤ L → ∀ T : Finset ℕ, (∀ s ∈ T, 4 * L * s < n) → NoRel T L →
∀ u₀ t h : ZMod n,
(4 * L < addOrderOf h → ∀ i₀ : ℤ,
((Finset.Ico i₀ (i₀ + L)).filter (fun i : ℤ => InTranslate T u₀ (t + i • h))).card ≤ 2) ∧
(addOrderOf h ≤ 4 * L →
{x : ZMod n | (∃ i : ℤ, x = t + i • h) ∧ InTranslate T u₀ x}.ncard ≤ 1)Formalism.FrobeniusOrbits.hostThickOrbittheoremFrobeniusOrbitsProofs/ThickOrbit.lean:132Its proof.
theorem hostThickOrbit : HostThickOrbit
Its proof.
Full declaration with proof
theorem hostThickOrbit : HostThickOrbit := by
intro n L hn _ T hT hR u₀ t h
exact ⟨fun hord i₀ => ThickOrbit.part_one T hT hR u₀ t h hord i₀,
fun hord => ThickOrbit.part_two hn T hT u₀ t h hord⟩The set : a random choice. The set of labels is chosen so that is about with , and so that for most primes and most the points of on the Frobenius orbit of are evenly spread in a precise sense (the exposition’s good orbits, with windows, tiles and marked cells). Each element of is put in independently with probability ; the three bad events have probability at most per orbit, and a first-moment argument produces one set with and few bad orbits, weighted by .
Formalism.FrobeniusOrbits.HostTopsdefFrobeniusOrbits/HostThickExists.lean:39The probabilistic lemma: if each bad event has Bernoulli weight at most , some set with has weighted bad count at most .
def HostTops : Prop
The probabilistic lemma: if each bad event has Bernoulli weight at most , some set with has weighted bad count at most .
Full declaration with proof
def HostTops : Prop :=
∀ (α ι : Type) [Fintype α] [Fintype ι] (δ β : ℝ) (ω : ι → ℝ) (BAD : ι → α → Finset α → Prop),
0 < δ → δ ≤ 1 → 0 ≤ β → (∀ p, 0 ≤ ω p) → 16 ≤ δ * Fintype.card α →
(∀ p t, (∑ T : Finset α, if t ∈ T ∧ BAD p t T then bern δ T else 0) ≤ β * δ) →
∃ T : Finset α, δ * Fintype.card α / 2 ≤ T.card ∧ (T.card : ℝ) ≤ 2 * δ * Fintype.card α ∧
(∑ p, ω p * ((T.filter (fun t => BAD p t T)).card : ℝ)) ≤
4 * β * δ * Fintype.card α * ∑ p, ω pFormalism.FrobeniusOrbits.hostTopstheoremFrobeniusOrbitsProofs/ThickFrames.lean:55Its proof: the expectation of a variance term plus the normalised bad count is at most , so some has both small.
theorem hostTops : HostTops
Its proof: the expectation of a variance term plus the normalised bad count is at most , so some has both small.
Excerpt: the first 60 of 104 lines
theorem hostTops : HostTops := by
intro α ι _ _ δ β ω BAD hδ hδ1 hβ hω hn hBAD
set n : ℝ := (Fintype.card α : ℝ) with hn_def
set M : ℝ := β * δ * n * ∑ p, ω p with hM_def
set X : Finset α → ℝ := fun T => ∑ p, ω p * ((T.filter (fun t => BAD p t T)).card : ℝ)
with hX_def
have hb0 : ∀ T : Finset α, 0 ≤ bern δ T := bern_nonneg hδ.le hδ1
have hX0 : ∀ T, 0 ≤ X T := fun T => sum_nonneg fun p _ => mul_nonneg (hω p) (Nat.cast_nonneg _)
have hM0 : 0 ≤ M := by
have : 0 ≤ ∑ p, ω p := sum_nonneg fun p _ => hω p
have : 0 ≤ n := Nat.cast_nonneg _
positivity
have hc : ∀ p (T : Finset α), ((T.filter (fun t => BAD p t T)).card : ℝ) =
∑ t, if t ∈ T ∧ BAD p t T then (1 : ℝ) else 0 := by
intro p T
rw [Finset.sum_boole]
congr 2
ext t
simp
have hEX : ∑ T, bern δ T * X T ≤ M := by
calc ∑ T, bern δ T * X T
= ∑ T : Finset α, ∑ p, ∑ t, ω p * (if t ∈ T ∧ BAD p t T then bern δ T else 0) := by
refine sum_congr rfl fun T _ => ?_
simp only [X, hc, mul_sum]
refine sum_congr rfl fun p _ => sum_congr rfl fun t _ => ?_
split_ifs <;> ring
_ = ∑ p, ∑ t, ω p * ∑ T : Finset α, (if t ∈ T ∧ BAD p t T then bern δ T else 0) := by
rw [sum_comm]
refine sum_congr rfl fun p _ => ?_
rw [sum_comm]
simp only [mul_sum]
_ ≤ ∑ p, ∑ _t : α, ω p * (β * δ) :=
sum_le_sum fun p _ => sum_le_sum fun t _ => mul_le_mul_of_nonneg_left (hBAD p t) (hω p)
_ = M := by
simp only [hM_def, hn_def, sum_const, card_univ, nsmul_eq_mul, mul_sum]
refine sum_congr rfl fun p _ => ?_
ring
have hA : ∑ T : Finset α, (if 4 * M < X T then bern δ T else 0) ≤ 1 / 4 := by
have key : 4 * M * ∑ T : Finset α, (if 4 * M < X T then bern δ T else 0) ≤ M := by
rw [mul_sum]
refine le_trans (sum_le_sum fun T _ => ?_) hEX
split_ifs with h
· nlinarith [hb0 T]
· simp only [mul_zero]; exact mul_nonneg (hb0 T) (hX0 T)
rcases hM0.lt_or_eq with hpos | hzero
· nlinarith
· have hsum0 : ∑ T, bern δ T * X T = 0 :=
le_antisymm (hzero ▸ hEX) (sum_nonneg fun T _ => mul_nonneg (hb0 T) (hX0 T))
have hall := (Finset.sum_eq_zero_iff_of_nonneg
(fun T _ => mul_nonneg (hb0 T) (hX0 T))).mp hsum0
have : ∑ T : Finset α, (if 4 * M < X T then bern δ T else 0) = 0 := by
refine sum_eq_zero fun T _ => ?_
split_ifs with h
· have hXT : 0 < X T := by rw [← hzero] at h; linarith
have := hall T (mem_univ _)
rcases mul_eq_zero.mp this with h' | h'
· exact h'
· linarith
…The complete declaration runs to line 158 of Formalism/FrobeniusOrbits/FrobeniusOrbitsProofs/ThickFrames.lean in the archive; the statement above is its full header.
UpperTheory.BernoulliSumsFrobeniusOrbits.topsChoiceHtheoremThickFrames/topsChoiceH.lean:30The application: for the scale , ranks and a host , a set of labels with , bad orbits controlled, and the shares condition of the frame.
theorem UpperTheory.BernoulliSumsFrobeniusOrbits.topsChoiceH : ∀ eps C8 : ℝ, 0 < eps → eps < 1 / 52 → ∃ Cb x0 : ℝ, 0 < Cb ∧ ∀ (s : Scale) (R : Ranks) (H : Host R), s.eps = eps → x0 ≤ s.x → RankVal s R → HostConst s C8 H → (∃ Y : ℝ, PairWin s Y ∧ PairRow Y s.eps H) → ∃ TT : Finset R.A, s.delta1 * R.n / 2 ≤ (TT.card : ℝ) ∧ (TT.card : ℝ) ≤ 2 * s.delta1 * R.n ∧ BadOK s Cb { H with TT
The application: for the scale , ranks and a host , a set of labels with , bad orbits controlled, and the shares condition of the frame.
Full declaration with proof
theorem UpperTheory.BernoulliSumsFrobeniusOrbits.topsChoiceH :
∀ eps C8 : ℝ, 0 < eps → eps < 1 / 52 → ∃ Cb x0 : ℝ, 0 < Cb ∧ ∀ (s : Scale) (R : Ranks) (H : Host R), s.eps = eps → x0 ≤ s.x →
RankVal s R → HostConst s C8 H → (∃ Y : ℝ, PairWin s Y ∧ PairRow Y s.eps H) →
∃ TT : Finset R.A, s.delta1 * R.n / 2 ≤ (TT.card : ℝ) ∧ (TT.card : ℝ) ≤ 2 * s.delta1 * R.n ∧
BadOK s Cb { H with TT := TT } ∧ R.toFrame.Shares TT (s.x ^ (-1 + eps)) := by
intro eps C8 heps heps52
obtain ⟨Cb, x0, hCb, hT⟩ := topsBase eps (max C8 2) heps heps52
(le_trans (by norm_num) (le_max_right _ _))
refine ⟨Cb, x0, hCb, ?_⟩
intro s R H hse hx hRV hHC hex
obtain ⟨Y, hPW, hPR⟩ := hex
obtain ⟨⟨hn1, hn2⟩, _, ⟨hk1, hk2⟩, _⟩ := hRV
obtain ⟨hJ, ho, hQS⟩ := hHC
rw [hse] at hn1 hn2 hk1 hk2 hPR
have hCo1 : C8 ≤ max C8 2 := le_max_left _ _
have hCo2 : (2 : ℝ) ≤ max C8 2 := le_max_right _ _
have hx1 : 1 < s.x := s.one_lt_alt
have hJ1 : 1 ≤ s.J := s.one_le_J
have hkron := hPR.2.2.2.2.2.2.2.2.2.1
have hsmall : s.x ^ (eps / (5 * max C8 2)) ≤ Y ^ (eps / 5) := by
calc s.x ^ (eps / (5 * max C8 2)) = (s.x ^ (1 / max C8 2)) ^ (eps / 5) := by
rw [← Real.rpow_mul (by linarith)]
congr 1
field_simp
_ ≤ (s.x ^ (1 / s.J)) ^ (eps / 5) :=
Real.rpow_le_rpow (Real.rpow_nonneg (by linarith) _)
(Real.rpow_le_rpow_of_exponent_le hx1.le
(one_div_le_one_div_of_le (by linarith) (by linarith))) (by positivity)
_ ≤ Y ^ (eps / 5) := Real.rpow_le_rpow (Real.rpow_nonneg (by linarith) _) hPW.1 (by positivity)
have hC0 : ∀ p : ℕ, p.Prime → (baseOf s 0 0 H).IsResidueClassZero p → s.x ^ (eps / (5 * max C8 2)) < p := by
intro p hp hc
exact lt_of_le_of_lt hsmall (lt_of_classC0' H hp hc hkron)
have hxe : 0 ≤ s.x ^ (2 + 8 * eps) := Real.rpow_nonneg (by linarith) _
obtain ⟨TT, h1, h2, h3, h4⟩ := hT (baseOf s 0 0 H) (hPH H) hse hx (by
show s.x ^ (2 + 8 * eps) / 2 ≤ (R.n : ℝ)
linarith)
(le_trans hn2 (mul_le_mul_of_nonneg_right hCo2 hxe)) (le_trans ho hCo1) hk2 hC0
exact ⟨TT, h1, h2, h4, h3⟩Closing the loop with chapter 6
Chapter 6 ended with the contract TopGUpperTheory.Top.TopGdefCharacterBoxes/ZeroFreeAllOfTopG.lean:12def TopG : Prop: for every requirement a host satisfies, the family of -functions it serves is “class-connected”, meaning its statistic obeys the window bound on the scales of the family. The heart delivers this contract in three moves, and the archive’s final assembly is short enough to read.
UpperTheory.Comparison₂.core_gmtheoremPrimitiveCosets/CoreGm.lean:12The bound on in the archive (Estimates A, B and C assembled): for a level and exponents of the error bracket, there is such that for , every host and label set satisfying the host condition `EAtH` and the core comparison `CoreAtH` give for the family statistic of chapter 6. The proof assembles `ch_top` (chapter 11) with the character-sum identity and the estimates B and C at the host.
theorem UpperTheory.Comparison₂.core_gm : ∀ (Λ : Level) (eD eL K cHH eK C eps : ℝ), 0 < eps → ∃ x1 : ℝ, ∀ x ≥ x1, ∀ (φ : Frame) (H : HostAx φ) (TT : Finset φ.A), EAtH Λ H.toHostRaw TT x eps C → CoreAtH H.toHostRaw TT eD eL K cHH eK eps x → Λ.Gm x ≤ x ^ ((1 : ℝ) / 2 + (eD + eL + 7) * eps)
The bound on in the archive (Estimates A, B and C assembled): for a level and exponents of the error bracket, there is such that for , every host and label set satisfying the host condition `EAtH` and the core comparison `CoreAtH` give for the family statistic of chapter 6. The proof assembles `ch_top` (chapter 11) with the character-sum identity and the estimates B and C at the host.
Excerpt: the first 60 of 63 lines
theorem UpperTheory.Comparison₂.core_gm :
∀ (Λ : Level) (eD eL K cHH eK C eps : ℝ), 0 < eps → ∃ x1 : ℝ, ∀ x ≥ x1, ∀ (φ : Frame) (H : HostAx φ) (TT : Finset φ.A),
EAtH Λ H.toHostRaw TT x eps C → CoreAtH H.toHostRaw TT eD eL K cHH eK eps x →
Λ.Gm x ≤ x ^ ((1 : ℝ) / 2 + (eD + eL + 7) * eps) := by
intro Λ eD eL K cHH eK C eps heps
have ho : (0 : ℝ) ≤ Λ.o := Nat.cast_nonneg _
have hc : |(3 * (Λ.o : ℝ) + 1)⁻¹| ≤ 1 := by
rw [abs_of_nonneg (by positivity)]
exact inv_le_one_of_one_le₀ (by linarith)
obtain ⟨x₁, hx₁⟩ := Deduction.ch_core (max (eD + eL) 0 + 3) eps C (koOf Λ) (3 * (Λ.o : ℝ) + 1)⁻¹ (4 * (Λ.o : ℝ))
(by positivity) heps hc
obtain ⟨x₂, hx₂⟩ := large_x_eventually eps K cHH eK heps
obtain ⟨x₃, hx₃⟩ := Filter.eventually_atTop.1
((tendsto_rpow_atTop heps).eventually_ge_atTop (1 + 4 * (Λ.o : ℝ)))
refine ⟨max x₁ (max x₂ x₃), fun x hx φ H TT hE hCore => ?_⟩
have g1 : x₁ ≤ x := le_trans (le_max_left _ _) hx
have g2 : x₂ ≤ x := le_trans (le_trans (le_max_left _ _) (le_max_right _ _)) hx
have g3 : x₃ ≤ x := le_trans (le_trans (le_max_right _ _) (le_max_right _ _)) hx
obtain ⟨U0, i0, tr, W, i4, i5, Top, i6, m, f, Dd, Cc, Xpp, ell, N, T2, a, w, eT, eP, η, X', θ,
hell, hxx, hε, heD, heL, hcHH, hcov, hId, hLed, hWin, hBN, hSz, hThin, hCost, hRest, hT2⟩ := hCore
subst hxx hε
have hLX := hx₂ _ g2
have hWin' := hWin
obtain ⟨⟨w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15, w16, w17, w18, w19, w20, w21, w22,
w23, w24, w25, w26, w27, wC⟩, wEta⟩ := hWin'
obtain ⟨c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17⟩ := wC
have hLX' : LargeX Dd.x Dd.ε K Cc.cHH eK := by
refine ⟨hLX.1, le_trans ?_ hLX.2⟩
unfold KBig
exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left (by linarith) (by positivity)) (by linarith)
have hb : 0 < Dd.b := by linarith
have hx0 : 0 < Dd.x := by linarith
have hk : 0 < Dd.k := by linarith
have ha : 0 ≤ Dd.a := le_trans (by positivity) w5
have hE0 : 0 ≤ eD + eL := by linarith
rw [max_eq_left hE0] at hx₁
have hBr : 0 ≤ errorBracketSizeWindows Dd.x Dd.ε (Fintype.card φ.A) TT.card T2.card m Dd.b Dd.k Dd.a := by
unfold errorBracketSizeWindows
positivity
have hExp : Dd.x ^ (CErr Cc * Dd.ε) ≤ Dd.x ^ ((eD + eL + 3) * Dd.ε) := by
refine Real.rpow_le_rpow_of_exponent_le w1 (mul_le_mul_of_nonneg_right ?_ w2.le)
unfold CErr
linarith
have hmain := hx₁ _ g1 φ.A m (arith H.toHostRaw) _ ell N TT T2 a w Dd.b Dd.b' Dd.k Dd.a η X' θ φ.A0
(keptA Λ H.toHostRaw) (hostFactsS φ H) hb ha hk w7 w8 hSz hThin hCost hRest hT2
(charsA Λ φ H TT _ _ C ell hx0 hE hell) (fun u hu => by
obtain ⟨v, rfl⟩ := hcov u hu
exact le_trans (Deduction.ch_top Dd tr Cc Xpp eK K _ ell N TT T2 a w eT eP hId hLed hWin hBN hLX' v)
(mul_le_mul_of_nonneg_right hExp hBr))
rw [gmA_eq Λ φ H TT _ _ C ell hE hell] at hmain
have hs := sigA_le Λ φ H TT _ _ C ell hx0 hE hell
have h1 : Dd.x ^ ((1 : ℝ) / 2 + Dd.ε) ≤ Dd.x ^ ((1 : ℝ) / 2 + (eD + eL + 3 + 3) * Dd.ε) :=
Real.rpow_le_rpow_of_exponent_le w1 (by nlinarith)
have h2 : Dd.x ^ ((1 : ℝ) / 2 + (eD + eL + 7) * Dd.ε)
= Dd.x ^ Dd.ε * Dd.x ^ ((1 : ℝ) / 2 + (eD + eL + 3 + 3) * Dd.ε) := by
rw [← Real.rpow_add hx0]
congr 1
ring
have h3 := mul_le_mul_of_nonneg_right (hx₃ _ g3)
(Real.rpow_nonneg hx0.le ((1 : ℝ) / 2 + (eD + eL + 3 + 3) * Dd.ε))
…The complete declaration runs to line 74 of Development/AutomorphicArithmetic/PrimitiveCosets/CoreGm.lean in the archive; the statement above is its full header.
Formalism.HC.EAtHstructureTotientGaloisClasses/ExplicitFormulaErrorOfHostConditions.lean:144The host condition: the orders agree, the kept characters are those of the level, the shares condition on , the pointwise bound of Estimate B for the kept characters at scale , and for them.
structure EAtH (Λ : Level) {φ : Frame} (H : HostRaw φ) (TT : Finset φ.A) (x eps C : ℝ) : Prop
The host condition: the orders agree, the kept characters are those of the level, the shares condition on , the pointwise bound of Estimate B for the kept characters at scale , and for them.
Full declaration with proof
structure EAtH (Λ : Level) {φ : Frame} (H : HostRaw φ) (TT : Finset φ.A) (x eps C : ℝ) : Prop where
o_eq : φ.o = Λ.o
kept : H.KeptInXp Λ.KEPT
ps : H.ExceptionalCharacterKept Λ.KEPT Λ.psK
shares : φ.Shares TT (x ^ (-1 + eps))
bdG : H.BoundedCharsPointwise Λ.KEPT x eps
bdL : ∀ θ ∈ H.Bounded Λ.KEPT, ∀ (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N), H.IsPrimOf θ χ →
‖An.logDerivativeAtOne χ‖ ≤ C * Real.log xUpperTheory.Comparison₂.CoreAtHdefPrimitiveCosets/CoreAtH.lean:29The core comparison at a host: the existence of translates, words, labels, the weighted-mean record `Data` of chapter 11 with its constants, the character , the sets and the weights, compatible with the host.
def CoreAtH (H : HostRaw φ) (TT : Finset φ.A) (eD eL K cHH eK eps x : ℝ) : Prop
The core comparison at a host: the existence of translates, words, labels, the weighted-mean record `Data` of chapter 11 with its constants, the character , the sets and the weights, compatible with the host.
Full declaration with proof
def CoreAtH (H : HostRaw φ) (TT : Finset φ.A) (eD eL K cHH eK eps x : ℝ) : Prop :=
∃ (U0 : Type) (_ : Fintype U0) (tr : U0 → φ.A)
(W : U0 → Type) (_ : ∀ u0, Fintype (W u0)) (_ : ∀ u0, Nonempty (W u0)) (Top : Type) (_ : Fintype Top)
(m f : ℕ) (Dd : Data U0 W Top m f) (C : Consts) (Xpp : ℝ)
(ell : AddChar (E0 × φ.A) ℂ → ℂ) (N : ℕ) (T2 : Finset φ.A) (a : φ.A → ℝ)
(w : φ.A → Fin m → E0 × φ.A → ℝ) (eT : Top ≃ TT) (eP : Fin f ≃ PhiSet (H := φ.A)) (η X' θ : ℝ),
HostAddCharCompatible H ell ∧ Dd.x = x ∧ Dd.ε = eps ∧ C.eDiv ≤ eD ∧ C.eLoss ≤ eL ∧ C.cHH ≤ cHH ∧
(∀ s ∈ φ.A0, ∃ u, tr u = s) ∧ IdentU Dd tr (arith H) N ell TT a w eT eP ∧
Formalism.LFunctionChainParameters.LChain.SizeData₂ Dd C Xpp ∧ ErrWindows Dd C Xpp eK K ∧ BNBoundsU Dd T2 ∧
SizesA φ.A0 TT T2 a w N x Dd.b Dd.b' η X' θ ∧ ThinScales (arith H) ell X' θ ∧
CostWindows x (fPl φ.A) Dd.b η θ ∧
RestSize eps x (Fintype.card φ.A) TT.card T2.card m Dd.b Dd.k Dd.a ∧
∀ s ∈ T2, s ∈ φ.A0UpperTheory.Top.GChidefCharacterBoxes/Supply.lean:42The requirement for a character : `EAtH` at the level of with constant , and the cohomological bound for the host's field.
def GChi (ψ : PChar) : FReq
The requirement for a character : `EAtH` at the level of with constant , and the cohomological bound for the host's field.
Full declaration with proof
def GChi (ψ : PChar) : FReq := fun s _ H TT t => EAtH (Level.cyc ψ) H.toHostRaw TT s.x s.eps 4 ∧ VVle H.E t (Real.sqrt s.b)
UpperTheory.Top.supplyChitheoremCharacterBoxes/SupplyChi.lean:8From the cohomological window for , a host that meets the requirement at the scale .
theorem UpperTheory.Top.supplyChi : ∀ ψ : PChar, VWinAt ψ 401 → HostExW (3 / 2) (GChi ψ).req
From the cohomological window for , a host that meets the requirement at the scale .
Full declaration with proof
theorem UpperTheory.Top.supplyChi :
∀ ψ : PChar, VWinAt ψ 401 → HostExW (3 / 2) (GChi ψ).req := by
intro ψ hψ
refine supplyOfAdm ψ hψ ?_
intro eps he0 he1
obtain ⟨x0, hx0⟩ := admissibleClassesTwistedChar eps he0 he1
refine ⟨x0, fun s φ H0 hs hx hlo hhi _ _ => ?_⟩
subst hs
exact hx0 s φ H0 rfl hx hlo hhiUpperTheory.Top.shapeWintheoremCharacterBoxes/ShapeWin.lean:27The theorem that proves `TopG` from Green's theorem and the long list of links of the construction (sizes, divisibility, denominators, ranks); its hypotheses are the quoted statements of chapters 13 to 15.
theorem UpperTheory.Top.shapeWin : GlobalTheory.GLq.Green → GlobalTheory.Fc.TopShape True True (fun 𝒞 => Closed 𝒞 fun Fm _ => LinkN Fm) UpperTheory.Top.TopG
The theorem that proves `TopG` from Green's theorem and the long list of links of the construction (sizes, divisibility, denominators, ranks); its hypotheses are the quoted statements of chapters 13 to 15.
Full declaration with proof
theorem UpperTheory.Top.shapeWin : GlobalTheory.GLq.Green → GlobalTheory.Fc.TopShape True True (fun 𝒞 => Closed 𝒞 fun Fm _ => LinkN Fm) UpperTheory.Top.TopG := by
intro hGreen 𝒜 cT hEx sel hduty selS selP selDH selC selB hRB hTw hPA hLamP hDivG hDcPtG hTu hn4 hLit hVC hWu hRF hTF c30 hc30 sTy sNG sM sLp sO h30 hInstR selJ jOn hMt rRows aPt0 aPtTw aPer0 aPerTw aP10 aAtG aC2 hServ nR nRest cIc hcI irrC zL tie hU hG la G hla hH hV
have hgl := GlobalTheory.Top.link_gl 𝒜 hduty tie hU hG
have bRest := GlobalTheory.Top.link_brest 𝒜 sel selS selP selDH selC selB hRB hPA hDivG hDcPtG rRows tie
have hCsz : Closed (D3 3 𝒜) fun Fm _ => 0 ≤ Fm.Csz := Formalism.MainNotions.DIV.closed_Csz_ge_fn (D3 3 𝒜) fun _ => 0
have oneMap : Closed (D3 3 𝒜) fun Fm _ => ∀ hc : D3 3 𝒜 Fm, EvSel sel Fm (d3_a hc) ((OneMapOf selB) Fm (d3_a hc)) :=
Closed.of_class fun Fm _ _ hc => ⟨0, fun x hx h _ i j => (hRB Fm (d3_a hc) x hx h i).oneMap j⟩
have hA2 := GlobalTheory.Top.closed_family_admissible_twist_link 𝒜 sel aPt0 aPtTw aPer0 aPerTw aP10 aAtG hServ
have hC5 := GlobalTheory.Top.selection_closed_of_wu_decay 𝒜 sel selS selP selDH selC selB hWu hRF selJ jOn rRows
have hBR : Closed (D3 3 𝒜) fun Fm CH => ∀ hc : D3 3 𝒜 Fm, TuSize Fm → DGamSize Fm →
Formalism.L2.DIV.BridgeRowsK Fm (RkOf sel selS selP selDH selC (selKOf selB) (selIOf selB) hPA Fm hc) 2 CH :=
(bRest.and ((Closed.of_class fun Fm _ hc => cut_of_stable (hMt Fm (d3_a hc))).and (rRows.and (oneMap.and (hCsz.and (hA2.and (aC2.and hC5))))))).imp
fun Fm CH _ ⟨r, o, rr, om, cz, a, c, c5⟩ hc hT hD =>
(r hc hT hD).toRows (fun hN => GlobalTheory.Top.wire_sel 𝒜 sel selS selP selDH selC selB hTw hPA hDivG hDcPtG Fm hc CH cz hD (rr hc) (om hc) (r hc hT hD).bu hN) o a (complement_two_of_items c) c5
have hDIV := Formalism.L2.DIV.linkDIVt_closedK (D3 3 𝒜) 2 (RkOf sel selS selP selDH selC (selKOf selB) (selIOf selB) hPA) hBR
have hsub : ∀ {eps : ℝ} (Fm : FamP eps), WithTw (WithSm (WithChN fun Fm => 𝒜 Fm ∧ G.cls la Fm)) Fm →
WithTw (WithSm (WithChN 𝒜)) Fm := fun _ hc => ⟨⟨⟨hc.1.1.1.1, hc.1.1.2⟩, hc.1.2⟩, hc.2⟩
have hE := GlobalTheory.Top.link_ex (fun Fm => 𝒜 Fm ∧ G.cls la Fm) cT (fun hM => hEx hM la G hla hH) (fun Fm hc => sel Fm hc.1)
(fun Fm hc => hduty Fm hc.1) (Pk.Closed.sub hTu hsub) (Pk.Closed.sub hn4 hsub) hLit
exact UpperTheory.Top.topDesWin (WithChN 𝒜) (WithChN fun Fm => 𝒜 Fm ∧ G.cls la Fm) (G.cls la) 2 3 2 0 hE
(fun _ hc => ⟨hc.1.1, hc.2⟩) (fun _ hc => hc.1.2) hV nRest (GlobalTheory.Top.link_eta 𝒜 sel hduty)
(GlobalTheory.Top.Irr.link_irr hGreen 𝒜 sel cIc hcI irrC) (GlobalTheory.Top.smallLevelRankEq_closed_of_levelProjection_surjective 𝒜 sel selS selP selDH selC selB hPA hLamP hDivG zL) hDIV hgl.1 (GlobalTheory.Top.link_g 𝒜 sel hduty)
(GlobalTheory.Top.link_alt 𝒜 sel selS hWu hRF hTF c30 hc30 sTy sNG sM sLp sO h30 hInstR) hgl.2UpperTheory.Top.plugWintheoremCharacterBoxes/EveryCharacter.lean:8The assembly: Green's theorem, the cohomological window `VWin` and the closed family of links give `ZeroFreeAll`, by `zeroFreeAll_of_topG` applied to `shapeWin` (for `TopG`) and `supplyChi` (for the hosts). Chapter 5's `imprimitive` then gives every character.
theorem UpperTheory.Top.plugWin (hG : GlobalTheory.GLq.Green) (hV : UpperTheory.Top.VWin) (h : Nonempty (Hyps (fun 𝒞 => Closed 𝒞 fun Fm _ => LinkN Fm) DRS)) : Formalism.HC.ZeroFreeAll
The assembly: Green's theorem, the cohomological window `VWin` and the closed family of links give `ZeroFreeAll`, by `zeroFreeAll_of_topG` applied to `shapeWin` (for `TopG`) and `supplyChi` (for the hosts). Chapter 5's `imprimitive` then gives every character.
Full declaration with proof
theorem UpperTheory.Top.plugWin (hG : GlobalTheory.GLq.Green) (hV : UpperTheory.Top.VWin)
(h : Nonempty (Hyps (fun 𝒞 => Closed 𝒞 fun Fm _ => LinkN Fm) DRS)) : Formalism.HC.ZeroFreeAll :=
h.elim fun h => UpperTheory.Top.zeroFreeAll_of_topG (la := 3 / 2) (by norm_num)
(GlobalTheory.Fc.shape_of _ _ _ _ (UpperTheory.Top.shapeWin hG) trivial trivial h) fun ψ => UpperTheory.Top.supplyChi ψ (hV ψ)UpperTheory.Top.FamilyClassConnecteddefCharacterBoxes/DivinNOfHypV.lean:13The conclusion of `TopG` for a family class: exponents and a threshold such that for every some family in the class is chain-tied at every large in its windows.
def FamilyClassConnected (ℰ : FamClass) : Prop
The conclusion of `TopG` for a family class: exponents and a threshold such that for every some family in the class is chain-tied at every large in its windows.
Full declaration with proof
def FamilyClassConnected (ℰ : FamClass) : Prop :=
∃ eD eL ε₁ : ℝ, 0 < ε₁ ∧ ∀ eps : ℝ, 0 < eps → eps < ε₁ →
∃ Fm : FamP eps, ℰ Fm ∧ ∃ K cHH eK CL x0 : ℝ, ∀ x ≥ x0, x ∈ Fm.Win → ChainTied Fm eD eL K cHH eK CL xour exposition The theorem shapeWin has a hypothesis list that runs to several dozen named links; the exposition’s Part III proves the analytic parts of several of them (the size estimates, the trace-formula deductions, the passage from the Galois-cohomology bound to denominators) from named statements of the archive and leaves the construction of the maps and weights, and the assembly of (M), quoted. Chapters 13 to 15 explain the three groups of links that remain.
The exposition's status table for this chapter
Estimate B: proved in his Part III, §III.1 from four cited theorems on Dirichlet -functions (a zero-density estimate near , mean-square estimates over the modulus, and the standard explicit formula inputs). Estimate C: proved in §III.2 from three cited theorems and part (e) of Theorem III.1.1. The sets and : constructed with proof in §III.3; their use in (M) belongs to the part not yet written. He checked that the Lean proofs these sections follow (QH.thinH, twistK, meanSqK, bad_share, tailK, count_bad, hostThickExists, topsChoiceH) are all among the declarations the final theorem depends on.