Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.
Python
refactor(New/UpperBound/Divisibility/MarkOperator): extract degree bound helper
Rohan Aruncf49d2ae7ff3
diff --git a/src/New/UpperBound/Divisibility/MarkOperator.lean b/src/New/UpperBound/Divisibility/MarkOperator.leanindex b48c5310168..66249e02d14 100644--- a/src/New/UpperBound/Divisibility/MarkOperator.lean+++ b/src/New/UpperBound/Divisibility/MarkOperator.lean@@ -55,6 +55,24 @@ namespace New.Dataopen Finset ZMod Nat Columns Parameters RingHom Module Real IsLocalization AtPrime NumberField+/-- Bound `(D.x₁ ^ T.frobExp) ^ (3 * D.ceilLogLifts T.p)` by `√D.b` when `T.p < D.x₁`,+`0 < T.frobExp ≤ D.ceilLogLifts T.p`, and `T.p` is prime. -/+private lemma pow_frobExp_mul_ceilLogLifts_le_sqrt_b {P : Parameters} (D : Data P)+ {N : ℕ} {W O : Type} [CommRing W] [IsLocalRing W] [CommRing O]+ (T : FrobeniusCycle N W O) (hp : T.p < D.x₁) (hfrobExp_pos : 0 < T.frobExp)+ (hfrobExp_le : T.frobExp ≤ D.ceilLogLifts T.p) :+ (D.x₁ ^ T.frobExp) ^ (3 * D.ceilLogLifts T.p) ≤ √D.b := by+ have : Fact T.p.Prime := ⟨T.prime⟩+ have h_logX₁ : 0 < D.logX₁ := HasLogBound.pos D+ have h_exp : T.frobExp * (3 * D.ceilLogLifts T.p) ≤ 3 * l₀ D.towerExp ^ 2 := by+ grw [hfrobExp_le, (ceilLogLifts_le_l₀ : D.ceilLogLifts T.p ≤ l₀ D.towerExp), sq,+ mul_left_comm]+ calc (D.x₁ ^ T.frobExp) ^ (3 * D.ceilLogLifts T.p) = D.x₁ ^+ (T.frobExp * (3 * D.ceilLogLifts T.p)) :=+ (pow_mul _ _ _).symm+ _ ≤ D.x₁ ^ (3 * l₀ D.towerExp ^ 2) := pow_le_pow_right₀ (one_le_exp h_logX₁.le) h_exp+ _ ≤ √D.b := D.x₁_pow_le_sqrt_b+/-- Let `T` be a Frobenius cycle with `N` letters: a cycle of `N` ring maps from a local ring `W`,each congruent modulo the prime `p = T.p` to the `P`-th power of the one before, with`P = p ^ T.frobExp`; put `q = P ^ N`, the size of the residue field. Let `13 ≤ p < D.x₁`, let@@ -93,20 +111,13 @@ theorem isLargeDegree_of_le_card {P : Parameters} (D : Data P) {N : ℕ} {W O :D.hasLogUpper_of_le hfrobExp_lehave hN_upper : D.HasLogUpper N (11 * D.logX + (Real.log D.logB / 5 + P.constantBound)) :=D.hasLogUpper_of_le hN_le- have h_logX₁ : 0 < D.logX₁ := HasLogBound.pos Dhave h_log : Real.log T.q ≤ T.frobExp * N * D.logX₁ := byrw [hq, Nat.cast_pow, Real.log_pow, Nat.cast_mul]gcongr+ have h_logX₁ : 0 < D.logX₁ := HasLogBound.pos Dexact (log_le_iff_le_exp (by positivity)).2 hp.le- have h_pow : (D.x₁ ^ T.frobExp) ^ (3 * D.ceilLogLifts T.p) ≤ √D.b := by- have h_exp : T.frobExp * (3 * D.ceilLogLifts T.p) ≤ 3 * l₀ D.towerExp ^ 2 := by- grw [hfrobExp_le, (ceilLogLifts_le_l₀ : D.ceilLogLifts T.p ≤ l₀ D.towerExp), sq,- mul_left_comm]- calc (D.x₁ ^ T.frobExp) ^ (3 * D.ceilLogLifts T.p) = D.x₁ ^- (T.frobExp * (3 * D.ceilLogLifts T.p)) :=- (pow_mul _ _ _).symm- _ ≤ D.x₁ ^ (3 * l₀ D.towerExp ^ 2) := pow_le_pow_right₀ (one_le_exp h_logX₁.le) h_exp- _ ≤ √D.b := D.x₁_pow_le_sqrt_b+ have h_pow : (D.x₁ ^ T.frobExp) ^ (3 * D.ceilLogLifts T.p) ≤ √D.b :=+ D.pow_frobExp_mul_ceilLogLifts_le_sqrt_b T hp hfrobExp_pos hfrobExp_lecalc ((N : ℝ) * D.k * Real.log T.q / (1 / (D.m ^ 2 * D.f))) ^ 5 *(T.P : ℝ) ^ (3 * D.ceilLogLifts T.p)≤ ((N : ℝ) * D.k * (T.frobExp * N * D.logX₁) / (1 / (D.m ^ 2 * D.f))) ^ 5 * √D.b := by