The blueprint#

The reading project traced the archive’s proof of the five exports through a map of 109 nodes — 107 Lean declarations and 2 ideas from the announcement — connected by 113 labelled edges (calls, statement dependencies, bundle fields, supporting lemmas, analogies). Each declaration is pinned to exact lines of the public mirror of the archive and comes with a contract in mathematical language and an idea of its proof. This book assigns every declaration to exactly one of the fourteen components and gives it a verification tier computed from the receipts (see The verification ledger).

The static rendering below is wide: scroll it horizontally, or click it to open the SVG; the interactive graph is in the atlas ↗

Blueprint graph: 109 nodes

Fig. 14 Blueprint graph: 109 nodes. Layered dependency graph of the reading project’s blueprint: suppliers on the left, the five endpoints on the right; bar colour = stratum, dot colour = verification tier.#

Tier

Nodes

✓✓ two kernels

Checked by two kernels

5

✓ kernel-checked

Kernel-checked at the archive pin

18

⊂ in checked closure

Inside a checked closure

19

◇ source-read

Source-read

65

○ motivation

Motivation

2

Kinds of node: reducer (58), producer (17), definition (13), lemma (9), export (5), wrapper (3), motivation (2), bundle (1), alternative (1).
Kinds of edge: calls (85), statement (16), support (6), bundle-field (3), analogy (2), alternative (1).

Itineraries#

The reading project proposes 5 paths through the blueprint, each answering one question.

1. Read the last page of the proof first. How does a right-half-plane estimate imply ordinary RH?

  1. Mathlib RH — riemannHypothesis ✓✓ two kernels · Every nontrivial zeta zero distinct from the pole has real part one half. (component 1, The five endpoints)

  2. The two zeta exports share a proof — rhOfAll ◇ source-read · RiemannHypothesis. (component 1, The five endpoints)

  3. Specialize at modulus one — Formalism.VW.rh_of_every ◇ source-read · EveryCharacter implies RiemannHypothesis. (component 2, Reflection)

  4. Reflect a zeta zero — Formalism.VW.rh_of_right ✓ kernel-checked · Right-half-plane zeta nonvanishing away from one implies Mathlib RH. (component 2, Reflection)

2. Find the mathematical estimate. How wide must the intervals be, and where does the loss in the exponent come from?

  1. Produce primitive zero-free levels — UpperTheory.Top.zeroFreeAll_of_topG ✓ kernel-checked · For λ>1, TopG and hosts for every primitive character imply ZeroFreeAll. (component 7, The order of choices)

  2. Choose epsilon after a candidate zero — Formalism.HC.level_of_tiedWin ⊂ in checked closure · At any level, the chosen uniform arithmetic window and the analytic criterion imply zero-freeness right of one half. (component 7, The order of choices)

  3. The prime-sum inequality on tied families — UpperTheory.Comparison₂.level_gm_le_on_family_scales ⊂ in checked closure · For every level, tied compatible families yield the windowed upper bound on the weighted prime sum. (component 8, The finite character comparison)

  4. From the height discrepancy to the prime sum — UpperTheory.Comparison₂.core_gm ✓ kernel-checked · For large x, EAtH and CoreAtH imply G_P(x)≤x^(1/2+(eD+eL+7)ε). (component 8, The finite character comparison)

  5. Choose a common geometric family — UpperTheory.Top.shape_closed_link_n_of_green ◇ source-read · Green implies the specified TopShapeAlt ending in TopG. (component 9, The geometric family and the theta chain)

  6. Combine divisibility, slopes and windows — UpperTheory.Top.topDesWin ◇ source-read · The listed existence, local, rank, divisibility, global and slope controls produce FamilyClassConnected. (component 9, The geometric family and the theta chain)

3. Find who supplies the arithmetic. Which assertion has to produce the compatible Galois, theta and cohomology data?

  1. Closed half-plane assembly — UpperTheory.FinalTheorems.everyCharacter ◇ source-read · EveryCharacter with no explicit arithmetic premise. (component 14, Seven inputs at the decisive call)

  2. The half-plane theorem from one row — UpperTheory.FinalTheorems.everyCharacter_of_row ◇ source-read · Row0b with the specified local parameter convention implies EveryCharacter. (component 14, Seven inputs at the decisive call)

  3. Producer of the Galois row — UpperTheory.Gal.Int.galoisLocalGlobalStrong_recParameter ◇ source-read · Row0b recT with no explicit global premise. (component 13, The Galois row)

  4. Assemble the automorphic inputs — UpperTheory.LiteratureTheorems.every_character_of_literature_of_vWin ◇ source-read · OpenLiteratureStatements and VWin imply EveryCharacter. (component 14, Seven inputs at the decisive call)

  5. Seven inputs for every character — UpperTheory.Lit.every_character_of_theta_integrals_local_matching ◇ source-read · The seven groups of hypotheses imply EveryCharacter. (component 14, Seven inputs at the decisive call)

  6. Cohomological window from the row — UpperTheory.One.vwin_of_row ◇ source-read · Row0b in the stated convention implies VWin. (component 11, The cohomological window)

  7. Produce the four counting bounds — UpperTheory.V.HV.DescentVanishingReductions.vwin_of_hypotheses_H_E_alt ◇ source-read · HypothesesH′ imply VWin. (component 11, The cohomological window)

4. Follow a singular twist and an arbitrary finite prime sum. Which bound controls a twist of unbounded abstract length, and how can one estimate work over every allowed finite set of coefficient primes?

  1. Produce the four counting bounds — UpperTheory.V.HV.DescentVanishingReductions.vwin_of_hypotheses_H_E_alt ◇ source-read · HypothesesH′ imply VWin. (component 11, The cohomological window)

  2. Supply the absolute bound for the reference layer — UpperTheory.V.ZK.lemmaK_litN_alt ◇ source-read · One real exponent bounds the logarithm of the order of \(H^2(G_{L,S},\mathbb Z_\ell(e+1))\) over all eligible fields, coefficient primes and positive twists. Each such group is finite. (component 11, The cohomological window)

  3. Combine the cohomology counts — UpperTheory.V.HV.Core.of_four_alt ◇ source-read · Rank-N input, an existential K bound and CountI, CountII, CountIII, CountV imply VWin. (component 11, The cohomological window)

  4. Assemble the arithmetic tower window — UpperTheory.V.Win.thmBab_of_lemmaK ✓ kernel-checked · One package of constants works at every cutoff exponent Ct ≥ 1. (component 11, The cohomological window)

  5. From a finitely generated tower to two length bounds — UpperTheory.V.PropA.aBound_of_isTower ✓ kernel-checked · For each prime and eligible tower, ABound consists of a bound away from finitely many centres and a bound in terms of a fixed layer. (component 11, The cohomological window)

  6. Control exceptional twists by the fixed layer — UpperTheory.V.PropA.aBound_of_descends ⊂ in checked closure · The lengths are controlled by at most R ℓ-adic centres. For all twists they are also bounded by the fixed-layer H² length plus R times the excess layer index. (component 11, The cohomological window)

  7. Choose one set of tower constants — UpperTheory.V.Win.thmBab_of ✓ kernel-checked · There exists a single BConst K such that every Ct ≥ 1 satisfies ThmBab K Ct. (component 11, The cohomological window)

  8. Case I gives one bound across coefficient primes — UpperTheory.V.Z.J.count_i_of_printed_bound_k_kato_automorphy ◇ source-read · Away from the exceptional set, when ℓ−1 does not divide twice the twist, the sum over every allowed finite set of coefficient primes obeys one polynomial bound. (component 11, The cohomological window)

  9. A nonzero integer controls one character orbit — UpperTheory.V.Z.J.propGK_of_numberU3U_of_oneCharU ◇ source-read · For a fixed imaginary quadratic field, twist, character kernel and admissible auxiliary prime, one nonzero integer gives a logarithmic size bound and simultaneous valuation bounds at the other eligible primes. (component 11, The cohomological window)

  10. Convert the joint window into VWin — UpperTheory.V.HV.vwin_of_counts ◇ source-read · The tower window, sign bounds and five counting inputs yield VWin, the cohomology estimate for each primitive character at cutoff exponent 401. (component 11, The cohomological window)

  11. Reuse the tower interval for the positive part — UpperTheory.V.HV.jointWin_of_counts ◇ source-read · For each eligible choice of character and parameters, one interval satisfies both the tower and positive-part bounds at every point. (component 11, The cohomological window)

  12. Combine the two prime sums at a point — UpperTheory.V.HV.pointHV_of_counts ◇ source-read · After the character and layer indices are fixed, one polynomial bound controls the positive cohomological sum on eligible hosts, with an additive multiple of the layer budget. (component 11, The cohomological window)

  13. Add contributions inside the exceptional set — UpperTheory.V.HV.sumIn ◇ source-read · For fixed character, exceptional coefficient prime and layer index, the positive-part sum at that prime is at most (Nt)^C + C·B when the fixed layer satisfies its budget B. (component 11, The cohomological window)

  14. Bound the sum over arbitrary finite sets of other primes — UpperTheory.V.HV.sumOut ◇ source-read · Choose a common exponent and two auxiliary primes before the host. The positive-part sum over every allowed finite set of nonexceptional odd primes is at most (Nt)^C. (component 11, The cohomological window)

5. Recover the centering constant in the ordinary zeta window. Why is the linear correction (1+γ)x?

  1. The first moment of the Chebyshev error — Formalism.HermitianLattices.GL2a2.PsiZeroConst ⊂ in checked closure · The truncated integral of (ψ(t)−t)/t² from 1 to U tends to −1−γ as U tends to infinity. (component 4, The centered prime sum)

  2. Evaluate the first moment — Formalism.HermitianLattices.GL2a2.psi_zero_integral_constant ✓ kernel-checked · The archive supplies its first-moment limit without an RH assumption. (component 4, The centered prime sum)

  3. Match the two limits at one — psiZeroConst_main ⊂ in checked closure · For the trivial character modulo one the Chebyshev remainder has first moment −1−γ. (component 4, The centered prime sum)

  4. Dominate the centered character sum — sw_bound ⊂ in checked closure · For each fixed character, the centered von Mangoldt sum is eventually bounded in norm by Kt/log²t. (component 4, The centered prime sum)

  5. Pass the Mellin integral to σ = 1 — core_tendsto ⊂ in checked closure · A logarithmic remainder bound lets σ times the weighted integral tend to its value at σ=1 from the right. (component 4, The centered prime sum)

  6. Read Euler’s constant from the logarithmic derivative — zeta_logderiv_limit ⊂ in checked closure · As complex s tends puncturedly to 1, ζ′(s)/ζ(s)+1/(s−1) tends to γ. (component 4, The centered prime sum)

Declarations by component#

Each table lists the component’s declarations in the order of the reading project’s map; the dropdown below it prints the Lean source of each declaration as recorded in data/model.json (the pinned link gives the full context).

1 · The five endpoints#

Node

Declaration

Contract

Tier

Mathlib RH
export · main-rh

riemannHypothesis

Every nontrivial zeta zero distinct from the pole has real part one half.

✓✓ two kernels

Zeta in expanded form
export · main-zeta

riemannZeta_eq_zero_re

Every zero other than the negative even integers and the point one has real part one half.

✓✓ two kernels

Nonvanishing right of one half
export · main-right

LFunction_ne_zero_of_half_lt_re

For all positive moduli and all characters, L(s,χ) is nonzero for Re(s)>1/2, excluding the principal pole.

✓✓ two kernels

Dirichlet GRH in the open strip
export · main-strip

LFunction_eq_zero_re

For every character of positive modulus, any zero with 0<Re(s)<1 satisfies Re(s)=1/2.

✓✓ two kernels

Primitive critical-strip zeros
export · main-prim

LFunction_eq_zero_re_of_isPrimitive

For every primitive character of positive modulus, all zeros in the open critical strip have real part one half.

✓✓ two kernels

Zeta target type
definition · stmt-zeta

RiemannZetaZerosOnLine

∀ s∈ℂ, ζ(s)=0, s outside {−2(n+1)} for n∈ℕ and s≠1 imply Re(s)=1/2.

◇ source-read

Half-plane target type
definition · stmt-right

DirichletLNonvanishingRightOfHalf

∀ N≠0, χ mod N, s∈ℂ, 1/2<Re(s) and (χ≠1 or s≠1) imply L(s,χ)≠0.

◇ source-read

Dirichlet strip target type
definition · stmt-strip

DirichletLZerosOnLine

∀ N≠0, χ mod N, s∈ℂ, 0<Re(s)<1 and L(s,χ)=0 imply Re(s)=1/2.

◇ source-read

Primitive strip target type
definition · stmt-prim

PrimitiveDirichletLZerosOnLine

The preceding strip implication for each χ satisfying IsPrimitive.

◇ source-read

The two zeta exports share a proof
wrapper · rh-all

rhOfAll

RiemannHypothesis.

◇ source-read

All-character half-plane theorem
wrapper · all-chi

allChi

UpperTheory.EveryCharacter.

◇ source-read

Primitive critical-line wrapper
wrapper · crit-all

critAll

For primitive χ, every open-strip zero has real part one half.

◇ source-read

Three endpoint propositions
bundle · claim-all

claimAll

HalfPlane ∧ Strip ∧ Zeta.

◇ source-read

Lean source of these 13 declarations (excerpts printed from data/model.json)

Mathlib RH — riemannHypothesis, Main, lines 4–4. Idea: The proof term supplied to Mathlib’s own proposition is rhOfAll.

theorem riemannHypothesis : RiemannHypothesis := rhOfAll

Zeta in expanded form — riemannZeta_eq_zero_re, Main, lines 6–6. Idea: The second name uses the same proof term as riemannHypothesis.

theorem riemannZeta_eq_zero_re : RiemannZetaZerosOnLine := rhOfAll

Nonvanishing right of one half — LFunction_ne_zero_of_half_lt_re, Main, lines 8–8. Idea: The export gives allChi as the proof.

theorem LFunction_ne_zero_of_half_lt_re : DirichletLNonvanishingRightOfHalf := allChi

Dirichlet GRH in the open strip — LFunction_eq_zero_re, Main, lines 10–10. Idea: The second conjunct in claimAll supplies the critical-strip statement.

theorem LFunction_eq_zero_re : DirichletLZerosOnLine := claimAll.2.1

Primitive critical-strip zeros — LFunction_eq_zero_re_of_isPrimitive, Main, lines 12–12. Idea: The proof uses a dedicated primitive reflection argument.

theorem LFunction_eq_zero_re_of_isPrimitive : PrimitiveDirichletLZerosOnLine := critAll

Zeta target type — RiemannZetaZerosOnLine, Statements, lines 3–4. Idea: Defines the expanded zeta proposition. The two zeta exports share its mathematical meaning.

def RiemannZetaZerosOnLine : Prop :=
  ∀ s : ℂ, riemannZeta s = 0 → (¬∃ n : ℕ, s = -2 * ((n : ℂ) + 1)) → s ≠ 1 → s.re = 1 / 2

Half-plane target type — DirichletLNonvanishingRightOfHalf, Statements, lines 6–8. Idea: The disjunction excludes only the principal-character pole at one.

def DirichletLNonvanishingRightOfHalf : Prop :=
  ∀ (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N) (s : ℂ),
    1 / 2 < s.re → (χ ≠ 1 ∨ s ≠ 1) → DirichletCharacter.LFunction χ s ≠ 0

Dirichlet strip target type — DirichletLZerosOnLine, Statements, lines 10–12. Idea: All complex Dirichlet characters are quantified.

def DirichletLZerosOnLine : Prop :=
  ∀ (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N) (s : ℂ),
    0 < s.re → s.re < 1 → DirichletCharacter.LFunction χ s = 0 → s.re = 1 / 2

Primitive strip target type — PrimitiveDirichletLZerosOnLine, Statements, lines 14–16. Idea: The primitive hypothesis is a visible binder.

def PrimitiveDirichletLZerosOnLine : Prop :=
  ∀ (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N), χ.IsPrimitive →
    ∀ s : ℂ, 0 < s.re → s.re < 1 → DirichletCharacter.LFunction χ s = 0 → s.re = 1 / 2

The two zeta exports share a proof — rhOfAll, Supplements.Kernels.MainTheorems, lines 9–9. Idea: Apply the zeta reducer to the closed Dirichlet half-plane theorem.

theorem rhOfAll : RiemannHypothesis := Formalism.VW.rh_of_every allChi

All-character half-plane theorem — allChi, Supplements.Kernels.MainTheorems, lines 7–7. Idea: Re-export everyCharacter from the arithmetic development.

theorem allChi : UpperTheory.EveryCharacter := UpperTheory.FinalTheorems.everyCharacter

Primitive critical-line wrapper — critAll, Supplements.Kernels.MainTheorems, lines 11–13. Idea: Apply the primitive reflection lemma using allChi.

theorem critAll (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N) (hχ : χ.IsPrimitive) (s : ℂ)
    (h0 : 0 < s.re) (h1 : s.re < 1) (hz : LFunction χ s = 0) : s.re = 1 / 2 :=
  Formalism.VW.critLine allChi N χ hχ s h0 h1 hz

Three endpoint propositions — claimAll, Supplements.Kernels.MainTheorems, lines 15–16. Idea: Build the conjunction. Main projects its middle field. The other fields also appear in the term that constructs the bundle.

theorem claimAll : Claim.HalfPlane ∧ Claim.Strip ∧ Claim.Zeta :=
  ⟨allChi, Claim.strip allChi, Claim.zeta allChi⟩

2 · Reflection#

Node

Declaration

Contract

Tier

Specialize at modulus one
reducer · rh-every

Formalism.VW.rh_of_every

EveryCharacter implies RiemannHypothesis.

◇ source-read

Reflect a zeta zero
reducer · rh-right

Formalism.VW.rh_of_right

Right-half-plane zeta nonvanishing away from one implies Mathlib RH.

✓ kernel-checked

Reflect a primitive character
reducer · vw-crit

Formalism.VW.critLine

EveryCharacter implies the primitive open-strip conclusion.

◇ source-read

Gamma factors in the strip
lemma · gamma

Formalism.VW.gammaFactor_ne_zero

For every character χ and Re(s)>0 its gamma factor at s is nonzero.

◇ source-read

Reflect an arbitrary character
reducer · strip

Claim.strip

Claim.HalfPlane implies Claim.Strip.

✓ kernel-checked

Transfer a primitive zero to 1−s
lemma · prim-reflect

Claim.prim_reflect

At an open-strip zero of a primitive ψ, its inverse has a zero at 1−s.

⊂ in checked closure

Zeta component of the conjunction
reducer · bundle-zeta

Claim.zeta

Claim.HalfPlane implies Claim.Zeta.

✓ kernel-checked

A second zeta deduction
alternative · alternate-rh

UpperTheory.riemannHypothesis_of_everyCharacter

EveryCharacter implies Mathlib RH.

◇ source-read

Lean source of these 8 declarations (excerpts printed from data/model.json)

Specialize at modulus one — Formalism.VW.rh_of_every, Formalism.GammaFactorNonvanishing.CritLine, lines 29–32. Idea: At modulus one the Dirichlet L-function equals zeta. Supply its right-half-plane nonvanishing to rh_of_right.

theorem Formalism.VW.rh_of_every (h : UpperTheory.EveryCharacter) : RiemannHypothesis :=
  Formalism.VW.rh_of_right fun s hs hs1 => by
    have := h 1 (1 : DirichletCharacter ℂ 1) s hs (Or.inr hs1)
    rwa [LFunction_modOne_eq] at this

Reflect a zeta zero — Formalism.VW.rh_of_right, Formalism.GammaFactorNonvanishing.RhOfRight, lines 5–62. Idea: The functional equation reflects a left-hand zero. Gamma and cosine factors are nonzero once zero and the negative even integers are excluded.

theorem Formalism.VW.rh_of_right (hz : ∀ s : ℂ, 1 / 2 < s.re → s ≠ 1 → riemannZeta s ≠ 0) : RiemannHypothesis := by
  unfold RiemannHypothesis
  intro s hs htriv hs1
  rcases lt_trichotomy s.re (1 / 2) with hlt | heq | hgt
  · exfalso
    have hpi : (Real.pi : ℂ) ≠ 0 := by exact_mod_cast Real.pi_ne_zero
    have hs0 : s ≠ 0 := by
      rintro rfl
      rw [riemannZeta_zero] at hs
      norm_num at hs
    have ht : 1 / 2 < (1 - s).re := by
      rw [Complex.sub_re, Complex.one_re]
      linarith
    have h1 : (1 - s) ≠ 1 := by
      intro h
      apply hs0
      linear_combination -h
    have hnat : ∀ n : ℕ, (1 - s) ≠ -(n : ℂ) := by
      intro n h
      have hr := congrArg Complex.re h
      rw [Complex.sub_re, Complex.one_re, Complex.neg_re, Complex.natCast_re] at hr
      have : (0 : ℝ) ≤ n := n.cast_nonneg
      linarith
    have key := riemannZeta_one_sub hnat h1
    rw [sub_sub_cancel, hs] at key
    have hz' := hz (1 - s) ht h1
    have h2pi : (2 : ℂ) * (2 * (Real.pi : ℂ)) ^ (-(1 - s)) ≠ 0 :=
      mul_ne_zero two_ne_zero (Complex.cpow_ne_zero_iff.2 (Or.inl (mul_ne_zero two_ne_zero hpi)))
    have hG : Complex.Gamma (1 - s) ≠ 0 := Complex.Gamma_ne_zero_of_re_pos (by linarith)
    have hcos : Complex.cos ((Real.pi : ℂ) * (1 - s) / 2) ≠ 0 := by
      rw [Ne, Complex.cos_eq_zero_iff]
      rintro ⟨k, hk⟩
      have h3 : ((1 - s) - (2 * (k : ℂ) + 1)) * (Real.pi : ℂ) = 0 := by
        linear_combination 2 * hk
      rcases mul_eq_zero.1 h3 with h | h
      · have hsk : s = -2 * (k : ℂ) := by linear_combination -h
        have hre : s.re = -2 * (k : ℝ) := by
          rw [hsk, Complex.mul_re]
          simp
        rcases lt_trichotomy k 0 with hk0 | hk0 | hk0
        · have : (k : ℝ) ≤ -1 := by exact_mod_cast (show k ≤ -1 by omega)
          linarith
        · apply hs0
          rw [hsk, hk0]
          simp
        · apply htriv
          refine ⟨(k - 1).toNat, ?_⟩
          have hnk : ((k - 1).toNat : ℤ) = k - 1 := Int.toNat_of_nonneg (by omega)
          have h' : (((k - 1).toNat : ℕ) : ℂ) = (k : ℂ) - 1 := by
            have := congrArg (fun m : ℤ => (m : ℂ)) hnk
            push_cast at this
            exact this
          rw [hsk, h']
          ring
      · exact hpi h
    exact (mul_ne_zero (mul_ne_zero (mul_ne_zero h2pi hG) hcos) hz') key.symm
  · exact heq
  · exact absurd hs (hz s hgt hs1)

Reflect a primitive character — Formalism.VW.critLine, Formalism.GammaFactorNonvanishing.CritLine, lines 11–27. Idea: The completed functional equation reflects the zero to the inverse character at 1−s.

theorem Formalism.VW.critLine (h : UpperTheory.EveryCharacter) (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N) (hχ : χ.IsPrimitive) (s : ℂ)
    (h0 : 0 < s.re) (h1 : s.re < 1) (hz : LFunction χ s = 0) : s.re = 1 / 2 := by
  have hs0 : s ≠ 0 := fun e => by simp [e] at h0
  have hs1 : s ≠ 1 := fun e => by simp [e] at h1
  by_contra hne
  rcases lt_or_gt_of_ne hne with hlt | hgt
  · have hinv : χ⁻¹.IsPrimitive := by
      rw [isPrimitive_def, conductor_inv]; exact hχ
    have hc : completedLFunction χ s = 0 := by
      rw [LFunction_eq_completed_div_gammaFactor χ s (Or.inl hs0)] at hz
      exact (div_eq_zero_iff.1 hz).resolve_right (Formalism.VW.gammaFactor_ne_zero χ h0)
    have hfe := hinv.completedLFunction_one_sub s
    rw [inv_inv, hc, mul_zero] at hfe
    have h2 : (1 - s) ≠ 0 := sub_ne_zero.2 hs1.symm
    refine h N χ⁻¹ (1 - s) (by rw [sub_re, one_re]; linarith) (Or.inr fun e => hs0 (by linear_combination -e)) ?_
    rw [LFunction_eq_completed_div_gammaFactor χ⁻¹ (1 - s) (Or.inl h2), hfe, zero_div]
  · exact h N χ s hgt (Or.inr hs1) hz

Gamma factors in the strip — Formalism.VW.gammaFactor_ne_zero, Formalism.GammaFactorNonvanishing.CritLine, lines 6–9. Idea: Use the even and odd formulas and Gammaℝ nonvanishing in the positive half-plane.

theorem Formalism.VW.gammaFactor_ne_zero {N : ℕ} (χ : DirichletCharacter ℂ N) {s : ℂ} (hs : 0 < s.re) : gammaFactor χ s ≠ 0 := by
  rcases χ.even_or_odd with h | h
  · rw [h.gammaFactor_def]; exact Gammaℝ_ne_zero_of_re_pos hs
  · rw [h.gammaFactor_def]; exact Gammaℝ_ne_zero_of_re_pos (by rw [add_re, one_re]; linarith)

Reflect an arbitrary character — Claim.strip, Development.AutomorphicArithmetic.CharacterBoxes.ClaimStrip, lines 59–73. Idea: Reduce a left-hand zero to its primitive inducing character, reflect it, then use h. A right-hand zero directly contradicts h.

theorem strip (h : HalfPlane) : Strip := by
  unfold HalfPlane at h
  intro N _ χ s hs0 hs1 hz
  have hs : s ≠ 1 := fun e => by rw [e, Complex.one_re] at hs1; exact lt_irrefl _ hs1
  have hs0' : s ≠ 0 := fun e => by rw [e, Complex.zero_re] at hs0; exact lt_irrefl _ hs0
  rcases lt_trichotomy s.re (1 / 2) with hlt | heq | hgt
  · exfalso
    haveI : NeZero χ.conductor := ⟨χ.conductor_ne_zero⟩
    have hp := prim_zero χ hs0 hs1 hz
    have hr := prim_reflect χ.primitiveCharacter χ.primitiveCharacter_isPrimitive hs0 hs1 hp
    have ht : (1 : ℂ) - s ≠ 1 := fun e => hs0' (sub_eq_self.mp e)
    exact h χ.conductor χ.primitiveCharacter⁻¹ (1 - s)
      (by rw [Complex.sub_re, Complex.one_re]; linarith) (Or.inr ht) hr
  · exact heq
  · exact absurd hz (h N χ s hgt (Or.inr hs))

Transfer a primitive zero to 1−s — Claim.prim_reflect, Development.AutomorphicArithmetic.CharacterBoxes.ClaimStrip, lines 42–57. Idea: Use the completed functional equation and nonvanishing of gamma in the strip.

theorem prim_reflect {M : ℕ} [NeZero M] (ψ : DirichletCharacter ℂ M) (hψ : ψ.IsPrimitive) {s : ℂ}
    (hs0 : 0 < s.re) (hs1 : s.re < 1) (h : DirichletCharacter.LFunction ψ s = 0) :
    DirichletCharacter.LFunction ψ⁻¹ (1 - s) = 0 := by
  have hs0' : s ≠ 0 := fun e => by rw [e, Complex.zero_re] at hs0; exact lt_irrefl _ hs0
  have ht0 : 0 < (1 - s).re := by rw [Complex.sub_re, Complex.one_re]; linarith
  have ht0' : 1 - s ≠ 0 := fun e => by rw [e, Complex.zero_re] at ht0; exact lt_irrefl _ ht0
  have hc : DirichletCharacter.completedLFunction ψ s = 0 := by
    rw [DirichletCharacter.LFunction_eq_completed_div_gammaFactor ψ s (Or.inl hs0'),
      div_eq_zero_iff] at h
    exact h.resolve_right (gamma_ne_zero ψ hs0)
  have hψ' : (ψ⁻¹).IsPrimitive := by
    rw [DirichletCharacter.isPrimitive_def, DirichletCharacter.conductor_inv]; exact hψ
  have fe := hψ'.completedLFunction_one_sub s
  rw [inv_inv, hc, mul_zero] at fe
  rw [DirichletCharacter.LFunction_eq_completed_div_gammaFactor ψ⁻¹ (1 - s) (Or.inl ht0'), fe,
    zero_div]

Zeta component of the conjunction — Claim.zeta, Development.AutomorphicArithmetic.CharacterBoxes.ClaimStrip, lines 75–100. Idea: Use strip at modulus one in the interior, established nonvanishing for Re(s)≥1, and completed zeta symmetry on the left.

theorem zeta (h : HalfPlane) : Zeta := by
  intro s hz htriv hs1
  have hs0 : s ≠ 0 := fun e => by rw [e, riemannZeta_zero] at hz; norm_num at hz
  rcases lt_or_ge 0 s.re with hpos | hnpos
  · rcases lt_or_ge s.re 1 with hlt1 | hge1
    · have hL : DirichletCharacter.LFunction (1 : DirichletCharacter ℂ 1) s = 0 := by
        rw [DirichletCharacter.LFunction_modOne_eq]; exact hz
      exact strip h 1 1 s hpos hlt1 hL
    · exact absurd hz (riemannZeta_ne_zero_of_one_le_re hge1)
  · exfalso
    have hG : Gammaℝ s ≠ 0 := by
      intro hg
      obtain ⟨n, hn⟩ := Complex.Gammaℝ_eq_zero_iff.mp hg
      rcases n with _ | n
      · exact hs0 (by simpa using hn)
      · exact htriv ⟨n, by rw [hn]; push_cast; ring⟩
    have hc : completedRiemannZeta s = 0 := by
      rw [riemannZeta_def_of_ne_zero hs0, div_eq_zero_iff] at hz
      exact hz.resolve_right hG
    have h1s : 1 - s ≠ 0 := fun e => by
      have := congrArg Complex.re e
      rw [Complex.sub_re, Complex.one_re, Complex.zero_re] at this
      linarith
    have hz' : riemannZeta (1 - s) = 0 := by
      rw [riemannZeta_def_of_ne_zero h1s, completedRiemannZeta_one_sub, hc, zero_div]
    exact riemannZeta_ne_zero_of_one_le_re (by rw [Complex.sub_re, Complex.one_re]; linarith) hz'

A second zeta deduction — UpperTheory.riemannHypothesis_of_everyCharacter, Development.AutomorphicArithmetic.CharacterBoxes.RiemannHypothesisOfEveryCharacter, lines 215–231. Idea: The alternate argument reflects completed zeta. The two zeta exports in Main use the other reducer.

theorem UpperTheory.riemannHypothesis_of_everyCharacter (h : UpperTheory.EveryCharacter) : RiemannHypothesis := by
  intro s hs hn h1
  by_contra hne
  rcases lt_or_gt_of_ne hne with hlt | hgt
  · have hs0 : s ≠ 0 := by rintro rfl; rw [riemannZeta_zero] at hs; norm_num at hs
    have h1s : (1 - s) ≠ 1 := fun e => hs0 (by simpa using e)
    have hz : riemannZeta (1 - s) ≠ 0 := UpperTheory.zeta_ne_zero_of_everyCharacter h (1 - s) (by simp; linarith) h1s
    have hc : completedRiemannZeta s = completedRiemannZeta (1 - s) := (completedRiemannZeta_one_sub s).symm
    have h1s0 : (1 - s) ≠ 0 := fun e => h1 (by linear_combination -e)
    rw [riemannZeta_def_of_ne_zero hs0, div_eq_zero_iff] at hs
    rcases hs with hs | hs
    · exact hz (by rw [riemannZeta_def_of_ne_zero h1s0, ← hc, hs, zero_div])
    · obtain ⟨n, hn'⟩ := Complex.Gammaℝ_eq_zero_iff.1 hs
      rcases n with _ | n
      · exact hs0 (by simpa using hn')
      · exact hn ⟨n, by rw [hn']; push_cast; ring⟩
  · exact UpperTheory.zeta_ne_zero_of_everyCharacter h s hgt h1 hs

3 · Conductor descent#

Node

Declaration

Contract

Tier

Remove imprimitive Euler factors
lemma · prim-zero

Claim.prim_zero

An imprimitive character zero in 0<Re(s)<1 gives a zero of its primitive inducing character.

⊂ in checked closure

Nonzero removed Euler factor
lemma · factor

Claim.factor_ne_zero

For prime p and Re(s)>0, 1−ψ(p)p^(−s)≠0.

⊂ in checked closure

Pass from primitive to all characters
reducer · every-green

UpperTheory.Top.every_character_of_green_v_win

Green ∧ VWin ∧ nonempty definite-side hypotheses imply EveryCharacter, written as three binders.

◇ source-read

Restore all characters
reducer · imprimitive

UpperTheory.Top.imprimitive

ZeroFreeAll for primitive characters implies the all-moduli right-half-plane assertion with the principal pole exception.

✓ kernel-checked

Lean source of these 4 declarations (excerpts printed from data/model.json)

Remove imprimitive Euler factors — Claim.prim_zero, Development.AutomorphicArithmetic.CharacterBoxes.ClaimStrip, lines 23–33. Idea: Change level. Every removed prime factor has the form 1−χ(p)p^(−s), with the second term of norm less than one.

theorem prim_zero {N : ℕ} [NeZero N] (χ : DirichletCharacter ℂ N) [NeZero χ.conductor] {s : ℂ}
    (hs0 : 0 < s.re) (hs1 : s.re < 1) (h : DirichletCharacter.LFunction χ s = 0) :
    DirichletCharacter.LFunction χ.primitiveCharacter s = 0 := by
  have hs : s ≠ 1 := fun e => by rw [e, Complex.one_re] at hs1; exact lt_irrefl _ hs1
  have key := DirichletCharacter.LFunction_changeLevel χ.conductor_dvd_level
    χ.primitiveCharacter (Or.inr hs)
  rw [χ.changeLevel_primitiveCharacter, h] at key
  rcases mul_eq_zero.mp key.symm with h' | h'
  · exact h'
  · obtain ⟨p, hp, hp0⟩ := Finset.prod_eq_zero_iff.mp h'
    exact absurd hp0 (factor_ne_zero _ hs0 p (Nat.prime_of_mem_primeFactors hp))

Nonzero removed Euler factor — Claim.factor_ne_zero, Development.AutomorphicArithmetic.CharacterBoxes.ClaimStrip, lines 7–21. Idea: Use the bound on the norm of a character and the strict decay of p^(−Re(s)).

theorem factor_ne_zero {M : ℕ} (ψ : DirichletCharacter ℂ M) {s : ℂ} (hs : 0 < s.re) (p : ℕ)
    (hp : p.Prime) : (1 : ℂ) - ψ p * (p : ℂ) ^ (-s) ≠ 0 := by
  intro h
  have h1 : ψ p * (p : ℂ) ^ (-s) = 1 := by linear_combination -h
  have hp1 : (1 : ℝ) < p := by exact_mod_cast hp.one_lt
  have hpow : ‖(p : ℂ) ^ (-s)‖ < 1 := by
    rw [Complex.norm_natCast_cpow_of_pos hp.pos, Complex.neg_re]
    exact Real.rpow_lt_one_of_one_lt_of_neg hp1 (by linarith)
  have hn : ‖ψ p * (p : ℂ) ^ (-s)‖ < 1 := by
    rw [norm_mul]
    calc ‖ψ p‖ * ‖(p : ℂ) ^ (-s)‖ ≤ 1 * ‖(p : ℂ) ^ (-s)‖ := by
          gcongr; exact ψ.norm_le_one _
      _ < 1 := by rw [one_mul]; exact hpow
  rw [h1, norm_one] at hn
  exact lt_irrefl _ hn

Pass from primitive to all characters — UpperTheory.Top.every_character_of_green_v_win, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.TopPlug, lines 16–18. Idea: Obtain primitive nonvanishing at cyclic levels and restore imprimitive factors.

theorem UpperTheory.Top.every_character_of_green_v_win (hG : GlobalTheory.GLq.Green) (hV : UpperTheory.Top.VWin)
    (h : Nonempty (_root_.GlobalTheory.Fc.HypsAlt (fun 𝒞 => Closed 𝒞 fun Fm _ => LinkN Fm) _root_.GlobalTheory.Fc.DefiniteSideCondition)) : UpperTheory.EveryCharacter :=
  UpperTheory.Top.imprimitive (_root_.UpperTheory.Top.zero_free_all_of_green_v_win hG hV h)

Restore all characters — UpperTheory.Top.imprimitive, Development.AutomorphicArithmetic.CharacterBoxes.Imprimitive, lines 5–35. Idea: Use the change-of-level formula and nonvanishing of all finitely many additional Euler factors.

theorem UpperTheory.Top.imprimitive :
    ZeroFreeAll → ∀ (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N) (s : ℂ), 1 / 2 < s.re → (χ ≠ 1 ∨ s ≠ 1) →
      DirichletCharacter.LFunction χ s ≠ 0 := by
  intro h N _ χ s hs hχs
  haveI : NeZero χ.conductor := (PChar.of χ).ne
  have hL : DirichletCharacter.LFunction χ.primitiveCharacter s ≠ 0 := h (PChar.of χ) trivial s hs
  have hχ' : χ.primitiveCharacter ≠ 1 ∨ s ≠ 1 := by
    rcases hχs with hχ | hs1
    · left
      intro h1
      apply hχ
      rw [← χ.changeLevel_primitiveCharacter, h1, DirichletCharacter.changeLevel_one]
    · exact Or.inr hs1
  have hrw := DirichletCharacter.LFunction_changeLevel χ.conductor_dvd_level χ.primitiveCharacter hχ'
  rw [χ.changeLevel_primitiveCharacter] at hrw
  rw [hrw]
  refine mul_ne_zero hL (Finset.prod_ne_zero_iff.mpr fun p hp => ?_)
  have hp' := Nat.prime_of_mem_primeFactors hp
  intro h0
  have key : χ.primitiveCharacter p * (p : ℂ) ^ (-s) = 1 := by linear_combination -h0
  have h1 : ‖χ.primitiveCharacter (p : ZMod χ.conductor)‖ ≤ 1 := DirichletCharacter.norm_le_one _ _
  have h2 : ‖(p : ℂ) ^ (-s)‖ < 1 := by
    rw [Complex.norm_natCast_cpow_of_pos hp'.pos, Complex.neg_re]
    exact Real.rpow_lt_one_of_one_lt_of_neg (by exact_mod_cast hp'.one_lt) (by linarith)
  have hn : ‖χ.primitiveCharacter p * (p : ℂ) ^ (-s)‖ < 1 := by
    rw [norm_mul]
    calc ‖χ.primitiveCharacter (p : ZMod χ.conductor)‖ * ‖(p : ℂ) ^ (-s)‖
        ≤ 1 * ‖(p : ℂ) ^ (-s)‖ := by gcongr
      _ < 1 := by simpa using h2
  rw [key, norm_one] at hn
  exact lt_irrefl _ hn

4 · The centered prime sum#

Node

Declaration

Contract

Tier

The weighted prime sum
definition · g-m

Formalism.HC.Level.Gm

G_P(x)=Gζ(x) plus a finite weighted sum of real parts of twisted smoothed errors.

⊂ in checked closure

Uniform families on power windows
definition · window-def

Formalism.HC.ChebyshevInequalityAtWindowScale

There exist eD,eL and ε₁>0 such that every 0<ε<ε₁ admits a tied family with whole windows of width λ.

⊂ in checked closure

The first moment of the Chebyshev error
definition · moment-target

Formalism.HermitianLattices.GL2a2.PsiZeroConst

The truncated integral of (ψ(t)−t)/t² from 1 to U tends to −1−γ as U tends to infinity.

⊂ in checked closure

Evaluate the first moment
reducer · moment-theorem

Formalism.HermitianLattices.GL2a2.psi_zero_integral_constant

The archive supplies its first-moment limit without an RH assumption.

✓ kernel-checked

Match the two limits at one
reducer · moment-calculation

psiZeroConst_main

For the trivial character modulo one the Chebyshev remainder has first moment −1−γ.

⊂ in checked closure

Read Euler’s constant from the logarithmic derivative
reducer · moment-laurent

zeta_logderiv_limit

As complex s tends puncturedly to 1, ζ′(s)/ζ(s)+1/(s−1) tends to γ.

⊂ in checked closure

Dominate the centered character sum
reducer · moment-majorant

sw_bound

For each fixed character, the centered von Mangoldt sum is eventually bounded in norm by Kt/log²t.

⊂ in checked closure

Pass the Mellin integral to σ = 1
reducer · moment-dominated

core_tendsto

A logarithmic remainder bound lets σ times the weighted integral tend to its value at σ=1 from the right.

⊂ in checked closure

Lean source of these 8 declarations (excerpts printed from data/model.json)

The weighted prime sum — Formalism.HC.Level.Gm, Formalism.SharpRestriction.RamificationFrobenius.TotientGaloisClasses.ExplicitFormulaErrorOfHostConditions, lines 38–38. Idea: The cyclic level gives every nontrivial primitive inducing character weight 1/(3o+1).

def Gm (y : ℝ) : ℝ := Formalism.Gz y + ∑ ψ ∈ Λ.Nt, Λ.wt ψ * (An.gChi ψ.χ y).re

Uniform families on power windows — Formalism.HC.ChebyshevInequalityAtWindowScale, Formalism.SharpRestriction.RamificationFrobenius.TotientGaloisClasses.TopWin, lines 30–32. Idea: The loss exponents are uniform in epsilon. The family may vary with epsilon.

def ChebyshevInequalityAtWindowScale (la : ℝ) (Λ : Level) : Prop :=
  ∃ eD eL ε₁ : ℝ, 0 < ε₁ ∧ ∀ eps : ℝ, 0 < eps → eps < ε₁ → ∃ Fm : Fam eps, EFamC Λ (core Fm) ∧
    (core Fm).Windows la ∧ ChebyshevInequalityOnFamilyWindows @core @Tied Fm eD eL

The first moment of the Chebyshev error — Formalism.HermitianLattices.GL2a2.PsiZeroConst, Formalism.GL3MeanSquares.PrimeCountAsymptoticInProgressions, lines 18–20. Idea: This is an improper-integral limit for the real von Mangoldt sum. It fixes the coefficient of the linear centering term in the reading converse.

def PsiZeroConst : Prop :=
  Tendsto (fun U : ℝ => ∫ u in (1 : ℝ)..U, (psumR (fun n => Λ n) u - u) / u ^ 2) atTop
    (𝓝 (-1 - Real.eulerMascheroniConstant))

Evaluate the first moment — Formalism.HermitianLattices.GL2a2.psi_zero_integral_constant, Formalism.GL3MeanSquares.HookFormulaTorsion.PsiZeroIntegral, lines 530–531. Idea: The public theorem calls the source-level proof psiZeroConst_main. This separate theorem helps explain the reverse implication for the singleton zeta family.

theorem psi_zero_integral_constant : Formalism.HermitianLattices.GL2a2.PsiZeroConst := by
  exact Formalism.HermitianLattices.P.PsiZeroIntegral.psiZeroConst_main

Match the two limits at one — psiZeroConst_main, Formalism.GL3MeanSquares.HookFormulaTorsion.PsiZeroIntegral, lines 423–521. Idea: Evaluate the Mellin integral for real σ>1 in terms of the logarithmic derivative of zeta. The remainder bound allows passage to σ=1. The finite part of the logarithmic derivative fixes the value.

private theorem psiZeroConst_main : Formalism.HermitianLattices.GL2a2.PsiZeroConst := by
  unfold Formalism.HermitianLattices.GL2a2.PsiZeroConst
  have hsub : Subsingleton (ZMod 1) := ZMod.subsingleton_iff.2 rfl
  have hone : ∀ n : ℕ, (1 : DirichletCharacter ℂ 1) (n : ZMod 1) = 1 := fun n => by
    first
      | exact MulChar.one_apply (isUnit_of_subsingleton _)
      | simp
  have h : RemBound (fun n : ℕ => ((Λ n : ℝ) : ℂ)) 1 := by
    have h0 := sw_bound 1 (1 : DirichletCharacter ℂ 1)
    rw [if_pos rfl] at h0
    simp only [hone, mul_one] at h0
    exact h0
  have hid : ∀ σ : ℝ, 1 < σ →
      (σ : ℂ) * ∫ t in Set.Ioi (1 : ℝ), rem (fun n : ℕ => ((Λ n : ℝ) : ℂ)) 1 t * (t : ℂ) ^ (-((σ : ℂ) + 1))
        = -(deriv riemannZeta σ / riemannZeta σ + 1 / ((σ : ℂ) - 1)) - 1 := by
    intro σ hσ
    have hre : (1 : ℝ) < ((σ : ℂ)).re := by simpa using hσ
    have hne : (σ : ℂ) - 1 ≠ 0 := by
      rw [sub_ne_zero]
      exact_mod_cast hσ.ne'
    have hne' : -(σ : ℂ) + 1 ≠ 0 := by
      intro h0
      apply hne
      linear_combination -h0
    have hsum : LSeriesSummable (fun n : ℕ => ((Λ n : ℝ) : ℂ)) σ := by
      first
        | exact ArithmeticFunction.LSeriesSummable_vonMangoldt hre
        | exact LSeriesSummable_vonMangoldt hre
    have hL := LSeries_eq_mul_integral (fun n : ℕ => ((Λ n : ℝ) : ℂ)) zero_le_one hre hsum (rem_bigO h)
    have key : LSeries (fun n : ℕ => ((Λ n : ℝ) : ℂ)) σ = -deriv riemannZeta σ / riemannZeta σ :=
      LSeries_vonMangoldt_eq_deriv_riemannZeta_div hre
    have hpint : IntegrableOn (fun t : ℝ => (t : ℂ) ^ (-(σ : ℂ))) (Set.Ioi 1) :=
      integrableOn_Ioi_cpow_of_lt (by simpa using hσ) one_pos
    have hsplit : ∫ t in Set.Ioi (1 : ℝ), (∑ k ∈ Icc 1 ⌊t⌋₊, ((Λ k : ℝ) : ℂ)) * (t : ℂ) ^ (-((σ : ℂ) + 1))
        = (∫ t in Set.Ioi (1 : ℝ), rem (fun n : ℕ => ((Λ n : ℝ) : ℂ)) 1 t * (t : ℂ) ^ (-((σ : ℂ) + 1)))
          + ∫ t in Set.Ioi (1 : ℝ), (t : ℂ) ^ (-(σ : ℂ)) := by
      rw [← integral_add (core_integrable' h hσ.le) hpint]
      refine setIntegral_congr_fun measurableSet_Ioi (fun t ht => ?_)
      have ht0 : (t : ℂ) ≠ 0 := by
        exact_mod_cast (show (0 : ℝ) < t from lt_trans one_pos ht).ne'
      simp only [rem]
      rw [show -(σ : ℂ) = 1 + (-((σ : ℂ) + 1)) by ring, Complex.cpow_add _ _ ht0, Complex.cpow_one]
      ring
    have hpow : ∫ t in Set.Ioi (1 : ℝ), (t : ℂ) ^ (-(σ : ℂ)) = 1 / ((σ : ℂ) - 1) := by
      rw [integral_Ioi_cpow_of_lt (by simpa using hσ) one_pos, Complex.ofReal_one, Complex.one_cpow,
        div_eq_div_iff hne' hne]
      ring
    have hq : (σ : ℂ) * (1 / ((σ : ℂ) - 1)) = 1 / ((σ : ℂ) - 1) + 1 := by
      rw [mul_one_div, div_add_one hne]
      congr 1
      ring
    have hmain : (σ : ℂ) * ∫ t in Set.Ioi (1 : ℝ),
        rem (fun n : ℕ => ((Λ n : ℝ) : ℂ)) 1 t * (t : ℂ) ^ (-((σ : ℂ) + 1))
        = LSeries (fun n : ℕ => ((Λ n : ℝ) : ℂ)) σ - (σ : ℂ) * (1 / ((σ : ℂ) - 1)) := by
      rw [hL, hsplit, hpow]
      ring
    rw [hmain, key, hq]
    ring
  have hG : Tendsto (fun σ : ℝ => -(deriv riemannZeta σ / riemannZeta σ + 1 / ((σ : ℂ) - 1)) - 1)
      (𝓝[>] 1) (𝓝 (-(Real.eulerMascheroniConstant : ℂ) - 1)) :=
    ((zeta_logderiv_limit.comp ofReal_tendsto_punctured).neg).sub_const 1
  have hF : Tendsto (fun σ : ℝ => (σ : ℂ) * ∫ t in Set.Ioi (1 : ℝ),
      rem (fun n : ℕ => ((Λ n : ℝ) : ℂ)) 1 t * (t : ℂ) ^ (-((σ : ℂ) + 1)))
      (𝓝[>] 1) (𝓝 (-(Real.eulerMascheroniConstant : ℂ) - 1)) := by
    refine hG.congr' ?_
    filter_upwards [self_mem_nhdsWithin] with σ hσ
    exact (hid σ hσ).symm
  have hlim := tendsto_nhds_unique (core_tendsto h) hF
  have hF1 : ∀ u ∈ Set.Ioi (1 : ℝ),
      rem (fun n : ℕ => ((Λ n : ℝ) : ℂ)) 1 u * (u : ℂ) ^ (-(((1 : ℝ) : ℂ) + 1))
        = (((Formalism.HermitianLattices.GL2PrimeSums.psumR (fun n => Λ n) u - u) / u ^ 2 : ℝ) : ℂ) := by
    intro u hu
    rw [show -(((1 : ℝ) : ℂ) + 1) = -((2 : ℕ) : ℂ) by norm_num, Complex.cpow_neg, Complex.cpow_natCast]
    simp only [rem, Formalism.HermitianLattices.GL2PrimeSums.psumR]
    push_cast
    ring
  have hint : IntegrableOn (fun u : ℝ => (Formalism.HermitianLattices.GL2PrimeSums.psumR (fun n => Λ n) u - u) / u ^ 2)
      (Set.Ioi 1) := by
    refine (MeasureTheory.Integrable.re (core_integrable h)).congr ?_
    filter_upwards [ae_restrict_mem measurableSet_Ioi] with u hu
    simp only [hF1 u hu, RCLike.re_to_complex, Complex.ofReal_re]
  have e1 : ∫ u in Set.Ioi (1 : ℝ), (((Formalism.HermitianLattices.GL2PrimeSums.psumR (fun n => Λ n) u - u) / u ^ 2 : ℝ) : ℂ)
      = ∫ u in Set.Ioi (1 : ℝ),
        rem (fun n : ℕ => ((Λ n : ℝ) : ℂ)) 1 u * (u : ℂ) ^ (-(((1 : ℝ) : ℂ) + 1)) :=
    (setIntegral_congr_fun measurableSet_Ioi hF1).symm
  have hval : ∫ u in Set.Ioi (1 : ℝ), (Formalism.HermitianLattices.GL2PrimeSums.psumR (fun n => Λ n) u - u) / u ^ 2
      = -1 - Real.eulerMascheroniConstant := by
    apply Complex.ofReal_injective
    have e0 : ∫ u in Set.Ioi (1 : ℝ), (((Formalism.HermitianLattices.GL2PrimeSums.psumR (fun n => Λ n) u - u) / u ^ 2 : ℝ) : ℂ)
        = ((∫ u in Set.Ioi (1 : ℝ), (Formalism.HermitianLattices.GL2PrimeSums.psumR (fun n => Λ n) u - u) / u ^ 2 : ℝ) : ℂ) := by
      first
        | exact integral_complex_ofReal
        | exact integral_ofReal
    rw [← e0, e1, hlim]
    push_cast
    ring
  have hT := intervalIntegral_tendsto_integral_Ioi 1 hint tendsto_id
  rw [hval] at hT
  exact hT

Read Euler’s constant from the logarithmic derivative — zeta_logderiv_limit, Formalism.GL3MeanSquares.HookFormulaTorsion.PsiZeroIntegral, lines 216–277. Idea: Remove the pole by putting g(s)=(s−1)ζ(s) and g(1)=1. The quotient g′/g tends to γ and agrees with the regularized logarithmic derivative off the pole.

private lemma zeta_logderiv_limit :
    Tendsto (fun s : ℂ => deriv riemannZeta s / riemannZeta s + 1 / (s - 1)) (𝓝[≠] 1)
      (𝓝 (Real.eulerMascheroniConstant : ℂ)) := by
  obtain ⟨g, hg⟩ : ∃ g : ℂ → ℂ, g = Function.update (fun s => (s - 1) * riemannZeta s) 1 1 := ⟨_, rfl⟩
  have hgs : ∀ s : ℂ, s ≠ 1 → g s = (s - 1) * riemannZeta s := fun s hs => by
    simp [hg, Function.update_apply, hs]
  have h1 : g 1 = 1 := by simp [hg]
  have hdiff : Differentiable ℂ g := by
    have hon : DifferentiableOn ℂ g (Set.univ \ {1}) := by
      intro s hs
      have hs1 : s ≠ 1 := hs.2
      have hev : g =ᶠ[𝓝 s] fun z => (z - 1) * riemannZeta z := by
        filter_upwards [isOpen_compl_singleton.mem_nhds hs1] with z hz
        exact hgs z hz
      exact (((differentiableAt_id.sub_const 1).mul (differentiableAt_riemannZeta hs1)).congr_of_eventuallyEq
        hev).differentiableWithinAt
    have hcont : ContinuousAt g 1 := by
      rw [continuousAt_iff_punctured_nhds, h1]
      refine riemannZeta_residue_one.congr' ?_
      filter_upwards [self_mem_nhdsWithin] with s hs
      exact (hgs s hs).symm
    have hall := (Complex.differentiableOn_compl_singleton_and_continuousAt_iff Filter.univ_mem).1 ⟨hon, hcont⟩
    exact differentiableOn_univ.1 hall
  have hd1 : deriv g 1 = Real.eulerMascheroniConstant := by
    have h2 := hasDerivAt_iff_tendsto_slope.1 (hdiff 1).hasDerivAt
    have h3 : Tendsto (slope g 1) (𝓝[≠] 1) (𝓝 (Real.eulerMascheroniConstant : ℂ)) := by
      refine tendsto_riemannZeta_sub_one_div.congr' ?_
      filter_upwards [self_mem_nhdsWithin] with s hs
      have hs1 : s - 1 ≠ 0 := sub_ne_zero.2 hs
      rw [slope_def_field, hgs s hs, h1]
      first
        | (field_simp; done)
        | (field_simp; ring)
    exact tendsto_nhds_unique h2 h3
  have hcd : ContinuousAt (deriv g) 1 := ((hdiff.analyticAt 1).deriv).continuousAt
  have hlim : Tendsto (fun s => deriv g s / g s) (𝓝[≠] 1) (𝓝 (Real.eulerMascheroniConstant : ℂ)) := by
    have h4 : Tendsto (fun s => deriv g s / g s) (𝓝[≠] 1) (𝓝 (deriv g 1 / g 1)) :=
      (hcd.div (hdiff 1).continuousAt (by rw [h1]; exact one_ne_zero)).tendsto.mono_left
        nhdsWithin_le_nhds
    rw [hd1, h1, div_one] at h4
    exact h4
  refine hlim.congr' ?_
  have hne : ∀ᶠ s in 𝓝[≠] (1 : ℂ), g s ≠ 0 :=
    ((hdiff 1).continuousAt.eventually_ne (by rw [h1]; exact one_ne_zero)).filter_mono nhdsWithin_le_nhds
  filter_upwards [self_mem_nhdsWithin, hne] with s hs hgs0
  have hs1 : s - 1 ≠ 0 := sub_ne_zero.2 hs
  have hev : g =ᶠ[𝓝 s] fun z => (z - 1) * riemannZeta z := by
    filter_upwards [isOpen_compl_singleton.mem_nhds hs] with z hz
    exact hgs z hz
  have hdg : deriv g s = riemannZeta s + (s - 1) * deriv riemannZeta s := by
    rw [hev.deriv_eq]
    have h5 : HasDerivAt (fun z => (z - 1) * riemannZeta z)
        (1 * riemannZeta s + (s - 1) * deriv riemannZeta s) s :=
      ((hasDerivAt_id' s).sub_const 1).mul (differentiableAt_riemannZeta hs).hasDerivAt
    rw [h5.deriv]
    ring
  rw [hgs s hs] at hgs0 ⊢
  have hz : riemannZeta s ≠ 0 := right_ne_zero_of_mul hgs0
  rw [hdg]
  first
    | (field_simp; done)
    | (field_simp; ring)

Dominate the centered character sum — sw_bound, Formalism.GL3MeanSquares.HookFormulaTorsion.PsiZeroIntegral, lines 279–301. Idea: The Siegel–Walfisz estimate applies at a fixed modulus for all sufficiently large t. Exponential decay in the square root of log t implies the displayed inverse logarithmic factor.

private lemma sw_bound (q : ℕ) [NeZero q] (χ : DirichletCharacter ℂ q) :
    RemBound (fun n : ℕ => ((Λ n : ℝ) : ℂ) * χ (n : ZMod q)) (if χ = 1 then 1 else 0) := by
  obtain ⟨c, C, hc, h⟩ := Formalism.ZeroFreeDirichlet.siegelWalfisz 1 one_pos
  have hE : 0 < Real.exp (q : ℝ) := Real.exp_pos _
  refine ⟨|C| * (24 / c ^ 4), Real.exp q + 2, by linarith, fun t ht => ?_⟩
  have ht2 : 2 ≤ t := by linarith
  have ht0 : 0 < t := by linarith
  have hq : (q : ℝ) ≤ Real.log t ^ (1 : ℝ) := by
    rw [Real.rpow_one, Real.le_log_iff_exp_le ht0]
    linarith
  have h1 := h q χ t ht2 hq
  have e : rem (fun n : ℕ => ((Λ n : ℝ) : ℂ) * χ (n : ZMod q)) (if χ = 1 then 1 else 0) t =
      Formalism.ZeroFreeDirichlet.psiChi χ t - (if χ = 1 then (t : ℂ) else 0) := by
    unfold rem Formalism.ZeroFreeDirichlet.psiChi
    split_ifs <;> simp
  rw [e]
  refine h1.trans ?_
  have h2 := exp_sqrt_le hc (x := t) (by linarith)
  calc C * t * Real.exp (-c * Real.sqrt (Real.log t))
      ≤ |C| * t * (24 / c ^ 4 / Real.log t ^ 2) := by
        gcongr
        exact le_abs_self C
    _ = |C| * (24 / c ^ 4) * t / Real.log t ^ 2 := by ring

Pass the Mellin integral to σ = 1 — core_tendsto, Formalism.GL3MeanSquares.HookFormulaTorsion.PsiZeroIntegral, lines 157–176. Idea: The local integrand is measurable. A bound by the integrable error at σ=1 gives dominated convergence. The factor σ tends to one.

private lemma core_tendsto {a : ℕ → ℂ} {m : ℂ} (h : RemBound a m) :
    Tendsto (fun σ : ℝ => (σ : ℂ) * ∫ t in Set.Ioi (1 : ℝ), rem a m t * (t : ℂ) ^ (-((σ : ℂ) + 1)))
      (𝓝[>] 1) (𝓝 (∫ t in Set.Ioi (1 : ℝ), rem a m t * (t : ℂ) ^ (-(((1 : ℝ) : ℂ) + 1)))) := by
  have hI : Tendsto (fun σ : ℝ => ∫ t in Set.Ioi (1 : ℝ), rem a m t * (t : ℂ) ^ (-((σ : ℂ) + 1)))
      (𝓝[>] 1) (𝓝 (∫ t in Set.Ioi (1 : ℝ), rem a m t * (t : ℂ) ^ (-(((1 : ℝ) : ℂ) + 1)))) := by
    refine tendsto_integral_filter_of_dominated_convergence
      (fun t => ‖rem a m t * (t : ℂ) ^ (-(((1 : ℝ) : ℂ) + 1))‖) ?_ ?_ (core_integrable h).norm ?_
    · exact Eventually.of_forall fun σ => (F_measurable a m _).aestronglyMeasurable
    · filter_upwards [self_mem_nhdsWithin] with σ hσ
      exact ae_restrict_of_forall_mem measurableSet_Ioi fun t ht => F_bound a m (le_of_lt hσ) ht
    · refine ae_restrict_of_forall_mem measurableSet_Ioi fun t ht => ?_
      have ht0 : (t : ℂ) ≠ 0 := by
        have : (0 : ℝ) < t := lt_trans zero_lt_one ht
        exact_mod_cast this.ne'
      have hc : Continuous (fun σ : ℝ => rem a m t * (t : ℂ) ^ (-((σ : ℂ) + 1))) :=
        continuous_const.mul (Continuous.const_cpow (by fun_prop) (Or.inl ht0))
      exact (hc.tendsto 1).mono_left nhdsWithin_le_nhds
  have hσ : Tendsto (fun σ : ℝ => (σ : ℂ)) (𝓝[>] 1) (𝓝 ((1 : ℝ) : ℂ)) :=
    (Complex.continuous_ofReal.tendsto 1).mono_left nhdsWithin_le_nhds
  simpa using hσ.mul hI

5 · Mellin transform and positive residues#

Node

Declaration

Contract

Tier

Poles of the finite-family transform
producer · pole

Deduction.poleData

For each admissible finite family there exists a transform with PoleData for its zero set.

✓ kernel-checked

Lean source of these 1 declarations (excerpts printed from data/model.json)

Poles of the finite-family transform — Deduction.poleData, Development.AutomorphicArithmetic.DedekindLFunctions.LandauTheorems.poleData, lines 248–259. Idea: Assemble individual character transforms and their pole data using positive weights.

theorem poleData (F : CharFamily) : ∃ Φ : ℂ → ℂ, PoleData (gm F) Φ (zeroSet F) := by
  classical
  have adm' : ∀ i, F.N i = 1 ∨ (F.χ i)⁻¹ ≠ 1 := fun i => (F.adm i).imp id (fun h => inv_ne_one.mpr h)
  choose Φ1 hΦ1int hΦ1an hΦ1pol hΦ1iso using fun i => poleData_char (F.χ i) (F.adm i)
  choose Φ2 hΦ2int hΦ2an hΦ2pol hΦ2iso using fun i => poleData_char (F.χ i)⁻¹ (adm' i)
  choose C hC using fun i => Gchi_growth (F.χ i)
  have hZ : ∀ ρ, ρ ∈ zeroSet F ↔ 0 < ρ.re ∧ ∃ i, DirichletCharacter.LFunction (F.χ i) ρ = 0 ∨
      DirichletCharacter.LFunction (F.χ i) ((starRingEnd ℂ) ρ) = 0 := by
    intro ρ
    rw [zeroSet.eq_1]
    rfl
  have hconj : ∀ i (w : ℂ), DirichletCharacter.LFunction (F.χ i) ((starRingEnd ℂ) w) = 0 ↔

6 · The window criterion#

Node

Declaration

Contract

Tier

The analytic criterion for a level
reducer · form-b

UpperTheory.Comparison₂.formB

For every level, every λ>1 and 0<θ<1, arbitrarily late windows bounded by x^θ imply no zero right of θ.

⊂ in checked closure

The character-family power-window theorem
reducer · landau

Deduction.zeroFree_of_rpow_window

For a positive-weight family, a one-sided x^θ bound on arbitrarily late [Y,Y^(1+δ)] implies ZeroFree F θ.

✓ kernel-checked

Apply the pole obstruction
reducer · landau-lemma

Deduction.lemmaL

WindowHyp on a finite character family implies ZeroFree F θ in the given parameter range.

⊂ in checked closure

Rule out a pole right of θ
reducer · oscillation

Deduction.landau_window

For the supplied PoleData and WindowHypU, any ρ in the specified pole set satisfies Re(ρ)≤θ.

⊂ in checked closure

Lean source of these 4 declarations (excerpts printed from data/model.json)

The analytic criterion for a level — UpperTheory.Comparison₂.formB, Development.AutomorphicArithmetic.PrimitiveCosets.Imports, lines 8–19. Idea: Translate the level to a finite character family with positive weights. Apply the power-window theorem with δ=λ−1 and C=1.

theorem UpperTheory.Comparison₂.formB :
    ∀ Λ : Level, Λ.FormB := by
  intro Λ la hla θ hθ0 hθ1 hW
  obtain ⟨F, hG, hZ⟩ := UpperTheory.Comparison₂.level_family Λ
  rw [← hZ]
  refine Deduction.zeroFree_of_rpow_window F (δ := la - 1) (C := 1) hθ0 hθ1 (by linarith) fun Y₀ => ?_
  obtain ⟨Y, hY, hx⟩ := hW Y₀
  refine ⟨Y, hY, fun y hy => ?_⟩
  have h1 : (1 : ℝ) + (la - 1) = la := by ring
  rw [h1] at hy
  rw [hG, one_mul]
  exact hx y hy.1 hy.2

The character-family power-window theorem — Deduction.zeroFree_of_rpow_window, Development.AutomorphicArithmetic.DedekindLFunctions.LandauTheorems.ZeroFreeOfRpowWindow, lines 11–14. Idea: Pass to the weighted-integral formulation of the Landau window criterion.

theorem zeroFree_of_rpow_window (F : CharFamily) {θ δ C : ℝ} (hθ : 0 < θ) (hθ1 : θ < 1) (hδ : 0 < δ)
    (h : ∀ Y₀ : ℝ, ∃ Y : ℝ, Y₀ ≤ Y ∧ ∀ y ∈ Set.Icc Y (Y ^ (1 + δ)), Gm F y ≤ C * y ^ θ) :
    ZeroFree F θ :=
  lemmaL F hθ hθ1 hδ (windowHyp_of_rpow F hδ h)

Apply the pole obstruction — Deduction.lemmaL, Development.AutomorphicArithmetic.DedekindLFunctions.LandauTheorems.lemmaL, lines 13–22. Idea: Build the pole data, exclude zeros in the strip by the window lemma, and use established nonvanishing at Re(s)≥1.

theorem lemmaL (F : CharFamily) {θ δ : ℝ} (hθ : 0 < θ) (hθ1 : θ < 1) (hδ : 0 < δ) (h : WindowHyp F θ δ) :
    ZeroFree F θ := by
  intro i s hs hzero
  obtain ⟨Φ, hP⟩ := poleData F
  have hZ := landau_window hP hθ hθ1 hδ (windowHypU_of_windowHyp F hδ h)
  by_cases h1 : 1 ≤ s.re
  · exact charFamily_LFunction_ne_zero_of_one_le_re F i s h1 hzero
  · have hmem : s ∈ zeroSet F := ⟨by linarith, i, Or.inl hzero⟩
    have := hZ s hmem
    linarith

Rule out a pole right of θ — Deduction.landau_window, Development.AutomorphicArithmetic.DedekindLFunctions.LandauTheorems.landauWindow, lines 83–95. Idea: Use high derivatives to compare a window upper bound with growth from an isolated pole.

theorem landau_window {g : ℝ → ℝ} {Φ : ℂ → ℂ} {Z : Set ℂ} (hP : PoleData g Φ Z) {θ δ : ℝ}
    (hθ : 0 < θ) (hθ1 : θ < 1) (hδ : 0 < δ) (hW : WindowHypU g θ δ) : ∀ ρ ∈ Z, ρ.re ≤ θ := by
  intro ρ₀ h₀
  by_contra hρ₀
  rw [not_le] at hρ₀
  obtain ⟨σ, hσ, C, hkey⟩ := landau_window_key hP hθ hθ1 hδ hW
  have hle : ∀ ρ ∈ Z, ρ.re < σ := fun ρ hρ => (landau_pole_re_le hP ρ hρ).trans_lt hσ
  rcases landau_dichotomy hP.iso hle hθ (by linarith) h₀ hρ₀ with
    ⟨D, hD, hfree, ρ₁, h₁, hρ₁⟩ | ⟨β, hβZ, hβ, r, hr1, hr2, huniq⟩
  · obtain ⟨γ, ρ, hρ, r, hr1, hr2, huniq⟩ := landau_nearest hP.iso hle (by linarith : D < σ) h₁ hρ₁
    obtain ⟨c, hc, -, hp⟩ := hP.pole ρ hρ
    set z : ℂ := (σ : ℂ) + γ * I with hz
    have hzre : z.re = σ := by simp [hz]

7 · The order of choices#

Node

Declaration

Contract

Tier

Select the window width 3/2
reducer · zero-green

UpperTheory.Top.zero_free_all_of_green_v_win

Green, VWin and a nonempty definite-side package imply ZeroFreeAll.

◇ source-read

Produce primitive zero-free levels
reducer · zero-top

UpperTheory.Top.zeroFreeAll_of_topG

For λ>1, TopG and hosts for every primitive character imply ZeroFreeAll.

✓ kernel-checked

Assemble the cyclic levels
reducer · tied-cyc

Formalism.HC.zeroFreeOn_of_tiedWin_cyc

Uniform window bounds, FormB, and family existence for cyclic levels imply ZeroFreeOn Q.

⊂ in checked closure

Pass from levels to characters
reducer · tied

Formalism.HC.zeroFreeOn_of_tiedWin

Appropriate level data for each ψ satisfying Q imply ZeroFreeOn Q.

⊂ in checked closure

Choose epsilon after a candidate zero
reducer · window-consumer

Formalism.HC.level_of_tiedWin

At any level, the chosen uniform arithmetic window and the analytic criterion imply zero-freeness right of one half.

⊂ in checked closure

Lean source of these 5 declarations (excerpts printed from data/model.json)

Select the window width 3/2 — UpperTheory.Top.zero_free_all_of_green_v_win, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.TopPlug, lines 12–15. Idea: Eliminate the nonempty package. Its shape supplies TopG and VWin supplies hosts for each primitive character.

theorem UpperTheory.Top.zero_free_all_of_green_v_win (hG : GlobalTheory.GLq.Green) (hV : UpperTheory.Top.VWin)
    (h : Nonempty (_root_.GlobalTheory.Fc.HypsAlt (fun 𝒞 => Closed 𝒞 fun Fm _ => LinkN Fm) _root_.GlobalTheory.Fc.DefiniteSideCondition)) : Formalism.HC.ZeroFreeAll :=
  h.elim fun h => UpperTheory.Top.zeroFreeAll_of_topG (la := 3 / 2) (by norm_num)
    (_root_.GlobalTheory.Fc.forall_goal_of_shape_of_hyps _ _ _ _ (_root_.UpperTheory.Top.shape_closed_link_n_of_green hG) trivial trivial h) fun ψ => UpperTheory.Top.supplyChi ψ (hV ψ)

Produce primitive zero-free levels — UpperTheory.Top.zeroFreeAll_of_topG, Development.AutomorphicArithmetic.CharacterBoxes.ZeroFreeAllOfTopG, lines 26–34. Idea: Combine the host supply, bound on tied families and the analytic criterion at each cyclic level.

theorem zeroFreeAll_of_topG {la : ℝ} (hla : 1 < la) (h : TopG) (hS : ∀ ψ : PChar, HostExW la (GChi ψ).req) : ZeroFreeAll := by
  have key : ZeroFreeOn fun _ => True :=
    zeroFreeOn_of_tiedWin_cyc (Fam := FamP) (core := fun Fm => Fm.toFamCore) (Tied := fun Fm => ChainTied Fm) hla
      (fun ψ _ => UpperTheory.Comparison₂.level_gm_le_on_family_scales _) (fun ψ _ => UpperTheory.Comparison₂.formB _) fun ψ _ => by
        obtain ⟨eD, eL, ε₁, h1, h2⟩ := h la (GChi ψ) hla (hS ψ) (hypV_of_cls ψ la)
        refine ⟨eD, eL, ε₁, h1, fun eps a b => ?_⟩
        obtain ⟨Fm, c, d⟩ := h2 eps a b
        exact ⟨Fm, eFamC_of_cls ψ la Fm c, c.1, d⟩
  exact key

Assemble the cyclic levels — Formalism.HC.zeroFreeOn_of_tiedWin_cyc, Formalism.SharpRestriction.RamificationFrobenius.TotientGaloisClasses.TopWin, lines 90–93. Idea: A primitive character belongs to its own cyclic level, so the level criterion covers it.

theorem zeroFreeOn_of_tiedWin_cyc {Q : PChar → Prop} {la : ℝ} (hla : 1 < la)
    (h112 : ∀ ψ, Q ψ → ChebyshevInequalityOnWindows @core @Tied (Level.cyc ψ)) (hB : ∀ ψ, Q ψ → (Level.cyc ψ).FormB)
    (h : ∀ ψ, Q ψ → ChebyshevInequalityAtWindowScale @core @Tied la (Level.cyc ψ)) : ZeroFreeOn Q :=
  zeroFreeOn_of_tiedWin fun ψ hψ => ⟨_, la, Level.mem_cyc ψ, hla, h112 ψ hψ, hB ψ hψ, h ψ hψ⟩

Pass from levels to characters — Formalism.HC.zeroFreeOn_of_tiedWin, Formalism.SharpRestriction.RamificationFrobenius.TotientGaloisClasses.TopWin, lines 83–88. Idea: Extract the appropriate level and invoke level_of_tiedWin.

theorem zeroFreeOn_of_tiedWin {Q : PChar → Prop}
    (h : ∀ ψ, Q ψ → ∃ (Λ : Level) (la : ℝ), ψ ∈ Λ.KEPT ∧ 1 < la ∧ ChebyshevInequalityOnWindows @core @Tied Λ ∧ Λ.FormB ∧
      ChebyshevInequalityAtWindowScale @core @Tied la Λ) : ZeroFreeOn Q :=
  zeroFreeOn_of_levels fun ψ hψ => by
    obtain ⟨Λ, la, a, b, c, d, e⟩ := h ψ hψ
    exact ⟨Λ, a, level_of_tiedWin c (d la b) e⟩

Choose epsilon after a candidate zero — Formalism.HC.level_of_tiedWin, Formalism.SharpRestriction.RamificationFrobenius.TotientGaloisClasses.TopWin, lines 68–81. Idea: Take θ strictly between one half and the candidate real part, then choose ε with the loss exponent below θ.

theorem level_of_tiedWin {Λ : Level} {la : ℝ} (h112 : ChebyshevInequalityOnWindows @core @Tied Λ) (hB : Λ.FormBAt la)
    (h : ChebyshevInequalityAtWindowScale @core @Tied la Λ) : Λ.ZeroFreeLevel := by
  obtain ⟨eD, eL, ε₁, h1, h⟩ := h
  intro ψ hψ s hs
  have hm1 : min (s.re - 1 / 2) (1 / 2) ≤ s.re - 1 / 2 := min_le_left _ _
  have hm2 : min (s.re - 1 / 2) (1 / 2) ≤ 1 / 2 := min_le_right _ _
  have hm0 : 0 < min (s.re - 1 / 2) (1 / 2) := lt_min (by linarith) (by norm_num)
  obtain ⟨ε, hε0, hεlt, hCe⟩ := exists_small_eps (eD + eL + 7) (half_pos hm0) h1
  obtain ⟨Fm, hE, hW, hT⟩ := h ε hε0 hεlt
  obtain ⟨x1, hx⟩ := h112 eD eL ε hε0 Fm hE hT
  refine hB (1 / 2 + min (s.re - 1 / 2) (1 / 2) / 2) (by linarith) (by linarith)
    (((windows_iff _ la).1 hW).mono (x0 := max x1 1) fun y hy hw => ?_) ψ hψ s (by linarith)
  exact (hx y (le_of_max_le_left hy) hw).trans
    (Real.rpow_le_rpow_of_exponent_le (le_of_max_le_right hy) (by linarith))

8 · The finite character comparison#

Node

Declaration

Contract

Tier

The prime-sum inequality on tied families
reducer · prime-bound

UpperTheory.Comparison₂.level_gm_le_on_family_scales

For every level, tied compatible families yield the windowed upper bound on the weighted prime sum.

⊂ in checked closure

Estimate the weighted level on a window
reducer · artin-window

UpperTheory.Comparison₂.windowInequality_of_artinInputs

Identification of tied families with controlled host data gives ChebyshevInequalityOnWindows at any level.

✓ kernel-checked

From the height discrepancy to the prime sum
reducer · core-gm

UpperTheory.Comparison₂.core_gm

For large x, EAtH and CoreAtH imply G_P(x)≤x^(1/2+(eD+eL+7)ε).

✓ kernel-checked

Bound the discrepancy per index
reducer · ch-top

Deduction.ch_top

The named identifications and size, error, and norm windows give an upper bound for gapA.

✓ kernel-checked

Average over characters
reducer · ch-core

Deduction.ch_core

Under the size and character hypotheses, per-index discrepancy bounds imply a power bound for GmA up to SigA.

✓ kernel-checked

Lean source of these 5 declarations (excerpts printed from data/model.json)

The prime-sum inequality on tied families — UpperTheory.Comparison₂.level_gm_le_on_family_scales, Development.AutomorphicArithmetic.PrimitiveCosets.LevelGmLeOnFamilyScales, lines 28–30. Idea: Translate ChainTied into the shared host data and call the Artin-input window theorem.

theorem level_gm_le_on_family_scales (Λ : Level) :
    ChebyshevInequalityOnWindows (Fam := FamP) (fun Fm => Fm.toFamCore) (fun Fm => ChainTied Fm) Λ :=
  windowInequality_of_artinInputs (fun Fm => tiedCore_of_chainTied Fm) Λ

Estimate the weighted level on a window — UpperTheory.Comparison₂.windowInequality_of_artinInputs, Development.AutomorphicArithmetic.PrimitiveCosets.WindowInequalityOfArtinInputs, lines 17–25. Idea: Choose thresholds for the arithmetic and family estimates and obtain a compatible witness at each scale in the window.

theorem windowInequality_of_artinInputs
    (h : ∀ {eps : ℝ} (Fm : Fam eps) (eD eL K cHH eK CL x : ℝ), Tied Fm eD eL K cHH eK CL x → FamCoreConstantBounds (core Fm) eD eL K cHH eK x)
    (Λ : Level) : ChebyshevInequalityOnWindows @core @Tied Λ := by
  rintro eD eL eps he Fm ⟨C, xE, hE⟩ ⟨K, cHH, eK, CL, x0, hT⟩
  obtain ⟨x1, hx1⟩ := core_gm Λ eD eL K cHH eK C eps he
  refine ⟨max x1 (max x0 xE), fun x hx hw => ?_⟩
  have b := le_of_max_le_right hx
  obtain ⟨i, hi⟩ := h Fm _ _ _ _ _ _ _ (hT x (le_of_max_le_left b) hw)
  exact hx1 x (le_of_max_le_left hx) _ ((core Fm).D x i).host.toHostAx _ (hE x (le_of_max_le_right b) i) hi

From the height discrepancy to the prime sum — UpperTheory.Comparison₂.core_gm, Development.AutomorphicArithmetic.PrimitiveCosets.CoreGm, lines 12–74. Idea: Bound the per-index discrepancy, average via the character estimate and absorb the level-dependent factor into x^ε.

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.ε))
  have h4 := mul_le_mul_of_nonneg_left h1 (show 0 ≤ 4 * (Λ.o : ℝ) by positivity)
  rw [h2]
  linarith

Bound the discrepancy per index — Deduction.ch_top, Development.AutomorphicArithmetic.DedekindLFunctions.LandauTheorems.ChTop, lines 37–72. Idea: Write gapA as ASK minus Main, then combine the per-index estimate and the error bracket.

theorem ch_top {H : Type} [AddCommGroup H] [Fintype H] [DecidableEq H] {U0 : Type} [Fintype U0] {W : U0 → Type} [∀ u0, Fintype (W u0)] [∀ u0, Nonempty (W u0)]
    {Top : Type} [Fintype Top] {m f : ℕ} (Dd : Data U0 W Top m f) (tr : U0 → H) (C : Consts) (Xpp eK K : ℝ)
    (D : ArithData H) (ell : AddChar (E0 × H) ℂ → ℂ) (N : ℕ) (TT T2 : Finset H) (a : H → ℝ)
    (w : H → Fin m → E0 × H → ℝ) (eT : Top ≃ TT) (eP : Fin f ≃ PhiSet (H := H))
    (h1 : IdentU Dd tr D N ell TT a w eT eP) (h2 : SizeData₂ Dd C Xpp) (h3 : ErrWindows Dd C Xpp eK K) (h4 : BNBoundsU Dd T2)
    (h5 : LargeX Dd.x Dd.ε K C.cHH eK) (u : U0) :
    gapA D N ell TT a w (tr u) ≤
      Dd.x ^ (CErr C * Dd.ε) * errorBracketSizeWindows Dd.x Dd.ε (Fintype.card H) TT.card T2.card m Dd.b Dd.k Dd.a := by
  have hmain := ch_top_main_eq Dd tr D N ell TT a w eT eP h1 u
  have hask := h1.2.2.2.2 u
  have hgap : gapA D N ell TT a w (tr u) = Dd.ASK u - Dd.Main u := by
    rw [hask, hmain]
    unfold gapA
    rw [← Finset.sum_sub_distrib]
    refine Finset.sum_congr rfl fun t _ => ?_
    rw [← Finset.sum_sub_distrib]
  obtain ⟨s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11⟩ := h2
  have hle := each_unit_bound_statement Dd C Xpp s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 u
  have herr := errX5at_le Dd C Xpp eK K h3 h5 u
  have hnT : Dd.nT = (TT.card : ℝ) := by
    unfold Data.nT
    have := Fintype.card_congr eT
    rw [Fintype.card_coe] at this
    exact_mod_cast this
  have htext : ErrText Dd ≤ errorBracketSizeWindows Dd.x Dd.ε (Fintype.card H) TT.card T2.card m Dd.b Dd.k Dd.a := by
    unfold ErrText errorBracketSizeWindows
    rw [hnT]
    have hm : (0 : ℝ) ≤ m := Nat.cast_nonneg m
    gcongr
    · exact h4.1
    · exact h4.2
  have hpow : 0 ≤ Dd.x ^ (CErr C * Dd.ε) := Real.rpow_nonneg s1.1.le _
  rw [hgap]
  calc Dd.ASK u - Dd.Main u ≤ _ := by linarith
    _ ≤ _ := herr
    _ ≤ _ := mul_le_mul_of_nonneg_left htext hpow

Average over characters — Deduction.ch_core, Development.AutomorphicArithmetic.DedekindLFunctions.LandauTheorems.ChCore, lines 343–351. Idea: Character orthogonality and scale estimates convert the indexed bounds into a weighted average.

theorem ch_core (C ε CE Ko c M : ℝ) (hC : 0 ≤ C) (hε : 0 < ε) (hc : |c| ≤ 1) : ∃ x1 : ℝ, ∀ x ≥ x1,
    ∀ (H : Type) [AddCommGroup H] [Fintype H] [DecidableEq H] (m : ℕ) (D : ArithData H) (S : Finset ℕ)
      (ell : AddChar (E0 × H) ℂ → ℂ) (N : ℕ) (TT T2 : Finset H) (a : H → ℝ) (w : H → Fin m → E0 × H → ℝ)
      (b b' k aE η X' θ : ℝ) (A0 : AddSubgroup H) (Kp : Finset (AddChar (E0 × H) ℂ)),
      HostFactsS D S → 0 < b → 0 ≤ aE → 0 < k → (m : ℝ) ≤ x ^ ((1 : ℝ) / 2 + ε / 2) → x * m ≤ k →
      SizesA A0 TT T2 a w N x b b' η X' θ → ThinScales D ell X' θ → CostWindows x (fPl H) b η θ →
      RestSize ε x (Fintype.card H) TT.card T2.card m b k aE → (∀ s ∈ T2, s ∈ A0) → CharsA ell A0 Kp TT c M Ko CE ε x →
      (∀ u ∈ A0, gapA D N ell TT a w u ≤ x ^ (C * ε) * errorBracketSizeWindows x ε (Fintype.card H) TT.card T2.card m b k aE) →
      GmA D ell Kp c x ≤ x ^ ((1 : ℝ) / 2 + (C + 3) * ε) + SigA D ell A0 Kp x := by

9 · The geometric family and the theta chain#

Node

Declaration

Contract

Tier

Apply the shape to the same chosen data
reducer · goal-shape

GlobalTheory.Fc.forall_goal_of_shape_of_hyps

For propositions V, NR, G and a class predicate N, take TopShapeAlt V NR N G, V, NR and HypsAlt N DefiniteSideCondition to G.

◇ source-read

Supply the actual fields of the shape
reducer · shape-fields

GlobalTheory.Fc.goal_of_shape_of_hyps

TopShapeAlt V NR N G with V, NR and HypsAlt N DefiniteSideCondition yields G.

◇ source-read

Choose a common geometric family
reducer · shape

UpperTheory.Top.shape_closed_link_n_of_green

Green implies the specified TopShapeAlt ending in TopG.

◇ source-read

Combine divisibility, slopes and windows
reducer · family-design

UpperTheory.Top.topDesWin

The listed existence, local, rank, divisibility, global and slope controls produce FamilyClassConnected.

◇ source-read

Control the local divisibility loss
reducer · divin

UpperTheory.Top.divinN_of_hypV

For ε>0, HypV, LinkN and SmallLevelRankEq imply DIVinN on the family.

◇ source-read

Sum the local losses
reducer · vv-sum

UpperTheory.Top.vvRecord

VVle gives finite cohomology lengths, summability and the bound on the infinite sum of vvTerm.

◇ source-read

The geometric ranks
definition · rank

GlobalTheory.EX.RankVal

In particular, sqrt(x δ₁)≤m≤2 sqrt(x δ₁), with δ₁=x^(−ε/8).

◇ source-read

A local source of divisibility
lemma · minor

Formalism.MainNotions.ColumnSystems.Pf.key_minor_dvd

For w²=p and the displayed congruences, w divides a two-by-two minor.

✓ kernel-checked

An existence check on a period identity
lemma · empty-data

GlobalTheory.Fam.volLev_mul_wt_mid_alt

At a suitable intermediate stage there exists v≠0 such that level volume times character weight equals v at every admissible datum.

◇ source-read

The lattice slope inequality
lemma · slope

Formalism.F.slopeInequality_of

The sublattice bound SlopeLeMuMax implies SlopeInequality for injective norm-bounded lattice maps.

◇ source-read

The square-root multiplicity analogy
motivation · paper-chain

announcement, p. 1

The author describes repeated theta lifts as a number-field analogue of multiplicity in the function-field argument.

○ motivation

Lean source of these 10 declarations (excerpts printed from data/model.json)

Apply the shape to the same chosen data — GlobalTheory.Fc.forall_goal_of_shape_of_hyps, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.ShapeOf, lines 31–32. Idea: For the primitive zero-free argument both auxiliary propositions are trivial. The concrete input is the chosen definite-side record.

theorem GlobalTheory.Fc.forall_goal_of_shape_of_hyps : ∀ (V NR : Prop) (N : FamClass → Prop) (G : Prop), _root_.GlobalTheory.Fc.TopShapeAlt V NR N G → V → NR → _root_.GlobalTheory.Fc.HypsAlt N _root_.GlobalTheory.Fc.DefiniteSideCondition → G :=
  fun V NR N G t hV hR h => _root_.GlobalTheory.Fc.goal_of_shape_of_hyps V NR N G t hV hR h

Supply the actual fields of the shape — GlobalTheory.Fc.goal_of_shape_of_hyps, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.ShapeOf, lines 24–30. Idea: Extract the selection, base level, columns, rank and divisibility inputs, and pass the period, local and global fields to the shape.

theorem GlobalTheory.Fc.goal_of_shape_of_hyps (V NR : Prop) (N : FamClass → Prop) (G : Prop) (t : _root_.GlobalTheory.Fc.TopShapeAlt V NR N G) (hV : V) (hR : NR) (h : _root_.GlobalTheory.Fc.HypsAlt N _root_.GlobalTheory.Fc.DefiniteSideCondition) : G :=
  t h.𝒜 h.cT h.hEx (_root_.GlobalTheory.Fc.familySelection h.σ) h.hduty (_root_.GlobalTheory.Fc.spectralConditionOfRawSelection h.σ) (_root_.GlobalTheory.Fc.baseLevelChoiceOfRawSelection h.σ) (_root_.GlobalTheory.Fc.definiteHeightOfRawSelection h.σ) (fun Fm hc x hx k i => (_root_.GlobalTheory.Fc.columnChoiceOfRawSelection h.σ Fm hc x hx k i).toS) (_root_.GlobalTheory.Fc.selectionBundleOfRawSelection h.σ) h.hRB h.hTw h.hPA h.hLamP
    (fun Fm hc x hx k i => (GlobalTheory.Cp.divRows3G_iff _).1 (h.hDivG Fm hc x hx k i)) h.hDcPtG h.hTu h.hn4 h.hLit hV h.hWu h.hRF h.hTF h.c30 h.hc30 h.sTy h.sNG h.sM h.sLp h.sO h.h30 h.hInstR h.selJ h.jOn h.hMt
    (h.rRows.imp fun Fm CH _ r hc => let ⟨C, h0, x0, r⟩ := r hc
      ⟨C, h0, x0, fun x hx k hx0 i => let ⟨a, d⟩ := r x hx k hx0 i
        ⟨⟨a.w1, a.covol, a.onto, a.lamLow, a.seeIso, a.miStar, a.fun0, a.pass, a.kap⟩, d⟩⟩)
    h.aPt0 h.aPtTw h.aPer0 h.aPerTw h.aP10 h.aAtG h.aC2 ((_root_.GlobalTheory.Cp.serv_t_iff_formalism_serv_t _ _).1 h.hServ) hR h.nRest h.cIc h.hcI h.irrC h.zL h.tie h.hU h.hG

Choose a common geometric family — UpperTheory.Top.shape_closed_link_n_of_green, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.TopShape, lines 33–55. Idea: Calls topDesWin with Cabs=2, C0=3, eD=2 and eL=0. This fixes both analytic loss exponents.

theorem UpperTheory.Top.shape_closed_link_n_of_green : GlobalTheory.GLq.Green → _root_.GlobalTheory.Fc.TopShapeAlt 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 := _root_.GlobalTheory.Top.link_brest_alt 𝒜 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, _root_.Formalism.L2.Top4.EventuallyAlongSelection sel Fm (d3_a hc) ((_root_.Formalism.L2.Top4.SingleMapCondition 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 := _root_.GlobalTheory.Top.closed_family_admissible_twist_link_alt 𝒜 sel aPt0 aPtTw aPer0 aPerTw aP10 aAtG hServ
  have hC5 := _root_.GlobalTheory.Top.selection_closed_of_wu_decay_alt 𝒜 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 →
      _root_.Formalism.L2.DIV.DivisionKernelConstantBounds Fm (_root_.Formalism.L2.Top4.RankOfDivisionKernel sel selS selP selDH selC (_root_.Formalism.L2.Top4.kernelChoiceOfSelection selB) (_root_.Formalism.L2.Top4.indefiniteRealisationChoiceOfSelection 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_alt (fun hN => _root_.GlobalTheory.Top.wire_sel_alt 𝒜 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 := _root_.Formalism.L2.DIV.closed_linkDIVt_of_closed_bridge_kernel (D3 3 𝒜) 2 (_root_.Formalism.L2.Top4.RankOfDivisionKernel sel selS selP selDH selC (_root_.Formalism.L2.Top4.kernelChoiceOfSelection selB) (_root_.Formalism.L2.Top4.indefiniteRealisationChoiceOfSelection 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 := _root_.GlobalTheory.Top.designExists_of_tuSize_aux4n_litThin (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 (_root_.GlobalTheory.Top.closed_linkEta_of_duty 𝒜 sel hduty)
    (_root_.GlobalTheory.Top.Irr.closed_linkIRR_of_join_count hGreen 𝒜 sel cIc hcI irrC) (_root_.GlobalTheory.Top.link_alt_alt_alt 𝒜 sel selS selP selDH selC selB hPA hLamP hDivG zL) hDIV hgl.1 (_root_.GlobalTheory.Top.closed_linkG_of_duty 𝒜 sel hduty)
    (_root_.GlobalTheory.Top.link_alt_alt_bis 𝒜 sel selS hWu hRF hTF c30 hc30 sTy sNG sM sLp sO h30 hInstR) hgl.2

Combine divisibility, slopes and windows — UpperTheory.Top.topDesWin, Development.AutomorphicArithmetic.CharacterBoxes.DesWin, lines 11–31. Idea: Construct one family after taking a common epsilon threshold. Its loss exponents are the given eD and eL.

theorem topDesWin (𝒞 𝒞' ℰ : FamClass) (Cabs C0 eD eL : ℝ) (hEx : DesignExists (WithTw (WithSm 𝒞')) C0)
    (h1 : ∀ {eps : ℝ} (Fm : FamP eps), 𝒞' Fm → 𝒞 Fm) (h2 : ∀ {eps : ℝ} (Fm : FamP eps), 𝒞' Fm → ℰ Fm)
    (hV : ∀ {eps : ℝ} (Fm : FamP eps), ℰ Fm → HypV Fm.toFamCore)
    (hN : Closed (Des 𝒞 C0) fun Fm _ => LinkN Fm)
    (hEta : Closed (Des 𝒞 C0) fun Fm _ => LinkEta Fm)
    (hIRR : Closed (Des 𝒞 C0) fun Fm _ => LinkIRR Fm)
    (hZ : Closed (Des 𝒞 C0) fun Fm _ => SmallLevelRankEq Fm)
    (hDIV : Closed (Des 𝒞 C0) fun Fm CH => TuSize Fm → DGamSize Fm → LinkDIVt Fm Cabs CH)
    (hRk : Closed (Des 𝒞 C0) fun Fm CH => ChosenE Fm C0 CH → NuFullF Fm ∧ J.MuRank Fm)
    (hG : Closed (Des 𝒞 C0) fun Fm _ => LinkG Fm)
    (hS : Closed (Des 𝒞 C0) fun Fm _ => TuSize Fm → LinkS Fm C0)
    (hGL : Closed (Des 𝒞 C0) fun Fm CH => TuSize Fm → DGamSize Fm → LinkGLOBAL Fm Cabs CH C0 eD eL) : FamilyClassConnected ℰ := by
  obtain ⟨ε1, hε1, hA⟩ := hN.and (hDIV.and (hEta.and (hIRR.and (hZ.and (hRk.and (hG.and (hS.and hGL)))))))
  obtain ⟨ε3, hε3, hEx⟩ := hEx
  refine ⟨eD, eL, min ε1 ε3, lt_min hε1 hε3, fun ε h0 hlt => ?_⟩
  obtain ⟨K, hK⟩ := hA ε h0 (le_of_lt (lt_of_lt_of_le hlt (min_le_left _ _)))
  obtain ⟨Fm, CH, hc, -, hL, hCh, hT, hDG⟩ := hEx ε h0 (le_of_lt (lt_of_lt_of_le hlt (min_le_right _ _))) K
  obtain ⟨aN, aD, aE, aI, aZ, aR, aG, aS, aGL⟩ := hK Fm CH ⟨⟨⟨h1 Fm hc.1.1, hc.1.2⟩, hc.2⟩, ⟨CH, hCh⟩, hT, hDG⟩ hL
  have hD := aD hT hDG aE (divinN_of_hypV Fm h0 (hV Fm (h2 Fm hc.1.1)) aN aZ)
  exact ⟨Fm, h2 Fm hc.1.1, aGL hT hDG hCh ⟨aG, aS hT, aI, hD,
    J.linkMu_of_linkDIV Fm hD (aR hCh).1 (aR hCh).2 (muTu_of_tuSize Fm h0 hT) (J.muDGam_of_fact Fm hDG)⟩⟩

Control the local divisibility loss — UpperTheory.Top.divinN_of_hypV, Development.AutomorphicArithmetic.CharacterBoxes.DivinNOfHypV, lines 117–130. Idea: Bound the weighted cohomology sum, replace the rank and absorb log²x into x^ε.

theorem divinN_of_hypV {eps : ℝ} (Fm : FamP eps) (heps : 0 < eps) (hV : HypV Fm.toFamCore) (hN : LinkN Fm) (hR : SmallLevelRankEq Fm) :
    DIVinN Fm := by
  obtain ⟨x1, h1⟩ := hV
  obtain ⟨C, x3, h3⟩ := hN
  obtain ⟨x4, h4⟩ := hR
  obtain ⟨x6, h6⟩ := log_sq_le_rpow heps
  refine ⟨|C| + 1, max (max x1 (max x3 x4)) (max x6 (Fm.x1 + 1)), fun x hx i j hj => ?_⟩
  simp only [ge_iff_le, max_le_iff] at hx
  obtain ⟨⟨g1, g3, g4⟩, g6, g7⟩ := hx
  obtain ⟨hf, hs, hle⟩ := vvRecord _ _ (h1 x g1 i)
  have hb : 1 ≤ (Fm.L x i).sc.b := Real.one_le_exp (Real.rpow_nonneg (by linarith [(Fm.L x i).sc.one_lt_alt]) _)
  refine divinN_at _ j C hj (h3 x g3 i hf j hj) hs (hle.trans (Real.sqrt_le_self_iff.2 (Or.inr hb))) (h4 x g4 i j hj) ?_
  rw [Fm.L_x x i (by linarith), Fm.L_eps x i]
  exact h6 x g6

Sum the local losses — UpperTheory.Top.vvRecord, Development.AutomorphicArithmetic.CharacterBoxes.DivinNOfHypV, lines 17–57. Idea: Apply the bounded-partial-sums criterion to nonnegative prime contributions.

theorem vvRecord (D : D7) (B : ℝ) (h : VVle D.host.E D.R.t B) :
    ShaFinOdd D ∧ Summable (vvTerm D) ∧ ∑' l, vvTerm D l ≤ B := by
  letI := D.nd.instOm
  letI := D.nd.algOm
  haveI := D.nd.acOm
  obtain ⟨h1, h2⟩ := h D.nd.Om D.nd.ldat
  have key : ∀ (p : ℕ) [Fact p.Prime], ((∑ e ∈ Finset.Ico 1 D.R.t, D.what₂.shaLen p e : ℚ) : ℝ) =
      ∑ e ∈ Finset.Ico 1 D.R.t, ((Formalism.GaloisCohomology.shaLen (D.nd.ldat p) (e : ℤ)).toNat : ℝ) := by
    intro p _
    push_cast
    refine Finset.sum_congr rfl fun e he => ?_
    obtain ⟨a, b⟩ := Finset.mem_Ico.1 he
    rw [D.nd.sha_eq p e a b _ (ENat.coe_toNat (h1 p e a b)).symm]
    norm_cast
  have bd : ∀ l : ℕ, 0 ≤ vvTerm D l ∧ ∀ hl : l.Prime, vvTerm D l ≤ Real.log l *
      ∑ e ∈ Finset.Ico 1 D.R.t, ((@Formalism.GaloisCohomology.shaLen _ D.nd.Om _ _ _ _ _ l ⟨hl⟩ (@Formalism.BasicNotions.NData.ldat _ _ _ D.nd l ⟨hl⟩) (e : ℤ)).toNat : ℝ) := by
    intro l
    by_cases hl : l.Prime
    · haveI : Fact l.Prime := ⟨hl⟩
      have hk := key l
      have hn : 0 ≤ Real.log l * ∑ e ∈ Finset.Ico 1 D.R.t, ((Formalism.GaloisCohomology.shaLen (D.nd.ldat l) (e : ℤ)).toNat : ℝ) :=
        mul_nonneg (Real.log_natCast_nonneg _) (Finset.sum_nonneg fun _ _ => Nat.cast_nonneg _)
      unfold vvTerm
      split_ifs
      all_goals first
        | exact ⟨le_rfl, fun _ => hn⟩
        | (rw [hk, mul_comm]; exact ⟨hn, fun _ => le_rfl⟩)
    · have : vvTerm D l = 0 := by unfold vvTerm; simp [hl]
      exact ⟨this.ge, fun h => absurd h hl⟩
  have part : ∀ s : Finset ℕ, ∑ l ∈ s, vvTerm D l ≤ B := by
    intro s
    classical
    refine le_trans ?_ (h2 (s.subtype Nat.Prime))
    rw [← Finset.sum_filter_of_ne (p := Nat.Prime) (fun l _ hne => by
      by_contra hl
      exact hne (by unfold vvTerm; simp [hl])), ← Finset.sum_subtype_eq_sum_filter]
    exact Finset.sum_le_sum fun l _ => (bd l).2 l.2
  refine ⟨?_, summable_of_sum_le (fun l => (bd l).1) part, Real.tsum_le_of_sum_le (fun l => (bd l).1) part⟩
  intro p _ e
  intros
  exact h1 p e ‹_› ‹_›

The geometric ranks — GlobalTheory.EX.RankVal, Development.AbelianVarietyTheory.Definitions.GlobalTwisting.PairRowIffQdRows, lines 28–32. Idea: The precise fixed-epsilon rank scale is x^(1/2−ε/16).

def RankVal (s : Scale) (R : Ranks) : Prop :=
  (s.x ^ (2 + 8 * s.eps) ≤ (R.n : ℝ) ∧ (R.n : ℝ) ≤ 2 * s.x ^ (2 + 8 * s.eps)) ∧
  (Real.sqrt (s.x * s.delta1) ≤ (R.m : ℝ) ∧ (R.m : ℝ) ≤ 2 * Real.sqrt (s.x * s.delta1)) ∧
  (s.x ^ (9 / 2 + 10 * s.eps) ≤ (R.k : ℝ) ∧ (R.k : ℝ) ≤ 2 * s.x ^ (9 / 2 + 10 * s.eps)) ∧
  R.r + R.t = 8 * R.f * R.r + 4 + TOv s * nWv R s

A local source of divisibility — Formalism.MainNotions.ColumnSystems.Pf.key_minor_dvd, Formalism.SharpRestriction.GrowthBounds.CoarseMultiplicity.KeyMinorDvd, lines 132–155. Idea: In the quotient by w the two transformed rows are multiples of one row. Their minor vanishes.

theorem key_minor_dvd {A : Type} [CommRing A] (p : ℕ) (hp : p.Prime) (w : A) (hw : w ^ 2 = (p : A)) (k e : ℕ)
    (u u' : Fin (k + 1) → A) (M N' : Fin (k + 1) → Fin (k + 1) → A)
    (hMN : ∀ b a, ∃ T, M b a ^ (p ^ e) = N' b a + p * T)
    (hu : ∀ b, b ≠ 0 → w ∣ u b) (hu' : ∀ b, b ≠ 0 → w ∣ u' b) (c : Fin (k + 1)) :
    w ∣ (∑ b, u' b * N' b c) * (∑ b, u b * M b 0) ^ (p ^ e) - (∑ b, u' b * N' b 0) * (∑ b, u b * M b c) ^ (p ^ e) := by

  apply (Ideal.Quotient.eq_zero_iff_dvd w _).mp
  set φ := Ideal.Quotient.mk (Ideal.span {w}) with hφ
  have hw0 : φ w = 0 := (Ideal.Quotient.eq_zero_iff_dvd w w).mpr dvd_rfl
  have hp0 : φ (p : A) = 0 := by rw [← hw, map_pow, hw0, zero_pow two_ne_zero]
  have hrow : ∀ (x : Fin (k + 1) → A) (Q : Fin (k + 1) → Fin (k + 1) → A), (∀ b, b ≠ 0 → w ∣ x b) →
      ∀ a, φ (∑ b, x b * Q b a) = φ (x 0) * φ (Q 0 a) := by
    intro x Q hx a
    have hz : ∀ i : Fin k, φ (x i.succ) = 0 := fun i =>
      (Ideal.Quotient.eq_zero_iff_dvd w _).mpr (hx _ (Fin.succ_ne_zero _))
    rw [map_sum, Fin.sum_univ_succ, map_mul]
    simp [hz]
  have hpow : ∀ a, φ (M 0 a) ^ (p ^ e) = φ (N' 0 a) := by
    intro a
    obtain ⟨T, hT⟩ := hMN 0 a
    rw [← map_pow, hT, map_add, map_mul, hp0, zero_mul, add_zero]
  rw [map_sub, map_mul, map_mul, map_pow, map_pow, hrow u' N' hu' c, hrow u M hu 0, hrow u' N' hu' 0,
    hrow u M hu c, mul_pow, mul_pow, hpow 0, hpow c]
  ring

An existence check on a period identity — GlobalTheory.Fam.volLev_mul_wt_mid_alt, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.VolLevMulWtMid, lines 24–51. Idea: Haar measure times index is constant. When the permitted datum set is empty the theorem explicitly chooses v=1.

theorem volLev_mul_wt_mid_alt : ∀ {B : GlobalTheory.Mem.Base} {X : PreX B.toPre} {I : TC B X} {l : I.Laws} {Z : TC.Later B (I.cols l)} {L : SizeData₂ (I.rec7 l Z)} {hT : GatTies (I.rec7 l Z)} {Gi : Formalism.MainNotions.G.Inst (I.rec7 l Z) L} {Gl : Formalism.MainNotions.G.LatInst (I.rec7 l Z)} {Kc : Formalism.MainNotions.G.Consts} {Yd : DivX (I.rec7 l Z)} {cX : ExtraC} {ex : Extra (I.rec7 l Z) L hT Gi Gl Kc Yd cX} (W : _root_.GlobalTheory.MiS.RealPackAlt ex), _root_.GlobalTheory.Fam.AllFamilyConditions W → ∀ (u : B.Word) (a : _root_.GlobalTheory.Fam.GeometricFamily W u), a.Is → a.True → ∀ j, j + 2 ≤ B.R.m → ∃ v : ℂ, v ≠ 0 ∧ ∀ t (J : _root_.GlobalTheory.Fam.QuadraticExtensionData a t), J.Reads → ∀ α, (GlobalTheory.SeeSaw.volLev (a.g.x j).vol (J.A.U j (J.ι j α)) : ℂ) * J.wt j α = v := by
  intro B X I l Z L hT Gi Gl Kc Yd cX ex W hW u a ha haT j hj
  obtain ⟨Up, hUpf, hUpc, hK⟩ := _root_.GlobalTheory.T.true_geometry_step_value_alt W hW u a ha haT j hj
  have step : ∀ t (J : _root_.GlobalTheory.Fam.QuadraticExtensionData a t), J.Reads → ∀ α : J.Ch j,
      (GlobalTheory.SeeSaw.volLev (a.g.x j).vol (J.A.U j (J.ι j α)) : ℂ) * J.wt j α = (GlobalTheory.SeeSaw.volLev (a.g.x j).vol Up : ℂ) ∧
        J.wt j α ≠ 0 ∧ GlobalTheory.SeeSaw.volLev (a.g.x j).vol (J.A.U j (J.ι j α)) ≠ 0 := by
    intro t J hJ α
    obtain ⟨H, φ, hH, hφK, hφs, hU⟩ := hK t J hJ α
    have hidx := relIndex_eq_prod_of_pi φ Up (J.A.U j (J.ι j α)) (fun i => KO (J.G i).k _) H hφK hφs hU
    have hreps := (GlobalTheory.T.chartLevels_reps_represent_unitaryDoubleCosets I hW.tr.ok hW.tr.pins.some l Z u (W.P.I.tup t) J.Ch₀ J.A hJ.is j (by omega) (J.ι j α)).1
    have hvol := GlobalTheory.T.archimedeanLevelVolume_mul_relIndex (I.rec7 l Z) _ (a.g.x j).vol (J.A.U j (J.ι j α)) Up (fun g hg => ((hU g).1 hg).1) hUpf hUpc
      hreps.opn
    have hwt : J.wt j α = ((J.A.U j (J.ι j α)).relIndex Up : ℂ) := by
      rw [hidx, _root_.GlobalTheory.Fam.QuadraticExtensionData.wt]
      push_cast
      refine Finset.prod_congr rfl fun i _ => ?_
      rw [(hH i).2.2.2]
      exact GlobalTheory.T.inv_haarVolume_toReal_eq_relIndex_integral (J.G i) _ (J.E i) j (H i) (hH i).1 (hH i).2.1 (hH i).2.2.1
    refine ⟨?_, ?_, GlobalTheory.AdForm.PinInhab.volLev_ne_zero hW.tr.ok haT.pinX.inf j _ _ hreps⟩
    · rw [hwt, ← hvol]; push_cast; ring
    · rw [hwt, hidx]; push_cast; exact Finset.prod_ne_zero_iff.2 fun i _ => by exact_mod_cast (hH i).2.2.1
  by_cases hex : ∃ t, ∃ J : _root_.GlobalTheory.Fam.QuadraticExtensionData a t, J.Reads ∧ Nonempty (J.Ch j)
  · obtain ⟨t, J, hJ, ⟨α⟩⟩ := hex
    refine ⟨GlobalTheory.SeeSaw.volLev (a.g.x j).vol Up, ?_, fun t' J' hJ' α' => (step t' J' hJ' α').1⟩
    obtain ⟨h1, h2, h3⟩ := step t J hJ α
    rw [← h1]
    exact mul_ne_zero (by exact_mod_cast h3) h2
  · exact ⟨1, one_ne_zero, fun t J hJ α => absurd ⟨t, J, hJ, ⟨α⟩⟩ hex⟩

The lattice slope inequality — Formalism.F.slopeInequality_of, Formalism.LatticeSlopes.LatticeSlopesProofs.SlopeInequality, lines 111–125. Idea: A Gram determinant bounds the image covolume by C to the rank times the source covolume.

theorem slopeInequality_of (h : SlopeLeMuMax.{v}) : SlopeInequality.{u, v} := by
  intro E F _ _ _ _ _ _ L M hL hM hne φ C hφ hC
  classical
  let g : L →ₗ[ℤ] F := M.subtype.comp φ
  have ginj : Function.Injective g := M.injective_subtype.comp hφ
  let N : Submodule ℤ F := LinearMap.range g
  have hNM : N ≤ M := by
    rintro _ ⟨x, rfl⟩
    exact (φ x).2
  haveI : DiscreteTopology L := hL
  haveI : DiscreteTopology M := hM
  haveI : DiscreteTopology N :=
    DiscreteTopology.of_continuous_injective (continuous_inclusion hNM)
      (Submodule.inclusion_injective hNM)
  let e : L ≃ₗ[ℤ] N := LinearEquiv.ofInjective g ginj

10 · Hosts for every character#

Node

Declaration

Contract

Tier

Produce cyclic character hosts
reducer · supply

UpperTheory.Top.supplyChi

For every primitive ψ, VWinAt ψ 401 implies host existence at width 3/2.

✓ kernel-checked

Lean source of these 1 declarations (excerpts printed from data/model.json)

Produce cyclic character hosts — UpperTheory.Top.supplyChi, Development.AutomorphicArithmetic.CharacterBoxes.SupplyChi, lines 8–16. Idea: Use the window for the chosen character, then admissible twisted character classes on sufficiently large scales.

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 hhi

11 · The cohomological window#

Node

Declaration

Contract

Tier

Weighted lengths of local-global kernels
definition · vv

UpperTheory.Top.VVle

For all admissible local data, lengths are finite for 1≤e<t and every finite prime sum of log(ℓ) times the sum of these lengths is ≤B.

◇ source-read

The cohomological window
definition · vwin-def

UpperTheory.Top.VWinAt

For every ε∈(0,1/52) and admissible layer choice e(x), sufficiently large X and each prescribed pair q,d admit a window [Y,Y²] where VAt holds.

⊂ in checked closure

Cohomological window from the row
producer · vwin-row

UpperTheory.One.vwin_of_row

Row0b in the stated convention implies VWin.

◇ source-read

Supply the automorphic window inputs
reducer · window-inputs

UpperTheory.One.Join.automorphic_window_of_inputs

OpenImageCondition, BaseChangeIsobaricN and RowT imply VWin.

◇ source-read

Build the rank-N package
reducer · depth-window

UpperTheory.One.Join.v_window_of_depth_zero_residual_bc_cm

The open-image, base-change, Galois and CM packages imply VWin.

◇ source-read

Window from rank-N automorphy
reducer · lit-window

UpperTheory.V.v_window_of_literal_automorphy_n

LiteratureRankNHypothesis implies VWin.

◇ source-read

Pass through the descent hypotheses
reducer · patch-window

UpperTheory.V.HV.DescentVanishingReductions.v_window_of_automorphy_csd_ss_mono_odd

LiteratureRankNHypothesis implies VWin.

◇ source-read

Produce the four counting bounds
reducer · four-produce

UpperTheory.V.HV.DescentVanishingReductions.vwin_of_hypotheses_H_E_alt

HypothesesH′ imply VWin.

◇ source-read

Combine the cohomology counts
reducer · four-use

UpperTheory.V.HV.Core.of_four_alt

Rank-N input, an existential K bound and CountI, CountII, CountIII, CountV imply VWin.

◇ source-read

Assemble the arithmetic tower window
reducer · tower-window-from-lemma-k

UpperTheory.V.Win.thmBab_of_lemmaK

One package of constants works at every cutoff exponent Ct ≥ 1.

✓ kernel-checked

Choose one set of tower constants
reducer · tower-window-constants

UpperTheory.V.Win.thmBab_of

There exists a single BConst K such that every Ct ≥ 1 satisfies ThmBab K Ct.

✓ kernel-checked

From a finitely generated tower to two length bounds
reducer · tower-bound-from-rank

UpperTheory.V.PropA.aBound_of_isTower

For each prime and eligible tower, ABound consists of a bound away from finitely many centres and a bound in terms of a fixed layer.

✓ kernel-checked

Control exceptional twists by the fixed layer
reducer · tower-operator-bound

UpperTheory.V.PropA.aBound_of_descends

The lengths are controlled by at most R ℓ-adic centres. For all twists they are also bounded by the fixed-layer H² length plus R times the excess layer index.

⊂ in checked closure

Uniform ℓ-rank of class groups in the tower
producer · tower-class-rank

UpperTheory.V.FW.ferreroWashington

For each eligible abelian base K and prime ℓ there is an exponent r bounding the order of the quotient by ℓ-th powers by ℓʳ on every cyclotomic layer.

◇ source-read

Supply the absolute bound for the reference layer
producer · tower-fixed-growth

UpperTheory.V.ZK.lemmaK_litN_alt

One real exponent bounds the logarithm of the order of \(H^2(G_{L,S},\mathbb Z_\ell(e+1))\) over all eligible fields, coefficient primes and positive twists. Each such group is finite.

◇ source-read

Case I gives one bound across coefficient primes
producer · counts-i

UpperTheory.V.Z.J.count_i_of_printed_bound_k_kato_automorphy

Away from the exceptional set, when ℓ−1 does not divide twice the twist, the sum over every allowed finite set of coefficient primes obeys one polynomial bound.

◇ source-read

Cases II and III from the rank-four symplectic argument
producer · counts-ii-iii

UpperTheory.V.HV.DescentVanishingReductions.countII_and_countIII_of_printsH_of_sp4In

Cases II and III have uniform polynomial bounds for each normalized character length, with finiteness. The hypotheses distinguish parity of character orders and divisibility of twice the twist.

◇ source-read

Case V at twist one
producer · counts-v

UpperTheory.V.Z.J.count_v_of_printed_bound_k_reduced_unitary_lift

For exceptional odd primes at twist one, Case V bounds the normalized length when the two-adic conductor crosses the specified threshold, including equality.

◇ source-read

A nonzero integer controls one character orbit
producer · counts-common-integer

UpperTheory.V.Z.J.propGK_of_numberU3U_of_oneCharU

For a fixed imaginary quadratic field, twist, character kernel and admissible auxiliary prime, one nonzero integer gives a logarithmic size bound and simultaneous valuation bounds at the other eligible primes.

◇ source-read

Convert the joint window into VWin
reducer · counts-window

UpperTheory.V.HV.vwin_of_counts

The tower window, sign bounds and five counting inputs yield VWin, the cohomology estimate for each primitive character at cutoff exponent 401.

◇ source-read

Reuse the tower interval for the positive part
reducer · counts-joint

UpperTheory.V.HV.jointWin_of_counts

For each eligible choice of character and parameters, one interval satisfies both the tower and positive-part bounds at every point.

◇ source-read

Evaluate the pointwise estimate on admissible windows
reducer · counts-height

UpperTheory.V.HV.thmHV_of_counts

Every package K and positive cutoff exponent Ct satisfy the positive-part height theorem under the stated counting and cohomology inputs.

◇ source-read

Combine the two prime sums at a point
reducer · counts-pointwise

UpperTheory.V.HV.pointHV_of_counts

After the character and layer indices are fixed, one polynomial bound controls the positive cohomological sum on eligible hosts, with an additive multiple of the layer budget.

◇ source-read

Add contributions inside the exceptional set
reducer · counts-inside

UpperTheory.V.HV.sumIn

For fixed character, exceptional coefficient prime and layer index, the positive-part sum at that prime is at most (Nt)^C + C·B when the fixed layer satisfies its budget B.

◇ source-read

Bound the sum over arbitrary finite sets of other primes
reducer · counts-outside

UpperTheory.V.HV.sumOut

Choose a common exponent and two auxiliary primes before the host. The positive-part sum over every allowed finite set of nonexceptional odd primes is at most (Nt)^C.

◇ source-read

Lean source of these 25 declarations (excerpts printed from data/model.json)

Weighted lengths of local-global kernels — UpperTheory.Top.VVle, Development.AutomorphicArithmetic.CharacterBoxes.ExistsPageN, lines 12–17. Idea: Finiteness precedes conversion of an extended natural length to an ordinary natural.

def VVle (E : Type) [Field E] [NumberField E] (t : ℕ) (B : ℝ) : Prop :=
  ∀ (Ω : Type) [Field Ω] [Algebra E Ω] [IsAlgClosure E Ω] (ld : ∀ (p : ℕ) [Fact p.Prime], Formalism.GaloisCohomology.LData E Ω p),
    (∀ (p : ℕ) [Fact p.Prime] (e : ℕ), 0 < e → e < t → Formalism.GaloisCohomology.shaLen (ld p) (e : ℤ) ≠ ⊤) ∧
    ∀ S : Finset Nat.Primes,
      ∑ l ∈ S, Real.log (l : ℕ) *
        ∑ e ∈ Finset.Ico 1 t, ((@Formalism.GaloisCohomology.shaLen E Ω _ _ _ _ _ l ⟨l.2⟩ (@ld l ⟨l.2⟩) (e : ℤ)).toNat : ℝ) ≤ B

The cohomological window — UpperTheory.Top.VWinAt, Development.AutomorphicArithmetic.CharacterBoxes.ExistsPageN, lines 44–47. Idea: The endpoint uses Ct=401. VAt bounds twists below floor(x^401) by sqrt(exp(x^ε)).

def VWinAt (ψ : PChar) (Ct : ℝ) : Prop :=
  ∀ eps : ℝ, 0 < eps → eps < 1 / 52 → ∀ e : ℝ → ℕ, (∀ x ≥ (1 : ℝ), PageN eps x (e x)) →
    ∃ J : ℝ, 1 ≤ J ∧ ∃ X0 : ℝ, ∀ X ≥ X0, ∀ q d : ℕ, WinPair eps (X ^ (1 / J)) q d →
      ∃ Y : ℝ, X ^ (1 / J) ≤ Y ∧ Y ^ (2 : ℝ) ≤ X ∧ ∀ x : ℝ, Y ≤ x → x ≤ Y ^ (2 : ℝ) → VAt ψ eps Ct q d (e x) x

Cohomological window from the row — UpperTheory.One.vwin_of_row, Development.AutomorphicArithmetic.AutomorphicVarieties.ModularityArgument.ThresholdArguments.DenseThresholdCases.VwinOfRow, lines 4–5. Idea: Pass an open-image record, the base-change theorem and the Galois row to the automorphic window construction.

theorem UpperTheory.One.vwin_of_row (h : UpperTheory.GalStar.Row0b fun h rc => UpperTheory.Zero.LLC.IsRecT h rc) : UpperTheory.Top.VWin :=
  UpperTheory.One.Join.automorphic_window_of_inputs (UpperTheory.LiteratureTheorems.OpenImageCondition.mk h) UpperTheory.BaseChangeIdentities.baseChangeN h

Supply the automorphic window inputs — UpperTheory.One.Join.automorphic_window_of_inputs, Development.AutomorphicArithmetic.AutomorphicVarieties.ModularityArgument.ThresholdArguments.DenseThresholdCases.TopMainZj, lines 71–74. Idea: Add the CM abelian inputs to the depth-zero residual base-change argument.

theorem UpperTheory.One.Join.automorphic_window_of_inputs (O : _root_.UpperTheory.LiteratureTheorems.OpenImageCondition)
 (bc : _root_.PositivityTheory.Rg.BcN.BaseChangeIsobaricN) (gal : _root_.UpperTheory.V.Z.Win.RowT) :
    UpperTheory.Top.VWin :=
  _root_.UpperTheory.One.Join.v_window_of_depth_zero_residual_bc_cm O bc gal (_root_.UpperTheory.One.Join.cm_abelian_inputs_from_literature O)

Build the rank-N package — UpperTheory.One.Join.v_window_of_depth_zero_residual_bc_cm, Development.AutomorphicArithmetic.AutomorphicVarieties.ModularityArgument.ThresholdArguments.DenseThresholdCases.TopMainZj, lines 55–58. Idea: Package local, automorphic, cohomological and CM inputs for the rank-N theorem.

theorem UpperTheory.One.Join.v_window_of_depth_zero_residual_bc_cm (O : _root_.UpperTheory.LiteratureTheorems.OpenImageCondition)
 (bc : _root_.PositivityTheory.Rg.BcN.BaseChangeIsobaricN) (gal : _root_.UpperTheory.V.Z.Win.RowT) (cm : _root_.GlobalTheory.Mem.LiteralAutomorphy.LiteratureCMHypothesis) :
    UpperTheory.Top.VWin :=
  _root_.UpperTheory.V.v_window_of_literal_automorphy_n ⟨_root_.UpperTheory.One.Join.local_inputs_from_literature O, _root_.UpperTheory.One.Join.automorphic_inputs_from_literature O bc gal, _root_.UpperTheory.LiteratureTheorems.galois_cohomology_from_literature O, cm⟩

Window from rank-N automorphy — UpperTheory.V.v_window_of_literal_automorphy_n, Development.AutomorphicArithmetic.AutomorphicVarieties.ModularityArgument.ThresholdArguments.DenseThresholdCases.WindowBoundOfLiteratureLevel, lines 33–34. Idea: Invoke the automorphy-and-descent reduction for this rank-N package.

theorem UpperTheory.V.v_window_of_literal_automorphy_n (hN : _root_.GlobalTheory.Mem.LiteralAutomorphy.LiteratureRankNHypothesis) : VWin :=
  _root_.UpperTheory.V.HV.DescentVanishingReductions.v_window_of_automorphy_csd_ss_mono_odd hN

Pass through the descent hypotheses — UpperTheory.V.HV.DescentVanishingReductions.v_window_of_automorphy_csd_ss_mono_odd, Development.AutomorphicArithmetic.AutomorphicVarieties.ModularityArgument.ThresholdArguments.DenseThresholdCases.WindowBoundOfLiteratureLevel, lines 30–31. Idea: Combine the rank-N input with the weak descent theorem and the package produced by patching.

theorem v_window_of_automorphy_csd_ss_mono_odd (hN : _root_.GlobalTheory.Mem.LiteralAutomorphy.LiteratureRankNHypothesis) : VWin :=
  _root_.UpperTheory.V.HV.DescentVanishingReductions.vwin_of_hypotheses_H_E_alt (_root_.UpperTheory.V.HV.DescentVanishingReductions.published_hypotheses_from_patching_alt hN UpperTheory.V.Z.Tf.SR.descWeak)

Produce the four counting bounds — UpperTheory.V.HV.DescentVanishingReductions.vwin_of_hypotheses_H_E_alt, Development.AutomorphicArithmetic.AutomorphicVarieties.ModularityArgument.ThresholdArguments.DenseThresholdCases.WindowBoundOfLiteratureLevel, lines 25–29. Idea: Build the K bound, the descent inputs and counting cases I, II, III and V.

theorem vwin_of_hypotheses_H_E_alt (hH : _root_.UpperTheory.V.Af.HypothesesH') : VWin :=
  have hK := _root_.UpperTheory.V.ZK.lemmaK_litN_alt hH.litN
  have hE := _root_.UpperTheory.V.Z.Win.Dn.ends0_alt hH
  have h4 := _root_.UpperTheory.V.HV.DescentVanishingReductions.countII_and_countIII_of_printsH_of_sp4In hH hK (_root_.UpperTheory.V.HV.DescentVanishingReductions.sp4In0_alt hH)
  _root_.UpperTheory.V.HV.Core.of_four_alt hH.litN hK (_root_.UpperTheory.V.Z.J.count_i_of_printed_bound_k_kato_automorphy hH hK (_root_.UpperTheory.V.Z.Kato.WeilSphericalRecords.katoTwoW_of_printsH hH) (_root_.UpperTheory.V.HV.Core0.automorphyUnramified_of_litN_of_gdEnd hH.litN hE.1)) h4.1 h4.2 (_root_.UpperTheory.V.Z.J.count_v_of_printed_bound_k_reduced_unitary_lift hH hK hE.2)

Combine the cohomology counts — UpperTheory.V.HV.Core.of_four_alt, Development.AutomorphicArithmetic.AutomorphicVarieties.ModularityArgument.ThresholdArguments.DenseThresholdCases.HVCore, lines 18–22. Idea: Use local cohomological estimates, Ferrero–Washington and the additional terms in vwin_of_counts.

theorem of_four_alt (hN : _root_.GlobalTheory.Mem.LiteralAutomorphy.LiteratureRankNHypothesis) (hK : ∃ CK : ℝ, LemmaK CK) (h1 : CountI) (h2 : CountII) (h3 : CountIII) (h5 : CountV) : VWin := by
  obtain ⟨B, hB⟩ := Win.thmBab_of_lemmaK (_root_.UpperTheory.V.HV.U.pt_s hN) hN.coh.lfK hN.coh.ltK FW.ferreroWashington hK
  obtain ⟨CK, hL⟩ := hK
  exact vwin_of_counts (_root_.UpperTheory.V.HV.U.pt_s hN) hN.coh.lfK hN.coh.ltK hL (hB 401 (by norm_num))
    (Odd.thmBcFree_of (ML.iv (_root_.UpperTheory.V.HV.U.pt_s hN) hN.coh.uo)) h1 h2 h3 h5 (countZ X.propZ)

Assemble the arithmetic tower window — UpperTheory.V.Win.thmBab_of_lemmaK, Development.AutomorphicArithmetic.AutomorphicVarieties.LayeredIsomorphisms.ThmBabOfLemmaK, lines 9–12. Idea: Apply the cohomological bound to each eligible tower. Ferrero–Washington supplies the generator bounds for the fixed odd primes and the varying two-adic bases. Pass both estimates and the uniform H² bound to the window construction.

theorem thmBab_of_lemmaK (hP : GlobalTheory.Published.PoitouTateDuality) (hF : LocalFinitenessK) (hT : LocalTateDualityK)
    (hFW : Published.FerreroWashington) (hK : ∃ CK : ℝ, LemmaK CK) : ∃ K : BConst, ∀ Ct : ℝ, 1 ≤ Ct → ThmBab K Ct :=
  have hA : Two.TowerBound := fun l _ L _ _ R h => PropA.aBound_of_isTower hP hF hT l L R h
  thmBab_of hK (Two.fixedIn hFW hA) (Two.twoIn hFW hA)

Choose one set of tower constants — UpperTheory.V.Win.thmBab_of, Development.AutomorphicArithmetic.AutomorphicVarieties.LayeredIsomorphisms.ThmBabOf, lines 11–103. Idea: Choose the uniform two-adic rank and the ranks of the eligible odd-prime towers before the scale and auxiliary prime pair. Unite the exceptional twists and find a single interval avoiding their forbidden ranges.

theorem UpperTheory.V.Win.thmBab_of :
    (∃ CK : ℝ, LemmaK CK) → FixedIn → TwoIn → ∃ K : BConst, ∀ Ct : ℝ, 1 ≤ Ct → ThmBab K Ct := by
  rintro ⟨CK0, hK0⟩ hF hT
  classical
  have hCK1 : (1 : ℝ) ≤ max CK0 1 := le_max_right _ _
  have hCKpos : (0 : ℝ) < max CK0 1 := lt_of_lt_of_le one_pos hCK1
  have hK : LemmaK (max CK0 1) := kmono CK0 _ (le_max_left _ _) hK0
  let P : ℕ → AbF → ℕ → Prop := fun l A R =>
    ∃ (_ : Fact l.Prime) (L₀ : Type) (_ : Field L₀) (_ : NumberField L₀), IsAbField A L₀ ∧ ABound l R L₀
  let R0 : AbF → ℕ := fun M => Classical.choose (hT M)
  let Rl : ℕ → AbF → ℕ := fun l A => if h : ∃ R, P l A R then Classical.choose h else 0
  refine ⟨BConst.mk R0 Rl (max CK0 1) hCKpos, fun Ct hCt => ?_⟩
  unfold ThmBab BShape IsBWindow
  intro M B' L hAux eps A1 heps heps'
  unfold OddPrimesWithRootsOfUnity at hAux
  have hCt0 : 0 < Ct := lt_of_lt_of_le one_pos hCt
  set CK : ℝ := max CK0 1 with hCKdef
  set R : ℕ := R0 M + ∑ l ∈ B', Rl l (L l) with hRdef
  set J : ℝ := 2 ^ (R + 2) * (2 * CK * Ct / eps) ^ R with hJdef
  have hJpos : 0 < J := by
    have : 0 < 2 * CK * Ct / eps := by positivity
    positivity
  obtain ⟨x0A, hA⟩ := partA CK hCKpos hK M (R0 M) J Ct eps A1 hJpos hCt0.le heps
  have hB : ∀ l ∈ B', ∃ x0 : ℝ, ∀ e t, admitted A1 Ct e t → ∀ X : ℝ, ∃ Exc : Finset ℕ,
      Exc.card ≤ Rl l (L l) ∧ ∀ x ≥ x0, X ^ (1 / J) ≤ x → x ≤ X → Good (eps / (2 * CK)) Ct Exc x →
        ∀ (_ : Fact l.Prime) (L₀' : Type) [Field L₀'] [NumberField L₀'], IsAbField (L l) L₀' →
          ∀ (L₁ : Type) [Field L₁] [NumberField L₁] [Algebra L₀' L₁],
            IsLayer l (Nat.log l (Rl l (L l)) + 3) L₀' L₁ → VVat l L₁ (t x) (Real.exp (x ^ (4 * eps / 5))) := by
    intro l hl
    obtain ⟨hp, hl2, hmu⟩ := hAux l hl
    haveI : Fact l.Prime := ⟨hp⟩
    by_cases hex : ∃ (L₀ : Type) (_ : Field L₀) (_ : NumberField L₀), IsAbField (L l) L₀
    · obtain ⟨L₀, _, _, hab⟩ := hex
      have hP : ∃ R, P l (L l) R := by
        obtain ⟨R', hR'⟩ := hF l hl2 (L l) hmu L₀ hab
        exact ⟨R', ⟨_, L₀, _, _, hab, hR'⟩⟩
      have hRl : Rl l (L l) = Classical.choose hP := by
        show (if h : ∃ R, P l (L l) R then Classical.choose h else 0) = _
        rw [dif_pos hP]
      obtain ⟨_, L₀₀, _, _, hab0, hR0⟩ := Classical.choose_spec hP
      obtain ⟨x0, hx0⟩ := partB CK hCKpos hK l (Classical.choose hP) hl2 (L l) hmu L₀₀ hab0 hR0
        J Ct eps A1 hJpos hCt0.le heps
      refine ⟨x0, fun e t hAdm X => ?_⟩
      obtain ⟨Exc, hcard, hx⟩ := hx0 e t hAdm X
      refine ⟨Exc, hRl ▸ hcard, fun x hxx hlo hhi hg _ L₀' _ _ hab' L₁ _ _ _ hlay => ?_⟩
      rw [hRl] at hlay
      exact hx x hxx hlo hhi hg L₀' hab' L₁ hlay
    · refine ⟨0, fun e t _ X => ⟨∅, by simp, ?_⟩⟩
      intro x _ _ _ _ _ L₀' _ _ hab' _ _ _ _ _
      exact absurd ⟨L₀', _, _, hab'⟩ hex
  choose! f hf using hB
  set x1 : ℝ := max 1 (max x0A (∑ l ∈ B', |f l|)) with hx1def
  have hfle : ∀ l ∈ B', f l ≤ x1 := fun l hl =>
    (le_abs_self _).trans ((Finset.single_le_sum (fun i _ => abs_nonneg (f i)) hl).trans
      ((le_max_right _ _).trans (le_max_right _ _)))
  have hx0A : x0A ≤ x1 := (le_max_left _ _).trans (le_max_right _ _)
  have hx1pos : 0 ≤ x1 := zero_le_one.trans (le_max_left _ _)
  refine ⟨max 2 (x1 ^ J), fun e t hAdm X hX q d hqd hlog => ?_⟩
  have hX2 : 2 ≤ X := (le_max_left _ _).trans hX
  have hXJ : x1 ^ J ≤ X := (le_max_right _ _).trans hX
  have hlow : x1 ≤ X ^ (1 / J) := by
    calc x1 = (x1 ^ J) ^ (1 / J) := by
          rw [← Real.rpow_mul hx1pos, mul_one_div_cancel hJpos.ne', Real.rpow_one]
      _ ≤ X ^ (1 / J) := Real.rpow_le_rpow (Real.rpow_nonneg hx1pos _) hXJ (by positivity)
  obtain ⟨L₀, _, _, hTB, hAB⟩ := Classical.choose_spec (hT M) q d hqd
  obtain ⟨ExcA, hcardA, hxA⟩ := hA e t hAdm X q d hqd hlog L₀ hTB hAB
  have hB2 := fun l hl => hf l hl e t hAdm X
  choose! g hg using hB2
  have hcard : (ExcA ∪ B'.biUnion g).card ≤ R :=
    (Finset.card_union_le _ _).trans (add_le_add hcardA
      (Finset.card_biUnion_le.trans (Finset.sum_le_sum fun l hl => (hg l hl).1)))
  have heta : 0 < eps / (2 * CK) := by positivity
  have hetaCt : eps / (2 * CK) ≤ Ct := by
    have h1 : eps / (2 * CK) ≤ 1 := by
      rw [div_le_one (by positivity)]
      linarith
    linarith
  obtain ⟨Y, hY, hgood⟩ := window R (eps / (2 * CK)) Ct X (ExcA ∪ B'.biUnion g) heta hetaCt
    (by linarith) hcard
  have hJeq : (2 : ℝ) ^ (R + 2) * (Ct / (eps / (2 * CK))) ^ R = J := by
    rw [hJdef, show Ct / (eps / (2 * CK)) = 2 * CK * Ct / eps by rw [div_div_eq_mul_div]; ring]
  rw [hJeq] at hY
  refine ⟨Y, hY, fun x hYx hxY => ?_⟩
  have hG := hgood x hYx hxY
  have hXlo : X ^ (1 / J) ≤ x := hY.1.trans hYx
  have hXhi : x ≤ X := hxY.trans hY.2
  have hGsub : ∀ S ⊆ ExcA ∪ B'.biUnion g, Good (eps / (2 * CK)) Ct S x :=
    fun S hS n hn => hG n (hS hn)
  refine ⟨hxA x (hx0A.trans (hlow.trans hXlo)) hXlo hXhi (hGsub _ Finset.subset_union_left), ?_⟩
  unfold BbAt
  intro l hl _ L₀' _ _ hab L₁ _ _ _ hlay
  exact (hg l hl).2 x ((hfle l hl).trans (hlow.trans hXlo)) hXlo hXhi
    (hGsub _ ((Finset.subset_biUnion_of_mem g hl).trans Finset.subset_union_right)) _ L₀' hab L₁ hlay

From a finitely generated tower to two length bounds — UpperTheory.V.PropA.aBound_of_isTower, Development.AutomorphicArithmetic.AutomorphicVarieties.AdditiveValuationNorms.ABoundOfIsTower, lines 7–11. Idea: Choose a Galois element generating the cyclotomic direction, prove the descent equality for its twists, and apply the two cokernel estimates on the tower module.

theorem UpperTheory.V.PropA.aBound_of_isTower (hP : GlobalTheory.Published.PoitouTateDuality) (hF : LocalFinitenessK) (hT : LocalTateDualityK)
    (l : ℕ) [Fact l.Prime] (L₀ : Type) [Field L₀] [NumberField L₀] (R : ℕ) (ht : UpperTheory.V.Tower.IsTower l L₀ R) :
    UpperTheory.V.Win.ABound l R L₀ := by
  obtain ⟨γ, h₁, h₂, h₃⟩ := UpperTheory.V.PropA.genLevel l L₀ ht.mu
  exact UpperTheory.V.PropA.aBound_of_descends hP hF hT ht h₂ h₃ (UpperTheory.V.PropA.descends l L₀ ht.mu γ h₁)

Control exceptional twists by the fixed layer — UpperTheory.V.PropA.aBound_of_descends, Development.AutomorphicArithmetic.AutomorphicVarieties.AdditiveValuationNorms.ABoundOfDescends, lines 36–55. Idea: Use unipotence modulo ℓ and the generator bound for the centres. The relative growth estimate can allow infinite length at a singular twist. Descent and duality bound the reference value by the arithmetic H² length.

theorem aBound_of_descends (hP : GlobalTheory.Published.PoitouTateDuality) (hF : LocalFinitenessK) (hT : LocalTateDualityK) {R c : ℕ}
    (ht : IsTower l L₀ R) {γ : G L₀ (AlgebraicClosure L₀)} (hu : IsLevel l (cycZ L₀ _ l γ : ℤ_[l]) c)
    (hc : ∃ ζ : L₀, IsPrimitiveRoot ζ (l ^ c)) (h : Descends l L₀ γ) : Win.ABound l R L₀ := by
  have hX : GenBy l R (XP l L₀) := ht.gen
  have hγ := xUnip L₀ (AlgebraicClosure L₀) l l ⊤ isClosed_univ ht.gen.finite γ (mem_levU_one (lteNorm l _ c hu).2.1)
  refine ⟨?_, fun e he m L₁ _ _ _ h₁ L₂ _ _ _ h₂ Ω _ _ _ D => ?_⟩
  · obtain ⟨s, hs⟩ := exists_centres_norm hX hγ hu
    refine ⟨ℚ_[l], inferInstance, inferInstance, inferInstance, c, R, fun i => s i, le_rfl, hc,
      fun e he m L₁ _ _ _ h₁ B hB => ?_⟩
    rw [h.eq_twLen he h₁]
    refine hs e m B fun i => (hB i).trans (le_of_eq ?_)
    rw [PadicInt.norm_def]
    push_cast
    rfl
  · haveI := ht.complex
    haveI : IsTotallyComplex L₂ := isTotallyComplex_of_algebra L₀ L₂
    rw [h.eq_twLen he h₁]
    refine (twLen_le_growth hX hγ hu e m).trans (add_le_add ?_ le_rfl)
    rw [← h.eq_twLen he (m := jZero l R) h₂, ← shaLen_eq_shaInv D]
    exact shaLeV hP hF hT L₂ Ω l (ptCase_of_isTotallyComplex L₂ l) D e

Uniform ℓ-rank of class groups in the tower — UpperTheory.V.FW.ferreroWashington, Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.FerreroWashingtonIndex.FerreroWashington, lines 104–119. Idea: Embed the abelian base into a cyclotomic field. Use the cyclotomic index estimate and descend across a uniformly bounded degree. The root-of-unity premise in the published interface is unused by this proof.

theorem UpperTheory.V.FW.ferreroWashington : UpperTheory.V.Published.FerreroWashington := by
  unfold UpperTheory.V.Published.FerreroWashington
  intro l _ K _ _ _ _
  obtain ⟨f, D, hf, h1, hemb⟩ := embed l K
  obtain ⟨B, n₀, hB⟩ := cyc l f hf h1
  refine ⟨D * l ^ n₀ * B, ?_⟩
  intro n K' _ _ _ _
  obtain ⟨m, L, iF, iN, iA, iC, hm, hdeg⟩ := hemb n n₀ K'
  obtain ⟨htc, hidx⟩ := hB m hm L
  have hd := desc l K' L htc
  have hl2 : 1 < l := (Fact.out : l.Prime).one_lt
  have key : Nat.card (ClassGroup (𝓞 K') ⧸ (powMonoidHom l).range) ≤ D * l ^ n₀ * B := by
    have e : Nat.card (ClassGroup (𝓞 K') ⧸ (powMonoidHom l).range) = (powR (Cl K') l).index := rfl
    rw [e]
    exact hd.trans (Nat.mul_le_mul hdeg hidx)
  exact key.trans (Nat.lt_pow_self hl2).le

Supply the absolute bound for the reference layer — UpperTheory.V.ZK.lemmaK_litN_alt, Development.AutomorphicArithmetic.AutomorphicVarieties.ModularityArgument.ThresholdArguments.DenseThresholdCases.KFinal, lines 11–11. Idea: Insert the odd-degree integral homology rank estimate into the reduction from the rank-N package. The resulting LemmaK bound may be applied at the fixed layer even when the abstract cokernel estimate allows infinite length.

theorem lemmaK_litN_alt (hN : _root_.GlobalTheory.Mem.LiteralAutomorphy.LiteratureRankNHypothesis) : ∃ CK, LemmaK CK := _root_.UpperTheory.V.ZK.lemmaK_of_litN_alt hN bOdd

Case I gives one bound across coefficient primes — UpperTheory.V.Z.J.count_i_of_printed_bound_k_kato_automorphy, Development.AutomorphicArithmetic.AutomorphicVarieties.ModularityArgument.ThresholdArguments.DenseThresholdCases.LinkedUnlE, lines 49–54. Idea: Combine a rank-three eigensystem count with a single-character rigidity bound. Their common integer bounds the local lengths by its valuations. Two auxiliary primes then cover all the coefficient primes.

theorem count_i_of_printed_bound_k_kato_automorphy (hH : _root_.UpperTheory.V.Af.HypothesesH') (hK : ∃ CK : ℝ, LemmaK CK) (hKa : _root_.UpperTheory.V.Z.Kato.WeilSphericalRecords.KatoTwoW) (h3 : _root_.UpperTheory.V.Aut.AutomorphyUnramifiedCoefficientsAlt) : CountI :=
  have hC := _root_.UpperTheory.V.HV.Core0.cohInp_alt hH.litN hK
  have hE := unlEnd3E (_root_.UpperTheory.V.Z.J.linkedUnlE_alt hH)
  U3.countI (U3.corGK (_root_.UpperTheory.V.Z.J.propGK_of_numberU3U_of_oneCharU (_root_.UpperTheory.GalN.V.Win.N.numberU3U_of_prints hH.toClassicalTheorems)
    (_root_.UpperTheory.V.Z.J.oneCharU_of_katoTwoW_rig_admI_automorphy hC Alg.M.main_holds Alg.M.mprime_holds Alg.lemmaP hKa (_root_.UpperTheory.V.Z.J.rigIUE_alt hC hH (_root_.UpperTheory.V.HV.DescentVanishingReductions.adjoint_lifting_of_cohomology hH) hE)
      (_root_.UpperTheory.V.Z.Win.RR.rigII_a_alt hC hH (_root_.UpperTheory.V.HV.DescentVanishingReductions.adjoint_lifting_of_cohomology hH)) (_root_.UpperTheory.V.Z.J.admissible_typeI_even_level_alt hC hH hE) h3)))

Cases II and III from the rank-four symplectic argument — UpperTheory.V.HV.DescentVanishingReductions.countII_and_countIII_of_printsH_of_sp4In, Development.AutomorphicArithmetic.AutomorphicVarieties.ModularityArgument.ThresholdArguments.DenseThresholdCases.AdjointLiftingOfCohomology, lines 33–39. Idea: Supply the symplectic rigidity and eigensystem-counting inputs to the same rank-four theorem. The cohomological hypotheses and LemmaK provide the finite local lengths used in its two outputs.

theorem countII_and_countIII_of_printsH_of_sp4In (hH : _root_.UpperTheory.V.Af.HypothesesH') (hK : ∃ CK : ℝ, LemmaK CK) (hS : _root_.UpperTheory.V.Aut.SymplecticFourImageDense) : CountII ∧ CountIII := by
  have hN := hH.litN
  obtain ⟨CK, hL⟩ := hK
  refine _root_.UpperTheory.V.Th.sp4Main_alt hS (_root_.UpperTheory.V.HV.DescentVanishingReductions.adjoint_lift_of_prints hH).coh Alg.M.main_holds Alg.M.mprime_holds Alg.lemmaP (_root_.UpperTheory.GalN.V.numberSp4_n_alt hH.toClassicalTheorems)
    (_root_.UpperTheory.V.Th.rigSp4_alt (_root_.UpperTheory.V.HV.DescentVanishingReductions.adjoint_lift_of_prints hH) (_root_.UpperTheory.V.HV.DescentVanishingReductions.adjoint_lifting_of_cohomology hH)) (X.corX X.lemmaX X.residual_bernoulli_nonvanishing) fun Ω _ _ _ l _ => ⟨?_, fun c => ?_⟩
  · exact X.soBar CK hL (_root_.UpperTheory.V.HV.U.pt_s hN) hN.coh.lfK hN.coh.ltK ℚ Ω l
  · exact X.soFin CK hL (_root_.UpperTheory.V.HV.U.pt_s hN) hN.coh.lfK hN.coh.ltK ℚ Ω l c.O

Case V at twist one — UpperTheory.V.Z.J.count_v_of_printed_bound_k_reduced_unitary_lift, Development.AutomorphicArithmetic.AutomorphicVarieties.ModularityArgument.ThresholdArguments.DenseThresholdCases.LinkedUnlE, lines 55–61. Idea: Pass a reduced unitary lift, local and global cohomological estimates, host rigidity and a host parameter count to the rank-three inertia argument. The strict reverse threshold is covered by a separate case.

theorem count_v_of_printed_bound_k_reduced_unitary_lift (hH : _root_.UpperTheory.V.Af.HypothesesH') (hK : ∃ CK : ℝ, LemmaK CK) (hS : _root_.UpperTheory.V.Aut.ThmS6Core_s) : CountV := by
  have hN := hH.litN
  have hE := unlEnd3E (_root_.UpperTheory.V.Z.J.linkedUnlE_alt hH)
  obtain ⟨CK, hL⟩ := hK
  exact _root_.UpperTheory.V.UnitaryThreeInertia.countV_of_finiteness_duality_euler_host (_root_.UpperTheory.V.UnitaryThreeInertia.unitary_lift_of_reduced_core hS) Alg.M.main_holds Alg.M.mprime_holds hN.coh.lf hN.coh.lt hN.coh.le
    hN.coh.gf hN.coh.ge hN.coh.pt (X.So.hostVanE CK hL (_root_.UpperTheory.V.HV.U.pt_s hN) hN.coh.lfK hN.coh.ltK hN.coh.lf hN.coh.lt hN.coh.le)
    (X.xpp (X.corX X.lemmaX X.residual_bernoulli_nonvanishing)) (_root_.UpperTheory.V.Z.J.hostRigidUE_alt hH (_root_.UpperTheory.V.HV.DescentVanishingReductions.adjoint_lifting_of_cohomology hH) hE) (_root_.UpperTheory.V.Z.J.hostNumberUE_alt hH hE (_root_.UpperTheory.GalN.V.Win.N.numberU3U_of_prints hH.toClassicalTheorems))

A nonzero integer controls one character orbit — UpperTheory.V.Z.J.propGK_of_numberU3U_of_oneCharU, Development.AutomorphicArithmetic.AutomorphicVarieties.ModularityArgument.ThresholdArguments.DenseThresholdCases.FPropGKU, lines 110–172. Idea: Make a Galois-stable family of characters with the chosen kernel. A trace product supplies the integer before the coefficient prime is chosen. Rigidity bounds the sum of the orbit lengths by twice its valuation.

theorem UpperTheory.V.Z.J.propGK_of_numberU3U_of_oneCharU :
    _root_.UpperTheory.V.Z.J.NumberU3U_s → _root_.UpperTheory.V.Z.J.OneCharU_s → PropGK := by
  intro hNum hOne K _ _
  by_cases hK : Module.finrank ℚ K = 2 ∧ IsTotallyComplex K
  swap
  · refine ⟨0, 0, fun e N _ H p _ _ _ => ⟨1, one_ne_zero, by simp, fun Ω _ _ _ _ l _ _ c h => ?_⟩⟩
    obtain ⟨ψ, -, hψ⟩ := h
    exact absurd ⟨hψ.quad, hψ.imag⟩ hK
  haveI := isCM K hK.1 hK.2
  obtain ⟨c₅, A, hC⟩ := hNum K hK.1
  refine ⟨c₅, A, fun e N _ H p he hp hnd => ?_⟩
  have hN : ¬ p ∣ N := fun h => hnd ((h.mul_left 30).mul_right _)
  have hd : ¬ (p : ℤ) ∣ discr K := fun h => hnd ((Int.natCast_dvd.1 h).mul_left _)
  have h7 : 7 ≤ p := by
    have h30 : ¬ p ∣ 30 := fun h => hnd ((h.mul_right N).mul_right _)
    by_contra h
    push Not at h
    clear hnd hN hd
    revert hp h30
    interval_cases p <;> decide
  obtain ⟨w, hw⟩ := exists_w K hp
  haveI : Fintype {χ : DirichletCharacter ℂ N // χ.toUnitHom.ker = H} := Fintype.ofFinite _
  obtain ⟨NN, h0, hsz, hdiv⟩ := hC e he N (NeZero.pos N) p w hp hw h7 hN hd
    {χ : DirichletCharacter ℂ N // χ.toUnitHom.ker = H} (fun χ => (χ.1 (normV w))⁻¹)
    (fun χ => ⟨orderOf χ.1, orderOf_pos _, by
      rw [inv_pow, ← ZMod.coe_unitOfCoprime _ (cop_norm hp hN hw), ← MulChar.pow_apply_coe, pow_orderOf_eq_one,
        MulChar.one_apply_coe, inv_one]⟩)
    (fun σ => ⟨⟨fun χ => ⟨χ.1.ringHomComp σ.toRingHom, (ker_comp _ σ.injective _).trans χ.2⟩,
      fun χ => ⟨χ.1.ringHomComp σ.symm.toRingHom, (ker_comp _ σ.symm.injective _).trans χ.2⟩,
      fun χ => Subtype.ext (MulChar.ext' fun a => σ.symm_apply_apply _),
      fun χ => Subtype.ext (MulChar.ext' fun a => σ.apply_symm_apply _)⟩, fun χ => (map_inv₀ σ _).symm⟩)
  refine ⟨NN, h0, hsz.trans ?_, fun Ω _ _ _ _ l hl hlp c h => ?_⟩
  · have := card_orb H
    rw [Nat.card_eq_fintype_card] at this
    have hl := Real.log_natCast_nonneg p
    gcongr
  obtain ⟨ψ₀, h₀, hψ₀⟩ := h
  haveI : IsAlgClosed Ω := IsAlgClosure.isAlgClosed ℚ
  haveI : Algebra.IsAlgebraic K Ω := Algebra.IsAlgebraic.tower_top (K := ℚ) K
  haveI : IsAlgClosure K Ω := ⟨inferInstance, inferInstance⟩
  obtain ⟨ι⟩ : Nonempty (Qbar l ≃+* ℂ) := GlobalTheory.nonempty_padicAlgCl_ringEquiv_complex l
  obtain ⟨B, hB⟩ := ReciprocityTheory.Gal.exists_isPlaceOver Ω w
  obtain ⟨σ, hσ⟩ := ReciprocityTheory.Gal.exists_isFrob hB
  have hD := hdiv l hψ₀.l_odd hlp Ω ι B hB σ hσ
  obtain ⟨E, hE⟩ := orb_equiv c H (ι.toRingHom.comp (algebraMap c.O (PadicAlgCl l)))
    (ι.injective.comp Subtype.val_injective) h₀
  obtain ⟨f1, f2⟩ := frob_val hp hN hlp hw hB hσ
  have key := fun ψ : orb c H => hOne Ω K l c N e ψ.1
    ((gdFacts Ω K l e c.O N ψ₀ hψ₀).2.2.2.2.2.2.2 ψ.1 (((mem_orb c).1 ψ.2).trans ((mem_orb c).1 h₀).symm)).1 ι σ⁻¹
    (ι.symm (Af.eis3 (normV w) e ((E ψ).1 (normV w))⁻¹))
    (by rw [hE, map_inv (galEmb ℚ K Ω)]; exact t_eq c e _ ψ.1 ι _ f1 f2)
    (fun ρ hρ => (hD (fun _ => {ρ}) (fun _ ρ' h => by rwa [Finset.mem_singleton.1 h])
      (fun _ a ha b hb _ => (Finset.mem_singleton.1 ha).trans (Finset.mem_singleton.1 hb).symm)).1 (E ψ) ρ
      (Finset.mem_singleton_self ρ))
  refine ⟨fun ψ hψ => (key ⟨ψ, hψ⟩).1, ?_⟩
  choose X hX1 hX2 hX3 using fun ψ => (key ψ).2
  obtain ⟨hne, hle⟩ := hD (fun o => X (E.symm o)) (fun o => hX1 _) (fun o => hX2 _)
  have hb := vl_bound _ _ NN h0 (fun o ρ hρ => sub_ne_zero.2 (hne o ρ hρ)) hle
  rw [← Finset.sum_coe_sort]
  refine (Finset.sum_le_sum fun ψ _ => hX3 ψ).trans ?_
  rw [← Finset.mul_sum]
  refine mul_le_mul_of_nonneg_left (le_of_eq_of_le ?_ hb) zero_le_two
  exact Fintype.sum_equiv E _ _ fun ψ => by rw [E.symm_apply_apply]

Convert the joint window into VWin — UpperTheory.V.HV.vwin_of_counts, Development.AutomorphicArithmetic.AutomorphicVarieties.HeightAndVanishing.JointWinOfCounts, lines 30–33. Idea: Obtain a common tower and positive-part window, convert the negative-part bound at exponent 401, and combine the contributions on the same interval.

theorem vwin_of_counts (hP : GlobalTheory.Published.PoitouTateDuality) (hF : LocalFinitenessK) (hT : LocalTateDualityK) {CK : ℝ}
    (hK : LemmaK CK) {K : BConst} (hB : ThmBab K 401) (hc : ThmBcFree) (h1 : CountI) (h2 : CountII) (h3 : CountIII)
    (h5 : CountV) (hZ : CountZ) : VWin :=
  vwin_of_joint (jointWin_of_counts hP hF hT hK hB h1 h2 h3 h5 hZ) ((thmBc_iff (by norm_num)).2 hc)

Reuse the tower interval for the positive part — UpperTheory.V.HV.jointWin_of_counts, Development.AutomorphicArithmetic.AutomorphicVarieties.HeightAndVanishing.JointWinOfCounts, lines 25–28. Idea: Apply the height estimate to the very interval selected by ThmBab. Its universal quantifier over accepted windows permits this reuse.

theorem jointWin_of_counts (hP : GlobalTheory.Published.PoitouTateDuality) (hF : LocalFinitenessK) (hT : LocalTateDualityK) {CK : ℝ}
    (hK : LemmaK CK) {K : BConst} (hB : ThmBab K 401) (h1 : CountI) (h2 : CountII) (h3 : CountIII) (h5 : CountV)
    (hZ : CountZ) : JointWin 401 :=
  jointWin_of (by norm_num) hB (thmHV_of_counts hP hF hT hK h1 h2 h3 h5 hZ K (by norm_num))

Evaluate the pointwise estimate on admissible windows — UpperTheory.V.HV.thmHV_of_counts, Development.AutomorphicArithmetic.AutomorphicVarieties.HeightAndVanishing.JointWinOfCounts, lines 20–23. Idea: First prove the estimate with layer bounds as hypotheses. The height theorem specializes it using the supplied interval, the primes, the cutoff and the very same field.

theorem thmHV_of_counts (hP : GlobalTheory.Published.PoitouTateDuality) (hF : LocalFinitenessK) (hT : LocalTateDualityK) {CK : ℝ}
    (hK : LemmaK CK) (h1 : CountI) (h2 : CountII) (h3 : CountIII) (h5 : CountV) (hZ : CountZ) (K : BConst) {Ct : ℝ}
    (hC : 0 < Ct) : ThmHV K Ct :=
  thmHV (pointHV_of_counts hP hF hT hK h1 h2 h3 h5 hZ) K Ct hC

Combine the two prime sums at a point — UpperTheory.V.HV.pointHV_of_counts, Development.AutomorphicArithmetic.AutomorphicVarieties.HeightAndVanishing.JointWinOfCounts, lines 16–18. Idea: Form separate sums inside and outside the fixed exceptional set. Inside, the dispatcher also supplies Case IV and the strict-threshold case Vs. Add the two estimates using the same host and layer budget.

theorem pointHV_of_counts (hP : GlobalTheory.Published.PoitouTateDuality) (hF : LocalFinitenessK) (hT : LocalTateDualityK) {CK : ℝ}
    (hK : LemmaK CK) (h1 : CountI) (h2 : CountII) (h3 : CountIII) (h5 : CountV) (hZ : CountZ) : PointHV :=
  point (sumIn h2 h5 (countVs hP hF hT CK hK) countIV) (sumOut h1 hZ h2 h3)

Add contributions inside the exceptional set — UpperTheory.V.HV.sumIn, Development.AutomorphicArithmetic.AutomorphicVarieties.HeightAndVanishing.FinalLe, lines 86–249. Idea: Separate the twist-one threshold from the higher twists. For the odd-order branch, Case IV uses the supplied layer bound. Absorb the finite character contributions into a common exponent.

theorem UpperTheory.V.HV.sumIn :
    CountII → CountV → CountVs → CountIV → SumIn := by
  unfold SumIn
  intro hII hV hVs hIV χ l j hl
  haveI : Fact (l : ℕ).Prime := ⟨l.2⟩
  haveI : IsAlgClosure ℚ (AlgebraicClosure ℚ) := by
    convert (AlgebraicClosure.instIsAlgClosure (k := ℚ))
    · rfl
    · exact Subsingleton.elim _ _
  obtain ⟨C2, hC2⟩ := hII χ
  obtain ⟨C5, hC5⟩ := hV χ
  obtain ⟨C6, hC6⟩ := hVs χ
  obtain ⟨C4, hC4⟩ := hIV χ (l : ℕ) j hl
  set Cm := max C2 (max C5 C6) with hCm
  refine ⟨C4 + 2 * Cm + 9 + (l : ℕ) * χ.N, ?_⟩
  intro h hχ t ht2 hBig B hB hLay E _ _ _ hE Ω _ _ _ ld
  classical
  haveI : NeZero h.N := ⟨h.N_pos.ne'⟩
  haveI : NeZero (Nat.totient h.N) := ⟨(Nat.totient_pos.2 h.N_pos).ne'⟩
  obtain ⟨c, hc⟩ := exists_coef (l : ℕ) (Nat.totient h.N)
  haveI := hc
  have hlp : (l : ℕ).Prime := l.2
  have hl2 : (l : ℕ) ≠ 2 := (prime_of_mem_Bchi hl).2
  have hlB : (l : ℕ) ∈ Bchi h.chi := by
    rw [hχ]
    exact hl
  have hbf := bchiFacts h t hBig
  have hlq1 : (l : ℕ) < h.q1 := (hbf.1 _ hlB).1
  have hld : (l : ℕ) < h.d := (hbf.1 _ hlB).2
  have hidx := hostIndex h
  have hNpos : 0 < h.N := h.N_pos
  have hq1N : h.q1 ≤ h.N := Nat.le_of_dvd hNpos h.host_q1_dvd_N
  have hqN : h.q ≤ h.N := Nat.le_of_dvd hNpos h.q_dvd
  have h16 : 16 ≤ h.N := Nat.le_of_dvd hNpos hidx.2.2.1
  have hlN : (l : ℕ) ≤ h.N := by omega
  set M : ℝ := (h.N : ℝ) * t with hMdef
  set L : ℝ := Real.log ((l : ℕ) : ℝ) with hLdef
  have hN1 : (1 : ℝ) ≤ h.N := by exact_mod_cast (by omega : 1 ≤ h.N)
  have hM3 : 3 ≤ M := by
    have a1 : (16 : ℝ) ≤ h.N := by exact_mod_cast h16
    have a2 : (2 : ℝ) ≤ t := by exact_mod_cast ht2
    rw [hMdef]
    nlinarith
  have hM0 : 0 ≤ M := by linarith
  have hl1 : (1 : ℝ) ≤ ((l : ℕ) : ℝ) := by exact_mod_cast hlp.one_lt.le
  have hL0 : 0 ≤ L := Real.log_nonneg hl1
  have hLl : L ≤ ((l : ℕ) : ℝ) := by
    have := Real.log_le_sub_one_of_pos (show (0 : ℝ) < ((l : ℕ) : ℝ) by linarith)
    linarith
  have hNM : (h.N : ℝ) ≤ M := by
    have a2 : (1 : ℝ) ≤ t := by exact_mod_cast (by omega : 1 ≤ t)
    rw [hMdef]
    nlinarith
  have hlM : ((l : ℕ) : ℝ) ≤ M := le_trans (by exact_mod_cast hlN) hNM
  have hqM : (h.q : ℝ) ≤ M := le_trans (by exact_mod_cast hqN) hNM
  have hKb : ∀ e, 0 < e → e < t → ∀ k ≤ Cm, (((l : ℕ) : ℝ) * h.N * e) ^ k ≤ (M ^ 2) ^ Cm := by
    intro e he0 het k hk
    have he1 : (1 : ℝ) ≤ e := by exact_mod_cast he0
    have het' : (e : ℝ) ≤ t := by exact_mod_cast het.le
    have hx1 : 1 ≤ ((l : ℕ) : ℝ) * h.N * e := by
      have a1 : 1 ≤ ((l : ℕ) : ℝ) * h.N := by nlinarith
      nlinarith
    have hx2 : ((l : ℕ) : ℝ) * h.N * e ≤ M ^ 2 := by
      have a1 : (h.N : ℝ) * e ≤ M := by
        rw [hMdef]
        exact mul_le_mul_of_nonneg_left het' (by linarith)
      calc ((l : ℕ) : ℝ) * h.N * e = ((l : ℕ) : ℝ) * (h.N * e) := by ring
        _ ≤ M * M := mul_le_mul hlM a1 (by positivity) hM0
        _ = M ^ 2 := by ring
    calc (((l : ℕ) : ℝ) * h.N * e) ^ k ≤ (((l : ℕ) : ℝ) * h.N * e) ^ Cm := pow_le_pow_right₀ hx1 hk
      _ ≤ (M ^ 2) ^ Cm := pow_le_pow_left₀ (by linarith) hx2 Cm
  let Oset : Finset (DirichletCharacter c.O h.N) :=
    (Finset.Ico 1 t).biUnion (fun e => (h.X c e).filter (fun ψ => Odd (orderOf (chiP (l : ℕ) ψ))))
  have hkey : ∀ e, 0 < e → e < t → ∀ ψ ∈ h.X c e,
      Vlen (AlgebraicClosure ℚ) c e ψ ≠ ⊤ ∧
        (ψ ∈ Oset ∨ Chr.nrm (l : ℕ) c.O (Vlen (AlgebraicClosure ℚ) c e ψ) * L ≤ (M ^ 2) ^ Cm) := by
    intro e he0 het ψ hψ
    have hchar := ((Host.mem_X h).1 hψ).1
    rcases (UpperTheory.V.HV.cases h t hBig c.O ψ hchar (l : ℕ) e hlp hl2 he0 het).2 hlB with hc2 | hc4 | hc5
    · have hv := hC2 h hχ t hBig (AlgebraicClosure ℚ) (l : ℕ) c e hl2 he0 het ψ hψ hc2
      exact ⟨hv.1, Or.inr (hv.2.trans (hKb e he0 het C2 (le_max_left _ _)))⟩
    · have hs := hC4 h hχ t ht2 hBig B hLay (AlgebraicClosure ℚ) c ψ hchar hc4.2.2
      refine ⟨hs.1 e he0 het, Or.inl ?_⟩
      exact Finset.mem_biUnion.2 ⟨e, Finset.mem_Ico.2 ⟨he0, het⟩, Finset.mem_filter.2 ⟨hψ, hc4.2.2⟩⟩
    · by_cases hR : h.R1 (l : ℕ) ψ ≤ 2 ^ c2 ψ
      · have hv := hC5 h hχ t hBig (AlgebraicClosure ℚ) (l : ℕ) c e hl2 he0 het ψ hψ ⟨hc5, hR⟩
        exact ⟨hv.1, Or.inr (hv.2.trans (hKb e he0 het C5 (le_trans (le_max_left _ _) (le_max_right _ _))))⟩
      · have hv := hC6 h hχ t hBig (AlgebraicClosure ℚ) (l : ℕ) c e hl2 he0 het ψ hψ ⟨hc5, not_le.1 hR⟩
        exact ⟨hv.1, Or.inr (hv.2.trans (hKb e he0 het C6 (le_trans (le_max_right _ _) (le_max_right _ _))))⟩
  have hOcard : Oset.card ≤ h.q := by
    apply (xCard c.O h.N).2 h.q (Nat.pos_of_ne_zero h.chi.ne.out) Oset
    intro ψ hψ
    obtain ⟨e, -, hψ'⟩ := Finset.mem_biUnion.1 hψ
    obtain ⟨hX, hodd⟩ := Finset.mem_filter.1 hψ'
    exact ((hostOdd h c.O ψ ((Host.mem_X h).1 hX).1).2 (l : ℕ) hlp hl2 hlq1.ne hld.ne hodd).1
  have hO2 : ∀ ψ ∈ Oset, ∑ e ∈ Finset.Ico 1 t, Chr.nrm (l : ℕ) c.O (Vlen (AlgebraicClosure ℚ) c e ψ) ≤ B + M ^ C4 := by
    intro ψ hψ
    obtain ⟨e, -, hψ'⟩ := Finset.mem_biUnion.1 hψ
    obtain ⟨hX, hodd⟩ := Finset.mem_filter.1 hψ'
    exact (hC4 h hχ t ht2 hBig B hLay (AlgebraicClosure ℚ) c ψ ((Host.mem_X h).1 hX).1 hodd).2
  have hXsub : ∀ e, h.X c e ⊆ h.X c 0 ∪ h.X c 1 := by
    intro e ψ hψ
    rw [Host.mem_X] at hψ
    rw [Finset.mem_union, Host.mem_X, Host.mem_X]
    have h2 := hψ.2
    unfold PsiEven at h2
    rcases Nat.even_or_odd e with he | he
    · left
      refine ⟨hψ.1, ?_⟩
      unfold PsiEven
      rw [h2, he.neg_one_pow, pow_zero]
    · right
      refine ⟨hψ.1, ?_⟩
      unfold PsiEven
      rw [h2, he.neg_one_pow, pow_one]
  have hred : ∀ e, 0 < e → e < t → plusLen (ld (l : ℕ)) e * eO (l : ℕ) c.O ≤
      ∑ ψ ∈ h.X c e, (Vlen (AlgebraicClosure ℚ) c e ψ + (lossAll (l : ℕ) h.N h.H.index e : ℕ∞) * eO (l : ℕ) c.O) := by
    intro e he0 het
    exact redAll E h.N h.H (hostLevel h E (by rw [hχ]; exact hE)) (l : ℕ) hl2 c Ω (ld (l : ℕ)) (AlgebraicClosure ℚ) e he0.ne' (h.X c e)
      (by
        ext ψ
        rw [Finset.mem_coe, Host.mem_X]
        rfl)
  have hsb := Chr.sumBack (l : ℕ) c.O (DirichletCharacter c.O h.N) (fun e => h.X c e) (h.X c 0 ∪ h.X c 1)
    (fun ψ e => Vlen (AlgebraicClosure ℚ) c e ψ) (fun e => plusLen (ld (l : ℕ)) e)
    (fun e => lossAll (l : ℕ) h.N h.H.index e) t hXsub
    (fun e he0 het => ⟨fun ψ hψ => (hkey e he0 het ψ hψ).1, hred e he0 het⟩)
  have hA : (∑ e ∈ Finset.Ico 1 t, ((plusLen (ld (l : ℕ)) e).toNat : ℝ)) ≤
      (∑ e ∈ Finset.Ico 1 t, ∑ ψ ∈ h.X c e, Chr.nrm (l : ℕ) c.O (Vlen (AlgebraicClosure ℚ) c e ψ)) +
        ((h.X c 0 ∪ h.X c 1).card : ℝ) * ∑ e ∈ Finset.Ico 1 t, ((lossAll (l : ℕ) h.N h.H.index e : ℕ) : ℝ) := hsb.2
  have hloss : ∑ e ∈ Finset.Ico 1 t, ((lossAll (l : ℕ) h.N h.H.index e : ℕ) : ℝ) ≤ t * M ^ 6 := by
    calc ∑ e ∈ Finset.Ico 1 t, ((lossAll (l : ℕ) h.N h.H.index e : ℕ) : ℝ) ≤ ∑ e ∈ Finset.Ico 1 t, M ^ 6 := by
          apply Finset.sum_le_sum
          intro e he
          obtain ⟨he1, het⟩ := Finset.mem_Ico.1 he
          have hb := (lossLe (l : ℕ) h.N h.H.index e hlp hl2 (by omega) hidx.2.1 he1).1
          have hb' : ((lossAll (l : ℕ) h.N h.H.index e : ℕ) : ℝ) ≤ (((h.N * e) ^ 6 : ℕ) : ℝ) := by
            exact_mod_cast hb
          have het' : (e : ℝ) ≤ t := by exact_mod_cast het.le
          calc ((lossAll (l : ℕ) h.N h.H.index e : ℕ) : ℝ) ≤ (((h.N * e) ^ 6 : ℕ) : ℝ) := hb'
            _ = ((h.N : ℝ) * e) ^ 6 := by push_cast; ring
            _ ≤ M ^ 6 := by
              apply pow_le_pow_left₀ (by positivity)
              rw [hMdef]
              exact mul_le_mul_of_nonneg_left het' (by positivity)
      _ = ((Finset.Ico 1 t).card : ℝ) * M ^ 6 := by rw [Finset.sum_const, nsmul_eq_mul]
      _ ≤ t * M ^ 6 := by
          apply mul_le_mul_of_nonneg_right _ (by positivity)
          rw [Nat.card_Ico]
          exact_mod_cast Nat.sub_le t 1
  have hsplit : L * ∑ e ∈ Finset.Ico 1 t, ∑ ψ ∈ h.X c e, Chr.nrm (l : ℕ) c.O (Vlen (AlgebraicClosure ℚ) c e ψ) ≤
      L * (h.q * (B + M ^ C4)) + t * (h.N * (M ^ 2) ^ Cm) :=
    sum_split (fun e => h.X c e) Oset (fun ψ e => Chr.nrm (l : ℕ) c.O (Vlen (AlgebraicClosure ℚ) c e ψ)) t h.N h.q L
      ((M ^ 2) ^ Cm) (B + M ^ C4) (fun ψ e => Vn_nonneg (AlgebraicClosure ℚ) c e ψ) hL0 (by positivity)
      (add_nonneg hB (pow_nonneg hM0 _)) (fun e => (xCard c.O h.N).1 _) hOcard
      (fun e he ψ hψ => (hkey e (Finset.mem_Ico.1 he).1 (Finset.mem_Ico.1 he).2 ψ hψ).2) hO2
  have hT0 : ((h.X c 0 ∪ h.X c 1).card : ℝ) ≤ h.N := by exact_mod_cast (xCard c.O h.N).1 _
  have hlossnn : 0 ≤ ∑ e ∈ Finset.Ico 1 t, ((lossAll (l : ℕ) h.N h.H.index e : ℕ) : ℝ) :=
    Finset.sum_nonneg (fun _ _ => Nat.cast_nonneg _)
  have s1 := mul_le_mul_of_nonneg_left hA hL0
  rw [mul_add] at s1
  have s2 : L * (((h.X c 0 ∪ h.X c 1).card : ℝ) * ∑ e ∈ Finset.Ico 1 t, ((lossAll (l : ℕ) h.N h.H.index e : ℕ) : ℝ)) ≤
      L * (h.N * (t * M ^ 6)) :=
    mul_le_mul_of_nonneg_left (mul_le_mul hT0 hloss hlossnn (by positivity)) hL0

Bound the sum over arbitrary finite sets of other primes — UpperTheory.V.HV.sumOut, Development.AutomorphicArithmetic.AutomorphicVarieties.HeightAndVanishing.SumOut, lines 50–231. Idea: Apply Case I to the unrestricted contribution. For the remainder ℓ−1 divides twice the twist, bounding the number of relevant primes. Cases Z, II and III and the character counts control these terms.

theorem UpperTheory.V.HV.sumOut :
    CountI → CountZ → CountII → CountIII → SumOut := by
  classical
  intro hI hZ hII hIII χ
  obtain ⟨C1, r₁, r₂, hr₁, hr₂, hI⟩ := hI χ
  obtain ⟨CZ, hZ⟩ := hZ χ
  obtain ⟨C2, hII⟩ := hII χ
  obtain ⟨C3, hIII⟩ := hIII χ
  refine ⟨C1 + 3 * max CZ (max C2 C3) + 4, r₁, r₂, hr₁, hr₂, ?_⟩
  intro h hχ hq1 hd hq1' hd' t ht2 hbig E _ _ _ hE Ω _ _ _ ld S hS
  subst hχ
  obtain ⟨Ω0, iF, iC, iA⟩ := exists_closure
  set K := max CZ (max C2 C3) with hK
  have hN1 : (1:ℝ) ≤ (h.N : ℝ) := by exact_mod_cast h.N_pos
  have ht2' : (2:ℝ) ≤ (t:ℝ) := by exact_mod_cast ht2
  set M : ℝ := (h.N : ℝ) * t with hM
  have hM2 : 2 ≤ M := by nlinarith
  have htM : (t:ℝ) ≤ M := by nlinarith
  have hNM : (h.N:ℝ) ≤ M := by nlinarith
  haveI : NeZero h.N.totient := ⟨(Nat.totient_pos.2 h.N_pos).ne'⟩
  choose c hc using fun l : Nat.Primes => exists_coef (l : ℕ) h.N.totient
  have hfacts := fun (l : Nat.Primes) (hl : l ∈ S) =>
    (bchiFacts h t hbig).2.2.2.2 (l:ℕ) l.2 (hS l hl).1 (hS l hl).2
  have hother : ∀ l ∈ S, ∀ e, 0 < e → e < t → ¬ h.CaseI (l:ℕ) e →
      ∀ ψ ∈ h.X (c l) e, VLe Ω0 (c l) e ψ (M ^ (3 * K)) := by
    intro l hl e he1 he2 hn ψ hψ
    have hl2 := (hS l hl).1
    have hlB := (hS l hl).2
    have hchar := ((Host.mem_X h).1 hψ).1
    have hc4 := ((UpperTheory.V.HV.cases h t hbig (↥(c l).O) ψ hchar (l:ℕ) e l.2 hl2 he1 he2).1 hlB).2.2.2.2.2
    have hdv : (l:ℕ) - 1 ∣ 2 * e := by
      simp only [Host.CaseI, not_and, not_not] at hn
      exact hn hlB
    have hle := (hfacts l hl).2.2.2.2.2.2.2 e he1 he2 hdv
    have hl' : ((l:ℕ):ℝ) ≤ 2 * t := by exact_mod_cast hle.2.1
    have he' : (e:ℝ) ≤ t := by exact_mod_cast he2.le
    have hl1 : (1:ℝ) ≤ (l:ℕ) := by exact_mod_cast l.2.one_lt.le
    have he1' : (1:ℝ) ≤ e := by exact_mod_cast he1
    have hbase1 : (1:ℝ) ≤ ((l:ℕ):ℝ) * h.N * e := by
      have a1 := mul_le_mul hl1 hN1 zero_le_one (by positivity)
      have a2 := mul_le_mul a1 he1' zero_le_one (by positivity)
      simpa using a2
    have hbase : ((l:ℕ):ℝ) * h.N * e ≤ M ^ 3 := by
      have a1 : ((l:ℕ):ℝ) * h.N ≤ (2 * t) * h.N := mul_le_mul_of_nonneg_right hl' (by positivity)
      have a2 : ((l:ℕ):ℝ) * h.N * e ≤ (2 * t) * h.N * t :=
        mul_le_mul a1 he' (by positivity) (by positivity)
      have hM0 : 0 ≤ M := by linarith
      have a4 : 2 * M * t ≤ M * M * t :=
        mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hM2 hM0) (by positivity)
      have a5 : M * M * t ≤ M * M * M := mul_le_mul_of_nonneg_left htM (by positivity)
      have a3 : (2 * (t:ℝ)) * h.N * t = 2 * M * t := by rw [hM]; ring
      calc _ ≤ _ := a2
        _ = 2 * M * t := a3
        _ ≤ M * M * M := a4.trans a5
        _ = M ^ 3 := by ring
    have key : ∀ C', C' ≤ K → VLe Ω0 (c l) e ψ ((((l:ℕ):ℝ) * h.N * e) ^ C') →
        VLe Ω0 (c l) e ψ (M ^ (3 * K)) := by
      intro C' hC' v
      apply VLe.mono Ω0 (c l) v
      calc _ ≤ (((l:ℕ):ℝ) * h.N * e) ^ K := pow_le_pow_right₀ hbase1 hC'
        _ ≤ (M ^ 3) ^ K := pow_le_pow_left₀ (by linarith) hbase K
        _ = M ^ (3 * K) := by rw [← pow_mul]
    rcases hc4 with h1 | h1 | h1 | h1
    · exact absurd h1 hn
    · exact key CZ (le_max_left _ _) (hZ h rfl t hbig Ω0 (l:ℕ) (c l) e hl2 he1 he2 ψ hψ h1)
    · exact key C2 (le_trans (le_max_left _ _) (le_max_right _ _))
        (hII h rfl t hbig Ω0 (l:ℕ) (c l) e hl2 he1 he2 ψ hψ h1)
    · exact key C3 (le_trans (le_max_right _ _) (le_max_right _ _))
        (hIII h rfl t hbig Ω0 (l:ℕ) (c l) e hl2 he1 he2 ψ hψ h1)
  have hfin : ∀ l ∈ S, ∀ e, 0 < e → e < t → ∀ ψ ∈ h.X (c l) e, Vlen Ω0 (c l) e ψ ≠ ⊤ := by
    intro l hl e he1 he2 ψ hψ
    by_cases hn : h.CaseI (l:ℕ) e
    · have hLs : ∀ l' ∈ ({l} : Finset Nat.Primes), (l':ℕ) ≠ 2 ∧ h.CaseI (l':ℕ) e := by
        intro l' hl'
        rw [Finset.mem_singleton] at hl'
        rw [hl']
        exact ⟨(hS _ hl).1, hn⟩
      exact (hI h rfl hq1 hd hq1' hd' t hbig e he1 he2 Ω0 c {l} hLs).1 l
        (Finset.mem_singleton_self l) ψ hψ
    · exact (hother l hl e he1 he2 hn ψ hψ).1
  have hper : ∀ l ∈ S, (∀ e, 0 < e → e < t → plusLen (ld l) e ≠ ⊤) ∧
      ∑ e ∈ Finset.Ico 1 t, ((plusLen (ld l) e).toNat : ℝ) ≤
        ∑ e ∈ Finset.Ico 1 t, ∑ ψ ∈ h.X (c l) e, Vn Ω0 (c l) e ψ := by
    intro l hl
    haveI := (c l).dvr
    haveI := (c l).fin
    haveI := hc l
    have hidx := (hfacts l hl).2.2.2.2.2.2.1
    have hlev := hostLevel h E hE
    have hT : ∀ e, (↑(h.X (c l) e) : Set (DirichletCharacter (↥(c l).O) h.N)) =
        Chr.evenSet (↥(c l).O) h.H e := by
      intro e
      ext ψ
      simp [Host.mem_X, Chr.evenSet, Host.IsChar, PsiEven]
    have hred := fun e (he : e ≠ 0) =>
      redPrime E h.N h.H hlev (l:ℕ) (hS l hl).1 hidx (c l) Ω (ld l) Ω0 e he (h.X (c l) e) (hT e)
    have r := Chr.sumBack (l:ℕ) (↥(c l).O) (DirichletCharacter (↥(c l).O) h.N)
      (fun e => if e < t then h.X (c l) e else ∅)
      ((Finset.range t).biUnion (fun e => h.X (c l) e))
      (fun ψ e => Vlen Ω0 (c l) e ψ) (fun e => plusLen (ld l) e) (fun _ => 0) t
      (by
        intro e
        split_ifs with h'
        · intro ψ hψ
          exact Finset.mem_biUnion.2 ⟨e, Finset.mem_range.2 h', hψ⟩
        · exact Finset.empty_subset _)
      (by
        intro e he1 he2
        simp only [he2, if_true, Nat.cast_zero, zero_mul, add_zero]
        exact ⟨hfin l hl e he1 he2, hred e he1.ne'⟩)
    refine ⟨r.1, ?_⟩
    have r2 := r.2
    simp only [Nat.cast_zero, Finset.sum_const_zero, mul_zero, add_zero] at r2
    refine r2.trans (le_of_eq (Finset.sum_congr rfl fun e he => ?_))
    simp only [Finset.mem_Ico] at he
    simp only [if_pos he.2]
    rfl
  have hstep : ∀ e, 0 < e → e < t →
      ∑ l ∈ S, Real.log ((l:ℕ):ℝ) * ∑ ψ ∈ h.X (c l) e, Vn Ω0 (c l) e ψ ≤
        M ^ C1 + 2 * M * M ^ (3 * K) := by
    intro e he1 he2
    rw [← Finset.sum_filter_add_sum_filter_not S (fun l : Nat.Primes => h.CaseI (l:ℕ) e)]
    have hLs : ∀ l ∈ S.filter (fun l : Nat.Primes => h.CaseI (l:ℕ) e), (l:ℕ) ≠ 2 ∧ h.CaseI (l:ℕ) e := by
      intro l hl
      rw [Finset.mem_filter] at hl
      exact ⟨(hS l hl.1).1, hl.2⟩
    have hA := (hI h rfl hq1 hd hq1' hd' t hbig e he1 he2 Ω0 c _ hLs).2
    have hB : ∀ l ∈ S.filter (fun l : Nat.Primes => ¬ h.CaseI (l:ℕ) e),
        Real.log ((l:ℕ):ℝ) * ∑ ψ ∈ h.X (c l) e, Vn Ω0 (c l) e ψ ≤ (h.N:ℝ) * M ^ (3 * K) := by
      intro l hl
      rw [Finset.mem_filter] at hl
      rw [Finset.mul_sum]
      calc ∑ ψ ∈ h.X (c l) e, Real.log ((l:ℕ):ℝ) * Vn Ω0 (c l) e ψ
          ≤ ∑ ψ ∈ h.X (c l) e, M ^ (3 * K) := by
            apply Finset.sum_le_sum
            intro ψ hψ
            rw [mul_comm]
            exact (hother l hl.1 e he1 he2 hl.2 ψ hψ).2
        _ = ((h.X (c l) e).card : ℝ) * M ^ (3 * K) := by rw [Finset.sum_const, nsmul_eq_mul]
        _ ≤ (h.N:ℝ) * M ^ (3 * K) := by
            apply mul_le_mul_of_nonneg_right _ (by positivity)
            exact_mod_cast (xCard (↥(c l).O) h.N).1 _
    have hcard : ((S.filter (fun l : Nat.Primes => ¬ h.CaseI (l:ℕ) e)).card : ℝ) ≤ 2 * t := by
      have := card_small (S.filter (fun l : Nat.Primes => ¬ h.CaseI (l:ℕ) e)) (2 * t) (by
        intro l hl
        rw [Finset.mem_filter] at hl
        have hn := hl.2
        simp only [Host.CaseI, not_and, not_not] at hn
        exact ((hfacts l hl.1).2.2.2.2.2.2.2 e he1 he2 (hn (hS l hl.1).2)).2.1)
      exact_mod_cast this
    have hB' : ∑ l ∈ S.filter (fun l : Nat.Primes => ¬ h.CaseI (l:ℕ) e),
        Real.log ((l:ℕ):ℝ) * ∑ ψ ∈ h.X (c l) e, Vn Ω0 (c l) e ψ ≤ 2 * M * M ^ (3 * K) := by
      calc _ ≤ ∑ l ∈ S.filter (fun l : Nat.Primes => ¬ h.CaseI (l:ℕ) e), (h.N:ℝ) * M ^ (3 * K) :=
            Finset.sum_le_sum hB
        _ = ((S.filter (fun l : Nat.Primes => ¬ h.CaseI (l:ℕ) e)).card : ℝ) * ((h.N:ℝ) * M ^ (3 * K)) := by
            rw [Finset.sum_const, nsmul_eq_mul]
        _ ≤ (2 * t) * ((h.N:ℝ) * M ^ (3 * K)) :=
            mul_le_mul_of_nonneg_right hcard (by positivity)
        _ = 2 * M * M ^ (3 * K) := by rw [hM]; ring
    exact add_le_add hA hB'
  refine ⟨fun l hl e he1 he2 => (hper l hl).1 e he1 he2, ?_⟩
  calc ∑ l ∈ S, Real.log ((l:ℕ):ℝ) * ∑ e ∈ Finset.Ico 1 t, ((plusLen (ld l) e).toNat : ℝ)
      ≤ ∑ l ∈ S, Real.log ((l:ℕ):ℝ) *
          ∑ e ∈ Finset.Ico 1 t, ∑ ψ ∈ h.X (c l) e, Vn Ω0 (c l) e ψ := by
        apply Finset.sum_le_sum
        intro l hl
        apply mul_le_mul_of_nonneg_left (hper l hl).2
        exact Real.log_nonneg (by exact_mod_cast l.2.one_lt.le)
    _ = ∑ e ∈ Finset.Ico 1 t, ∑ l ∈ S, Real.log ((l:ℕ):ℝ) *
          ∑ ψ ∈ h.X (c l) e, Vn Ω0 (c l) e ψ := by
        simp_rw [Finset.mul_sum]
        exact Finset.sum_comm
    _ ≤ ∑ e ∈ Finset.Ico 1 t, (M ^ C1 + 2 * M * M ^ (3 * K)) := by
        apply Finset.sum_le_sum
        intro e he
        simp only [Finset.mem_Ico] at he
        exact hstep e (by omega) he.2
    _ ≤ (t:ℝ) * (M ^ C1 + 2 * M * M ^ (3 * K)) := by
        rw [Finset.sum_const, Nat.card_Ico, nsmul_eq_mul]
        apply mul_le_mul_of_nonneg_right _ (by positivity)
        exact_mod_cast Nat.sub_le t 1
    _ ≤ M ^ (C1 + 3 * K + 4) := final_le M t C1 (3 * K) hM2 htM

12 · Auxiliary primes and Behrend towers#

Node

Declaration

Contract

Tier

Behrend’s collision-free indices
lemma · behrend

Formalism.FrobeniusOrbits.ThickExists.noRel_image

For L≥1, encoding an integer sphere in base 4Ld gives a set with NoRel for coefficients bounded by L.

✓ kernel-checked

The tower selection in the timeline
motivation · paper-behrend

announcement, p. 4

Entry 19 links the choice of a tower to Behrend-type sets.

○ motivation

Lean source of these 1 declarations (excerpts printed from data/model.json)

Behrend’s collision-free indices — Formalism.FrobeniusOrbits.ThickExists.noRel_image, Formalism.FrobeniusOrbits.FrobeniusOrbitsProofs.ThickExists, lines 85–95. Idea: The large base avoids carries. A line meets a sphere in at most two distinct points.

lemma noRel_image (L S d k : ℕ) (hL : 1 ≤ L) :
    NoRel ((Behrend.sphere S d k).image (Behrend.map (4 * L * d))) L := by
  unfold NoRel
  intro s₁ hs₁ s₂ hs₂ s₃ hs₃ h12 h13 h23 i j hi0 hiL hj0 hjL hij heq
  rw [Finset.mem_image] at hs₁ hs₂ hs₃
  obtain ⟨v₁, hv₁, rfl⟩ := hs₁
  obtain ⟨v₂, hv₂, rfl⟩ := hs₂
  obtain ⟨v₃, hv₃, rfl⟩ := hs₃
  obtain ⟨hb₁, hq₁⟩ := sphere_mem_lemma hv₁
  obtain ⟨hb₂, hq₂⟩ := sphere_mem_lemma hv₂
  obtain ⟨hb₃, hq₃⟩ := sphere_mem_lemma hv₃

13 · The Galois row#

Node

Declaration

Contract

Tier

The local–global Galois row
definition · row-def

UpperTheory.GalStar.Row0b

For a regular algebraic polarized cuspidal representation over a CM field and a prime ℓ, there exist a Galois representation, weight and Hodge–Tate multiset satisfying PropsB.

◇ source-read

Producer of the Galois row
producer · row-prod

UpperTheory.Gal.Int.galoisLocalGlobalStrong_recParameter

Row0b recT with no explicit global premise.

◇ source-read

Galois representations from theta lifting
reducer · row-geo

UpperTheory.Gal.Int.galoisRepresentations_of_thetaLift

TLiftK implies Row0b recT.

◇ source-read

Theta-lift existence at high rank
producer · tlift

UpperTheory.TP.K.tLiftK

For the admissible CM data of TLiftK, for all sufficiently high dimensions and allowed weights a lift U′ exists.

◇ source-read

Weight-one geometric realization
producer · geo-one

UpperTheory.Gal.Int.Geo.geoOne_holds

GeoOne with no explicit premise.

◇ source-read

Quantifiers of the theta lift
definition · tlift-def

UpperTheory.TP.TLiftK

For each admissible CM setup, n≥1 and X, there exists d₀; for each d≥d₀, permissible W, Hecke characters, weights and U, an IsLift witness U′ exists.

◇ source-read

Lean source of these 6 declarations (excerpts printed from data/model.json)

The local–global Galois row — UpperTheory.GalStar.Row0b, Development.AutomorphicArithmetic.Foundations.GaloisRepresentations.TypeConditions.WeightsConjBis, lines 69–73. Idea: The fields of PropsB specify continuity, semisimplicity, comparisons and weight relations.

def Row0b : Prop :=
  ∀ (E Ω : Type) [Field E] [NumberField E] [IsCMField E] [Field Ω] [Algebra E Ω] [IsAlgClosure E Ω]
    (l : ℕ) [Fact l.Prime] (ι : Qbar l ≃+* ℂ) (a : ℕ), 1 ≤ a →
    ∀ (π : CuspSub E a) (χ : HChar (maximalRealSubfield E)), (CG.mk π).IsRegAlg → GlobalTheory.ContraPair.PolarizedPair π χ →
      ∃ (r : G E Ω →* GL (Fin a) (Qbar l)) (wt : ℤ) (HT : (E →+* Qbar l) → Multiset ℤ), PropsB Rc π ι r wt HT

Producer of the Galois row — UpperTheory.Gal.Int.galoisLocalGlobalStrong_recParameter, Development.AutomorphicArithmetic.Foundations.GaloisRepresentations.IntegralStructures.RowSrc, lines 6–6. Idea: Feed the named theta-lift theorem to the conditional Galois construction.

theorem galoisLocalGlobalStrong_recParameter : UpperTheory.GalStar.Row0b recT := galoisRepresentations_of_thetaLift UpperTheory.TP.K.tLiftK

Galois representations from theta lifting — UpperTheory.Gal.Int.galoisRepresentations_of_thetaLift, Development.AutomorphicArithmetic.Foundations.GaloisRepresentations.IntegralStructures.GaloisRepresentationsOfThetaLift, lines 6–6. Idea: Apply the geometric realization theorem with the named weight-one source and the theta lift.

theorem galoisRepresentations_of_thetaLift (up : UpperTheory.TP.TLiftK) : UpperTheory.GalStar.Row0b recT := galoisLocalGlobalStrong_of_geometry_lift UpperTheory.Gal.Int.Geo.geoOne_holds up

Theta-lift existence at high rank — UpperTheory.TP.K.tLiftK, Development.AutomorphicArithmetic.Foundations.GaloisRepresentations.ThetaParseval.ThetaKernels.TLiftK, lines 4–5. Idea: This named theorem supplies the high-dimensional lift required for Row0b.

theorem UpperTheory.TP.K.tLiftK : UpperTheory.TP.TLiftK :=
  UpperTheory.TP.tLift_holds_k

Weight-one geometric realization — UpperTheory.Gal.Int.Geo.geoOne_holds, Development.AutomorphicArithmetic.Foundations.GaloisRepresentations.IntegralStructures.GeometricFlagBases.WeightOneGeometricRealization, lines 11–11. Idea: Converts the stated weight-one realization into the geometric input to the row.

theorem geoOne_holds : GeoOne := geometric_realization_of_weight_one weight_one_geometric_realization

Quantifiers of the theta lift — UpperTheory.TP.TLiftK, Development.AutomorphicArithmetic.Foundations.GaloisRepresentations.ThetaParseval.HalfIndexLattices.TLiftK, lines 12–23. Idea: The weight inequality is imposed after the choice of d. The lift has an explicit existential codomain.

def TLiftK : Prop :=
  ∀ (E : Type) [Field E] [NumberField E] [IsCMField E] (B : Base (maximalRealSubfield E) E), W.GoodK (cj E) B →
    ∀ (n : ℕ), 1 ≤ n → ∀ X : Spc (maximalRealSubfield E) E n, X.J = 1 → X.IsHerm (cj E) B n 0 →
    ∃ d₀ : ℕ, ∀ d, d₀ ≤ d → ∀ (W : Spc (maximalRealSubfield E) E d) (δ : E), W.J = δ • (1 : Matrix (Fin d) (Fin d) E) →
      W.IsSkew (cj E) B d 0 → ∀ (χX χW : Chr (maximalRealSubfield E) E) (mX mW : InfinitePlace (maximalRealSubfield E) → ℤ),
      IsHecke (maximalRealSubfield E) E χX → IsHecke (maximalRealSubfield E) E χW →
      ResEtaPow (Units.map (algebraMap (maximalRealSubfield E) (AF (maximalRealSubfield E))).toMonoidHom).range χX n →
      ResEtaPow (Units.map (algebraMap (maximalRealSubfield E) (AF (maximalRealSubfield E))).toMonoidHom).range χW d →
      HasExp B.emb χX mX → HasExp B.emb χW mW →
      ∀ (U : Submodule ℂ (GlobalTheory.UnitaryBC.UA E n → ℂ)) (lam : InfinitePlace (maximalRealSubfield E) → DomWeight n),
        GlobalTheory.UnitaryBC.IsAutRepU U → (∀ w, GlobalTheory.UnitaryBC.HasWeightAt U (B.emb w).1 (lam w)) →
        (∀ w k, (d : ℤ) + mW w ≤ 2 * (lam w).w k) → ∃ U' : Submodule ℂ (GlobalTheory.UnitaryBC.UA E d → ℂ), IsLift B χX χW mX mW lam U U'

14 · Seven inputs at the decisive call#

Node

Declaration

Contract

Tier

Closed half-plane assembly
producer · every

UpperTheory.FinalTheorems.everyCharacter

EveryCharacter with no explicit arithmetic premise.

◇ source-read

The half-plane theorem from one row
reducer · from-row

UpperTheory.FinalTheorems.everyCharacter_of_row

Row0b with the specified local parameter convention implies EveryCharacter.

◇ source-read

Existence of local Langlands parameters
producer · rec

UpperTheory.Zero.LLC.recTExists

UpperTheory.Zero.LLC.RecTExists.

◇ source-read

Assemble the automorphic inputs
reducer · lit

UpperTheory.LiteratureTheorems.every_character_of_literature_of_vWin

OpenLiteratureStatements and VWin imply EveryCharacter.

◇ source-read

Three fields in the literature input
definition · open-record

UpperTheory.LiteratureTheorems.OpenLiteratureStatements

The record has fields Row, RecTExists and Row, in that order.

◇ source-read

The unitary and eigenvalue package
producer · eigen-package

UpperTheory.LiteratureTheorems.published_results_eigen

OpenLiteratureStatements imply UnitaryGroupThirdPlaceHypotheses.

◇ source-read

The local theta package
producer · theta-package

UpperTheory.LiteratureTheorems.published_results_first

OpenLiteratureStatements imply ThetaLocalInputs.

◇ source-read

The Hodge-bundle package
producer · hodge-package

UpperTheory.LiteratureTheorems.published_results_arithmetic

OpenLiteratureStatements imply PublishedHodgeBundleTheorems.

◇ source-read

The local parameter input at the call site
producer · local-rec

UpperTheory.LiteratureTheorems.local_langlands_gl_recT_exists_of_literature

OpenLiteratureStatements imply RecTExists in the GL convention.

◇ source-read

Read the parameter field
lemma · local-rec-proj

UpperTheory.LiteratureTheorems.local_langlands_recT_exists_of_literature

OpenLiteratureStatements imply RecTExists.

◇ source-read

Regular characters yield the Green input
reducer · green

GlobalTheory.GreenBridge.green_of_regular

GreenRegularCharacters imply GLq.Green.

◇ source-read

Bind the estimates at 2 and 3
reducer · linked-two-three

UpperTheory.N.boundAtTwoThree_linked_of_recT

For local-global inputs, RecTExists and a compatible dependence parameter, the bounds at two and three hold on linked data.

◇ source-read

Match global integrals and local data
reducer · theta-match

UpperTheory.LiteratureTheorems.theta_integrals_agree_and_local_matching_of_literature

OpenLiteratureStatements imply ThetaIntegralsAgree ∧ LocalMatching.

◇ source-read

Produce the covolume bound
reducer · covol

SelfIntersectionVolumeEstimates.topCovolSlim2_use_alt_alt

The named geometric, arithmetic Hilbert–Samuel and Hodge-bundle hypotheses imply CovolumeBoundOfX.

◇ source-read

Seven inputs for every character
reducer · seven

UpperTheory.Lit.every_character_of_theta_integrals_local_matching

The seven groups of hypotheses imply EveryCharacter.

◇ source-read

Build a nonempty definite-side package
reducer · definite

UpperTheory.Lit.nonempty_hyps_definite_side_of_closed_bound

Unitary, theta, matching, covolume, local-parameter and linked-bound data yield Nonempty (HypsAlt … DefiniteSideCondition).

◇ source-read

Lean source of these 16 declarations (excerpts printed from data/model.json)

Closed half-plane assembly — UpperTheory.FinalTheorems.everyCharacter, Development.AutomorphicArithmetic.CharacterBoxes.MainConclusion, lines 10–11. Idea: The final line supplies a named producer for the local–global Galois row.

theorem UpperTheory.FinalTheorems.everyCharacter : UpperTheory.EveryCharacter :=
  UpperTheory.FinalTheorems.everyCharacter_of_row UpperTheory.Gal.Int.galoisLocalGlobalStrong_recParameter

The half-plane theorem from one row — UpperTheory.FinalTheorems.everyCharacter_of_row, Development.AutomorphicArithmetic.CharacterBoxes.MainConclusion, lines 7–8. Idea: The same h fills two fields in the literature-input record and produces the cohomological window.

theorem UpperTheory.FinalTheorems.everyCharacter_of_row (h : UpperTheory.GalStar.Row0b fun h rc => UpperTheory.Zero.LLC.IsRecT h rc) : UpperTheory.EveryCharacter :=
  UpperTheory.LiteratureTheorems.every_character_of_literature_of_vWin ⟨h, UpperTheory.Zero.LLC.recTExists, h⟩ (UpperTheory.One.vwin_of_row h)

Existence of local Langlands parameters — UpperTheory.Zero.LLC.recTExists, Development.AutomorphicArithmetic.Foundations.LocalLanglands.LocalCentralUnits.RecTExists, lines 20–31. Idea: Extend a parameter from the cuspidal representations and establish the local comparison fields.

theorem UpperTheory.Zero.LLC.recTExists :
    UpperTheory.Zero.LLC.RecTExists := by
  intro E Ω _ _ _ _ _ A w h
  obtain ⟨a, ha, -⟩ := UpperTheory.Zero.LLC.artEx E Ω A w h
  obtain ⟨r, hr⟩ := UpperTheory.Zero.LLC.cuspEx E Ω A w h a ha
  obtain ⟨⟨rc, hrc⟩, hcu⟩ :=
    GlobalTheory.LocLanglands.exists_isLExt UpperTheory.Zero.LLC.Pr.exh UpperTheory.Zero.LLC.Pr.multi E Ω A w h r
  have hcusp : ∀ x : IrrGL (HeightOneSpectrum.adicCompletion E w), x.IsCusp → rc x = r x :=
    hcu rc hrc
  have hD := UpperTheory.Zero.LLC.extDim E Ω A w h a ha r rc hr hrc
  have hT := UpperTheory.Zero.LLC.extTw E Ω A w h a ha r rc hr hrc
  refine ⟨rc, a, ha, ?_⟩

Assemble the automorphic inputs — UpperTheory.LiteratureTheorems.every_character_of_literature_of_vWin, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.EveryCharacterOfLiteratureOfVWin, lines 810–813. Idea: Pass the eigenvalue and local-theta packages, local matching, covolumes, local Langlands and VWin to the seven-input implication.

theorem UpperTheory.LiteratureTheorems.every_character_of_literature_of_vWin (O : _root_.UpperTheory.LiteratureTheorems.OpenLiteratureStatements) (hV : UpperTheory.Top.VWin) : UpperTheory.EveryCharacter :=
  _root_.UpperTheory.Lit.every_character_of_theta_integrals_local_matching (_root_.UpperTheory.LiteratureTheorems.published_results_eigen O) (_root_.UpperTheory.LiteratureTheorems.published_results_first O) (_root_.UpperTheory.LiteratureTheorems.theta_integrals_agree_and_local_matching_of_literature O).1 (_root_.UpperTheory.LiteratureTheorems.theta_integrals_agree_and_local_matching_of_literature O).2
    (_root_.SelfIntersectionVolumeEstimates.topCovolSlim2_use_alt_alt (_root_.UpperTheory.LiteratureTheorems.resolution_char_zero_of_literature O) (_root_.UpperTheory.LiteratureTheorems.principalisation_char_zero_of_literature O) (_root_.UpperTheory.LiteratureTheorems.poincare_lelong_inv_of_literature O) PositivityTheory.Pf1.HilbertSamuelMoriwaki.hsUse_outright PositivityTheory.Pf1.HilbertSamuelMoriwaki.moriwakiBig_outright (_root_.UpperTheory.LiteratureTheorems.fargues_exact_of_literature O) (_root_.UpperTheory.LiteratureTheorems.zarhin_statement O) (_root_.UpperTheory.LiteratureTheorems.nef_rr_of_literature O) (_root_.UpperTheory.LiteratureTheorems.siegel_toroidal_integral_of_literature O) (_root_.UpperTheory.LiteratureTheorems.toroidal_for_fan_ks_of_literature O) (_root_.UpperTheory.LiteratureTheorems.semi_abelian_lie_seminegative_of_literature O) (_root_.UpperTheory.LiteratureTheorems.point_separation_pair_of_literature O) (_root_.UpperTheory.LiteratureTheorems.ar_degree_of_literature O) (_root_.UpperTheory.LiteratureTheorems.published_results_arithmetic O) (_root_.UpperTheory.LiteratureTheorems.grothendieck_deformation_of_literature O))
    (_root_.UpperTheory.LiteratureTheorems.local_langlands_gl_recT_exists_of_literature O) hV

Three fields in the literature input — UpperTheory.LiteratureTheorems.OpenLiteratureStatements, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.EveryCharacterOfLiteratureOfVWin, lines 215–218. Idea: The two row fields have the same Lean type. The closed caller inserts the same term in both places.

structure UpperTheory.LiteratureTheorems.OpenLiteratureStatements : Prop where
  caraianiLocalGlobalDual : _root_.UpperTheory.One.M.Row
  localLanglandsExists : _root_.UpperTheory.Zero.LLC.RecTExists
  galoisRepOfPolarizedPairLit : _root_.UpperTheory.One.M.Row

The unitary and eigenvalue package — UpperTheory.LiteratureTheorems.published_results_eigen, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.EveryCharacterOfLiteratureOfVWin, lines 666–672. Idea: The record starts with cohomological, finite-field character, Hecke, Chebotarev, polarized Galois and base-change inputs. These are the P argument.

theorem UpperTheory.LiteratureTheorems.published_results_eigen (O : _root_.UpperTheory.LiteratureTheorems.OpenLiteratureStatements) : _root_.GlobalTheory.Fc.S0.UnitaryGroupThirdPlaceHypotheses where
  clozelCohomological := (_root_.UpperTheory.LiteratureTheorems.clozel_cohomological_of_literature O)
  greenCuspidal := (_root_.UpperTheory.LiteratureTheorems.green_cuspidal_of_literature O)
  heckeLAdicCharacter := (_root_.UpperTheory.LiteratureTheorems.hecke_l_adic_character_of_literature O)
  chebotarevDegreeOne := (_root_.UpperTheory.LiteratureTheorems.chebotarev_degree_one_of_literature O)
  galoisRepOfPolarizedCuspidal := (_root_.UpperTheory.LiteratureTheorems.cusp_u_of_literature O)
  baseChangeDefiniteUnitary := (_root_.UpperTheory.LiteratureTheorems.base_change_definite_unitary_group_of_literature O)

The local theta package — UpperTheory.LiteratureTheorems.published_results_first, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.EveryCharacterOfLiteratureOfVWin, lines 727–735. Idea: The record begins with Green series, Linnik, complex multiplication, mirabolic, branching and local representation inputs. These supply F.

theorem UpperTheory.LiteratureTheorems.published_results_first (O : _root_.UpperTheory.LiteratureTheorems.OpenLiteratureStatements) : GlobalTheory.FunPr.ThetaLocalInputs where
  greenSeriesSt := (_root_.UpperTheory.LiteratureTheorems.green_series_st_of_literature O)
  linnik := (_root_.UpperTheory.LiteratureTheorems.linnik_of_literature O)
  complexMultiplicationJSt := (_root_.UpperTheory.LiteratureTheorems.complex_multiplication_j_st_of_literature O)
  cuspidalMirabolic := (_root_.UpperTheory.LiteratureTheorems.cuspidal_mirabolic_of_literature O)
  weylBranching := (_root_.UpperTheory.LiteratureTheorems.weyl_branching_of_literature O)
  bernsteinUnitaryProductIrreducible := (_root_.UpperTheory.LiteratureTheorems.bernstein_unitary_product_irreducible_of_literature O)
  zelevinskyPolynomialRing := (_root_.UpperTheory.LiteratureTheorems.zelevinsky_polynomial_ring_of_literature O)
  bernsteinZelevinskyFiniteness := (_root_.UpperTheory.LiteratureTheorems.bernstein_zelevinsky_finiteness_of_literature O)

The Hodge-bundle package — UpperTheory.LiteratureTheorems.published_results_arithmetic, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.EveryCharacterOfLiteratureOfVWin, lines 781–786. Idea: The geometric record starts with toroidal compactification, volume, arithmetic intersection calculus and abelian de Rham data. It feeds the covolume producer.

theorem UpperTheory.LiteratureTheorems.published_results_arithmetic (O : _root_.UpperTheory.LiteratureTheorems.OpenLiteratureStatements) : GlobalTheory.CovTop.PublishedHodgeBundleTheorems where
  p1 := (_root_.UpperTheory.LiteratureTheorems.toroidal_compactification_of_literature O)
  p2 := (_root_.UpperTheory.LiteratureTheorems.vol_ge_of_literature O)
  p3 := (_root_.UpperTheory.LiteratureTheorems.vol_nef_of_literature O)
  p4 := (_root_.UpperTheory.LiteratureTheorems.ar_calc_of_literature O)
  p5 := (_root_.UpperTheory.LiteratureTheorems.abelian_de_rham_of_literature O)

The local parameter input at the call site — UpperTheory.LiteratureTheorems.local_langlands_gl_recT_exists_of_literature, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.EveryCharacterOfLiteratureOfVWin, lines 313–314. Idea: Apply the local correspondence comparison to the parameter field of O and the named local converse, depth-zero, reciprocity and multisegment ingredients.

theorem UpperTheory.LiteratureTheorems.local_langlands_gl_recT_exists_of_literature (O : _root_.UpperTheory.LiteratureTheorems.OpenLiteratureStatements) : _root_.UpperTheory.Zero.LLC.RecTExists :=
  _root_.UpperTheory.One.M.New.llOf_alt (_root_.UpperTheory.LiteratureTheorems.local_langlands_recT_exists_of_literature O) (_root_.UpperTheory.LiteratureTheorems.local_converse_gl_of_literature O) (_root_.UpperTheory.LiteratureTheorems.depth_zero_induction_of_literature O) (_root_.UpperTheory.LiteratureTheorems.brauer_degree_zero_of_literature O) (_root_.UpperTheory.LiteratureTheorems.chevalley_units_of_literature O) (_root_.UpperTheory.LiteratureTheorems.global_artin_reciprocity_of_literature O) (_root_.UpperTheory.LiteratureTheorems.langlands_exhaustion_gl_of_literature O) (_root_.UpperTheory.LiteratureTheorems.langlands_multisegments_of_literature O) (_root_.UpperTheory.LiteratureTheorems.standard_cosocle_gl_of_literature O) (_root_.UpperTheory.LiteratureTheorems.zelevinsky_polynomial_ring_of_literature O) (_root_.UpperTheory.LiteratureTheorems.geometric_restriction_of_literature O) (_root_.UpperTheory.LiteratureTheorems.bernstein_zelevinsky_finiteness_of_literature O)

Read the parameter field — UpperTheory.LiteratureTheorems.local_langlands_recT_exists_of_literature, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.EveryCharacterOfLiteratureOfVWin, lines 283–284. Idea: Project the localLanglandsExists field of O.

theorem UpperTheory.LiteratureTheorems.local_langlands_recT_exists_of_literature (O : _root_.UpperTheory.LiteratureTheorems.OpenLiteratureStatements) : _root_.UpperTheory.Zero.LLC.RecTExists :=
  O.localLanglandsExists

Regular characters yield the Green input — GlobalTheory.GreenBridge.green_of_regular, Development.AbelianVarietyTheory.Proofs.InertiaEigenvalues.SumRangeEqRoots, lines 225–233. Idea: Use Frobenius conjugacy of regular labels to associate finite general-linear-group characters to irreducible polynomial labels.

theorem green_of_regular (hG : GlobalTheory.Published.GreenRegularCharacters) : GlobalTheory.GLq.Green := by
  intro g hg L d hd
  obtain ⟨τG, h1, h2, h3⟩ := hG g d hd (KK g d) (GaloisField.finrank g hd.ne')
  have hreg : ∀ P, IsPrimeLab d P → GlobalTheory.Published.IsRegularChar g d (th L hd (rootOf P)) := fun P hP => by
    have hx := rootOf_spec hP
    refine (regular_iff L hd (root_unit hP hx)).2 fun i j hi hj e => ?_
    exact pow_inj hP.2.1 hx (hP.2.2.2 ▸ hi) (hP.2.2.2 ▸ hj) e
  refine ⟨fun P => τG (th L hd (rootOf P)), fun P hP => ?_, fun P P' hP hP' e => ?_, fun χ hχ => ?_⟩
  · obtain ⟨hc, hdeg, hval⟩ := h1 _ (hreg P hP)

Bind the estimates at 2 and 3 — UpperTheory.N.boundAtTwoThree_linked_of_recT, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.At23OfAll, lines 24–26. Idea: Package the local bounds for every eligible family into a linked slot at this common parameter.

theorem boundAtTwoThree_linked_of_recT (hP : Hypotheses₂) {hL : _root_.UpperTheory.Zero.LLC.RecTExists} (p : _root_.GlobalTheory.Mem.Top.Bl.Parameters hL) :
    _root_.GlobalTheory.Fc.RL.LinkedAt p (fun Q L => _root_.GlobalTheory.Fc.R1.SlotNormCondition Q L fun 𝒞 => Closed 𝒞 fun Fm _ => _root_.GlobalTheory.NLink.BoundAtTwoThreeFamilyFonAlt Fm) :=
  _root_.UpperTheory.N.boundAtTwoThree_n_linked (fun Fm => _root_.UpperTheory.N.at23_family_alt hP Fm) p

Match global integrals and local data — UpperTheory.LiteratureTheorems.theta_integrals_agree_and_local_matching_of_literature, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.EveryCharacterOfLiteratureOfVWin, lines 565–566. Idea: Theorem K combines Eisenstein-series and Siegel–Weil inputs to produce both comparison statements.

theorem UpperTheory.LiteratureTheorems.theta_integrals_agree_and_local_matching_of_literature (O : _root_.UpperTheory.LiteratureTheorems.OpenLiteratureStatements) : GlobalTheory.IndefiniteRowSideFullHecke.WeilTensorModels.ThetaIntegralsAgree ∧ GlobalTheory.IndefiniteRowSideFullHecke.WeilTensorModels.LocalMatching :=
  PositivityTheory.ThKR.theoremK_head2 (_root_.UpperTheory.LiteratureTheorems.eis_bl_of_literature O) (_root_.UpperTheory.LiteratureTheorems.siegel_weil_std_of_literature O)

Produce the covolume bound — SelfIntersectionVolumeEstimates.topCovolSlim2_use_alt_alt, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.TopCovolSlim2Use, lines 16–17. Idea: This supplies the covolume comparison used by the seven-input theorem. Its source signature lists the geometric and arithmetic hypotheses.

theorem topCovolSlim2_use_alt_alt : GlobalTheory.CompanionTheory.Hypotheses₂.ResolutionCharZero → GlobalTheory.CompanionTheory.Hypotheses₂.PrincipalisationCharZero → GlobalTheory.CompanionTheory.Hypotheses₂.PoincareLelongInv → PositivityTheory.MbHsUse.HSUse → ReciprocityTheory.ChartRestriction.G.ArakelovGeometry.MoriwakiBigStatement → HT.FarguesExact → GR.ZarhinStatement → Pub.NefRR → GlobalTheory.Published.SiegelToroidalIntegral → GlobalTheory.Published.ToroidalForFanKS → GlobalTheory.Published.SemiAbelianLieSeminegative → GlobalTheory.Published.PointSeparationPair → GlobalTheory.Published.ArDegree → _root_.GlobalTheory.CovTop.PublishedHodgeBundleTheorems → GlobalTheory.Published.GrothendieckDeformation → _root_.GlobalTheory.CovTop.CovolumeBoundOfX :=
  fun h₁ h₂ hPL hU hBig hFar hZar hRR hS hK hN hSep hDeg hP hGD =>

Seven inputs for every character — UpperTheory.Lit.every_character_of_theta_integrals_local_matching, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.SiegelEisensteinSecondTermHypotheses, lines 69–73. Idea: Construct the definite-side package, obtain a Green-character input, and invoke the primitive-to-all-character assembly.

theorem every_character_of_theta_integrals_local_matching (P : _root_.GlobalTheory.Fc.S0.UnitaryGroupThirdPlaceHypotheses) (F : _root_.GlobalTheory.FunPr.ThetaLocalInputs) (hA : GlobalTheory.IndefiniteRowSideFullHecke.WeilTensorModels.ThetaIntegralsAgree)
    (hM : GlobalTheory.IndefiniteRowSideFullHecke.WeilTensorModels.LocalMatching) (hX : _root_.GlobalTheory.CovTop.CovolumeBoundOfX) (hL : _root_.UpperTheory.Zero.LLC.RecTExists) (hV : VWin) :
    UpperTheory.EveryCharacter :=
  _root_.UpperTheory.Top.every_character_of_green_v_win (GlobalTheory.GreenBridge.green_of_regular P.greenRegularCharacters) hV
    (_root_.UpperTheory.Lit.nonempty_hyps_definite_side_of_closed_bound P F hA hM hX hL fun cDep => _root_.UpperTheory.N.boundAtTwoThree_linked_of_recT P.nLink (_root_.GlobalTheory.Mem.Top.Bl.parametersOfDependence hL cDep))

Build a nonempty definite-side package — UpperTheory.Lit.nonempty_hyps_definite_side_of_closed_bound, Development.AutomorphicArithmetic.ThetaCorrespondence.ThetaPairLifts.ThirdPlaceSeries.SiegelEisensteinSecondTermHypotheses, lines 44–68. Idea: Use test vectors, Fourier coefficient grids, linked bundles and a single choice of the maximum of two thresholds.

theorem nonempty_hyps_definite_side_of_closed_bound : _root_.GlobalTheory.Fc.S0.UnitaryGroupThirdPlaceHypotheses → _root_.GlobalTheory.FunPr.ThetaLocalInputs → GlobalTheory.IndefiniteRowSideFullHecke.WeilTensorModels.ThetaIntegralsAgree → GlobalTheory.IndefiniteRowSideFullHecke.WeilTensorModels.LocalMatching → _root_.GlobalTheory.CovTop.CovolumeBoundOfX → ∀ (hL : _root_.UpperTheory.Zero.LLC.RecTExists), (∀ cDep : ℝ, _root_.GlobalTheory.Fc.RL.LinkedAt (_root_.GlobalTheory.Mem.Top.Bl.parametersOfDependence hL cDep) (fun Q L => _root_.GlobalTheory.Fc.R1.SlotNormCondition Q L fun 𝒞 => Formalism.MainNotions.Closed 𝒞 fun Fm _ => _root_.GlobalTheory.NLink.BoundAtTwoThreeFamilyFonAlt Fm)) → Nonempty (_root_.GlobalTheory.Fc.HypsAlt S0.NL _root_.GlobalTheory.Fc.DefiniteSideCondition) := by
  intro P F hA hM hX hL hN
  have C := P.litN
  have hS : GlobalTheory.IndefiniteRowSideFullHecke.LevelPlusSubgroup.FunctionalsSeparate :=
    _root_.UpperTheory.Lit.functionalsSeparate_of_howeUnram_of_siegelWeil F GlobalTheory.Hk3.howeUnram_holds P.siegelWeilUnitaryConvergent
  have hRat : S0.RowRat := GlobalTheory.Mem.LiteralAutomorphy.rowRatW_of_rowTest (_root_.GlobalTheory.T.test_vector_assembly_holds F.siegelSetUnitary F.howeDualityReal
    P.greenCuspidal F C.join C.fe hA hM hS)
  have hFit : _root_.GlobalTheory.BigTop.Fun.ConstantFunctionFits @GlobalTheory.BigTop.Fun.Fld := _root_.GlobalTheory.BigTop.Fun.Close.fourier_coefficient_fit_of_join_alt F C.join C.fe hA hM hS (_root_.GlobalTheory.Fc.S0.ontoX_and_lamLow_of_unitaryGroupHypotheses' P).2
  obtain ⟨CF1, hCF1⟩ := _root_.GlobalTheory.Mem.LiteralAutomorphy.evaluation_grid_of_join F.howeDualityReal hM F C.join C.fe hA
    (_root_.GlobalTheory.WeilConv.twisted_weil_representation_convergence F.siegelSetUnitary F) (_root_.GlobalTheory.T.twisted_local_factors_match F.howeDualityReal F hA hM)
    (_root_.GlobalTheory.T.twisted_square_theta_integrals_eq F hA hM) hS
  obtain ⟨CF0, hCF0⟩ := _root_.GlobalTheory.Fc.StageOne.rowFun_at_gridA_alt P.discreteSeriesCover P.harishChandraModules P.cuspRapidDecay P.casselmanWallach
    P.rayClassFieldSt hFit
  have hEv : EvLgG (GridA (max CF0 CF1)) := hCF1 _ (le_max_right _ _)
  have hOpen1 : _root_.GlobalTheory.Fc.S0.OpenParameterStatements (_root_.GlobalTheory.Mem.Top.Bl.parametersOfDependence hL (max CF0 CF1)) := _root_.GlobalTheory.T.open0_of_unitary_group_hypotheses P hL (max CF0 CF1)
  have hMono := _root_.GlobalTheory.Glob.open_and_linked_of_stronger_extension_alt hL (_root_.GlobalTheory.HeightCounting.Up.extensionWithList hL (max CF0 CF1))
    (_root_.GlobalTheory.Mem.LiteralAutomorphy.extensionWithAtProperty hL (_root_.GlobalTheory.HeightCounting.Up.extensionWithOrigin hL (max CF0 CF1)) (GridA (max CF0 CF1))) SExt.none (geoCl anyGeometry)
    (fun _ _ _ _ _ _ _ _ _ _ _ _ _ x => ⟨x.1.1⟩)
  have hOpenA := hMono.2 hOpen1
  have hFun := hCF0 (max CF0 CF1) (le_max_left _ _) hL (_root_.GlobalTheory.HeightCounting.Up.extensionWithOrigin hL (max CF0 CF1)) SExt.none (geoCl anyGeometry)
    (fun _ _ _ _ _ _ _ _ _ _ _ _ _ x => ⟨x.1⟩) hOpenA
  have hL3 := _root_.GlobalTheory.Glob.CovolRow.linked_bundles_l3_of_open_alt P.discreteSeriesCover P.harishChandraModules P.cuspRapidDecay
    P.casselmanWallach P.rayClassFieldSt hX hL (_root_.GlobalTheory.Mem.LiteralAutomorphy.extensionWithAtProperty hL (_root_.GlobalTheory.HeightCounting.Up.extensionWithOrigin hL (max CF0 CF1)) (GridA (max CF0 CF1)))
    SExt.none (geoCl anyGeometry) (fun _ _ _ _ _ _ _ _ _ _ _ _ _ x => ⟨x.1.1.1⟩) hOpenA
  exact _root_.GlobalTheory.Fc.S0.StageU.hypotheses_nonempty_of_unramified_exponents_alt P hRat hL (max CF0 CF1) (GridA (max CF0 CF1)) hEv (hN (max CF0 CF1)) hFun hL3