From d52dc1b66d2f859d5b7a0326dcb7c6e1775868a6 Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Thu, 1 Oct 2026 11:21:35 +0000 Subject: [PATCH 1/2] =?UTF-8?q?Import=20Sendov's=20conjecture=20and=20the?= =?UTF-8?q?=20Phelps=E2=80=93Rodriguez=20conjecture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port of teorth/sendov at 1ddea92d89f951a0a7cbbffa6c267cf7e6640b1d (Apache-2.0, Lean source written by Claude Opus 5 under Terence Tao's direction) to Lean v4.35.0-rc3 and the module system: 69 upstream modules in the closure of Sendov.Conjecture plus a new kernel-checked Bernstein-certificate module. The 31 batch certificates and the large-degree endgame are checked by `decide +kernel` through list-polynomial identities instead of `ring` under raised heartbeat budgets; numerals beyond 90 digits are chunked; the Alpha17 bound uses explicit product hints. No set_option remains, and the clean project build drops from 1948 s to 226 s of CPU time. Co-Authored-By: Claude Fable 5.1 --- LeanPool.lean | 71 ++ LeanPool/Sendov.lean | 37 + LeanPool/Sendov/Analytic/Defect.lean | 127 +++ LeanPool/Sendov/Analytic/Jsum.lean | 256 ++++++ LeanPool/Sendov/Analytic/LowDegree.lean | 224 +++++ LeanPool/Sendov/Analytic/Maclaurin.lean | 229 +++++ LeanPool/Sendov/Analytic/Origin.lean | 458 ++++++++++ LeanPool/Sendov/Analytic/OriginExact.lean | 260 ++++++ LeanPool/Sendov/Analytic/Polar.lean | 293 +++++++ LeanPool/Sendov/Boundary.lean | 340 ++++++++ LeanPool/Sendov/Common/Basic.lean | 135 +++ LeanPool/Sendov/Common/Chord.lean | 295 +++++++ LeanPool/Sendov/Common/Quadratic.lean | 95 +++ LeanPool/Sendov/Common/Rpow.lean | 66 ++ LeanPool/Sendov/Common/Sinh.lean | 315 +++++++ LeanPool/Sendov/Conjecture.lean | 173 ++++ LeanPool/Sendov/Counterexample/Factor.lean | 137 +++ .../Sendov/Counterexample/Identities.lean | 447 ++++++++++ LeanPool/Sendov/Defs.lean | 120 +++ LeanPool/Sendov/FiniteRange/Batch.lean | 196 +++++ LeanPool/Sendov/FiniteRange/Certificate.lean | 229 +++++ LeanPool/Sendov/FiniteRange/Cover.lean | 184 ++++ LeanPool/Sendov/FiniteRange/Degree10To11.lean | 122 +++ LeanPool/Sendov/FiniteRange/Degree12To13.lean | 127 +++ LeanPool/Sendov/FiniteRange/Degree14To15.lean | 132 +++ LeanPool/Sendov/FiniteRange/Degree16To18.lean | 137 +++ LeanPool/Sendov/FiniteRange/Degree18To20.lean | 143 ++++ LeanPool/Sendov/FiniteRange/Degree20To22.lean | 149 ++++ LeanPool/Sendov/FiniteRange/Degree22To24.lean | 155 ++++ LeanPool/Sendov/FiniteRange/Degree24To26.lean | 162 ++++ LeanPool/Sendov/FiniteRange/Degree26To27.lean | 169 ++++ LeanPool/Sendov/FiniteRange/Degree28To29.lean | 176 ++++ LeanPool/Sendov/FiniteRange/Degree30To31.lean | 183 ++++ LeanPool/Sendov/FiniteRange/Degree32To33.lean | 192 +++++ LeanPool/Sendov/FiniteRange/Degree34To35.lean | 199 +++++ LeanPool/Sendov/FiniteRange/Degree36To37.lean | 207 +++++ LeanPool/Sendov/FiniteRange/Degree38To39.lean | 216 +++++ LeanPool/Sendov/FiniteRange/Degree40To41.lean | 225 +++++ LeanPool/Sendov/FiniteRange/Degree42To43.lean | 262 ++++++ LeanPool/Sendov/FiniteRange/Degree44To45.lean | 306 +++++++ LeanPool/Sendov/FiniteRange/Degree46To47.lean | 327 ++++++++ LeanPool/Sendov/FiniteRange/Degree48To49.lean | 351 ++++++++ LeanPool/Sendov/FiniteRange/Degree5.lean | 119 +++ LeanPool/Sendov/FiniteRange/Degree50To51.lean | 370 +++++++++ LeanPool/Sendov/FiniteRange/Degree52To53.lean | 386 +++++++++ LeanPool/Sendov/FiniteRange/Degree54To55.lean | 406 +++++++++ LeanPool/Sendov/FiniteRange/Degree56To58.lean | 420 ++++++++++ LeanPool/Sendov/FiniteRange/Degree58To60.lean | 435 ++++++++++ LeanPool/Sendov/FiniteRange/Degree60To63.lean | 488 +++++++++++ LeanPool/Sendov/FiniteRange/Degree64To69.lean | 542 ++++++++++++ LeanPool/Sendov/FiniteRange/Degree6To6.lean | 111 +++ LeanPool/Sendov/FiniteRange/Degree7.lean | 116 +++ LeanPool/Sendov/FiniteRange/Degree70To79.lean | 615 ++++++++++++++ .../Sendov/FiniteRange/Degree80To100.lean | 785 ++++++++++++++++++ LeanPool/Sendov/FiniteRange/Degree8To9.lean | 115 +++ LeanPool/Sendov/FiniteRange/Moments.lean | 135 +++ LeanPool/Sendov/FiniteRange/OddBound.lean | 77 ++ LeanPool/Sendov/FiniteRange/Pack.lean | 245 ++++++ LeanPool/Sendov/FiniteRange/PackBridge.lean | 643 ++++++++++++++ LeanPool/Sendov/FiniteRange/Recurrence.lean | 266 ++++++ LeanPool/Sendov/Interior.lean | 175 ++++ LeanPool/Sendov/LargeDegree/Endgame.lean | 203 +++++ LeanPool/Sendov/LargeDegree/Monotone.lean | 365 ++++++++ LeanPool/Sendov/LargeDegree/Tail.lean | 98 +++ LeanPool/Sendov/Main.lean | 57 ++ LeanPool/Sendov/Reduction/Alpha17.lean | 285 +++++++ LeanPool/Sendov/Reduction/BetaBound.lean | 159 ++++ LeanPool/Sendov/Reduction/Main.lean | 93 +++ LeanPool/Sendov/Reduction/Polar.lean | 92 ++ LeanPool/Sendov/Reduction/Setup.lean | 81 ++ LeanPool/Sendov/Reduction/Simplified.lean | 271 ++++++ LeanPool/Sendov/Reduction/Stat.lean | 141 ++++ LeanPool/projects.yml | 119 +++ 73 files changed, 17040 insertions(+) create mode 100644 LeanPool/Sendov.lean create mode 100644 LeanPool/Sendov/Analytic/Defect.lean create mode 100644 LeanPool/Sendov/Analytic/Jsum.lean create mode 100644 LeanPool/Sendov/Analytic/LowDegree.lean create mode 100644 LeanPool/Sendov/Analytic/Maclaurin.lean create mode 100644 LeanPool/Sendov/Analytic/Origin.lean create mode 100644 LeanPool/Sendov/Analytic/OriginExact.lean create mode 100644 LeanPool/Sendov/Analytic/Polar.lean create mode 100644 LeanPool/Sendov/Boundary.lean create mode 100644 LeanPool/Sendov/Common/Basic.lean create mode 100644 LeanPool/Sendov/Common/Chord.lean create mode 100644 LeanPool/Sendov/Common/Quadratic.lean create mode 100644 LeanPool/Sendov/Common/Rpow.lean create mode 100644 LeanPool/Sendov/Common/Sinh.lean create mode 100644 LeanPool/Sendov/Conjecture.lean create mode 100644 LeanPool/Sendov/Counterexample/Factor.lean create mode 100644 LeanPool/Sendov/Counterexample/Identities.lean create mode 100644 LeanPool/Sendov/Defs.lean create mode 100644 LeanPool/Sendov/FiniteRange/Batch.lean create mode 100644 LeanPool/Sendov/FiniteRange/Certificate.lean create mode 100644 LeanPool/Sendov/FiniteRange/Cover.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree10To11.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree12To13.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree14To15.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree16To18.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree18To20.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree20To22.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree22To24.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree24To26.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree26To27.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree28To29.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree30To31.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree32To33.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree34To35.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree36To37.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree38To39.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree40To41.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree42To43.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree44To45.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree46To47.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree48To49.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree5.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree50To51.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree52To53.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree54To55.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree56To58.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree58To60.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree60To63.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree64To69.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree6To6.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree7.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree70To79.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree80To100.lean create mode 100644 LeanPool/Sendov/FiniteRange/Degree8To9.lean create mode 100644 LeanPool/Sendov/FiniteRange/Moments.lean create mode 100644 LeanPool/Sendov/FiniteRange/OddBound.lean create mode 100644 LeanPool/Sendov/FiniteRange/Pack.lean create mode 100644 LeanPool/Sendov/FiniteRange/PackBridge.lean create mode 100644 LeanPool/Sendov/FiniteRange/Recurrence.lean create mode 100644 LeanPool/Sendov/Interior.lean create mode 100644 LeanPool/Sendov/LargeDegree/Endgame.lean create mode 100644 LeanPool/Sendov/LargeDegree/Monotone.lean create mode 100644 LeanPool/Sendov/LargeDegree/Tail.lean create mode 100644 LeanPool/Sendov/Main.lean create mode 100644 LeanPool/Sendov/Reduction/Alpha17.lean create mode 100644 LeanPool/Sendov/Reduction/BetaBound.lean create mode 100644 LeanPool/Sendov/Reduction/Main.lean create mode 100644 LeanPool/Sendov/Reduction/Polar.lean create mode 100644 LeanPool/Sendov/Reduction/Setup.lean create mode 100644 LeanPool/Sendov/Reduction/Simplified.lean create mode 100644 LeanPool/Sendov/Reduction/Stat.lean diff --git a/LeanPool.lean b/LeanPool.lean index 652e3bf16a..e4505a66da 100644 --- a/LeanPool.lean +++ b/LeanPool.lean @@ -9096,6 +9096,77 @@ public import LeanPool.SemicircleCheck.RotationArithmetic public import LeanPool.SemicircleCheck.ShiftTwoEquiv public import LeanPool.SemicircleLaw public import LeanPool.SemicircleLaw.SemicircleDistribution +public import LeanPool.Sendov +public import LeanPool.Sendov.Analytic.Defect +public import LeanPool.Sendov.Analytic.Jsum +public import LeanPool.Sendov.Analytic.LowDegree +public import LeanPool.Sendov.Analytic.Maclaurin +public import LeanPool.Sendov.Analytic.Origin +public import LeanPool.Sendov.Analytic.OriginExact +public import LeanPool.Sendov.Analytic.Polar +public import LeanPool.Sendov.Boundary +public import LeanPool.Sendov.Common.Basic +public import LeanPool.Sendov.Common.Chord +public import LeanPool.Sendov.Common.Quadratic +public import LeanPool.Sendov.Common.Rpow +public import LeanPool.Sendov.Common.Sinh +public import LeanPool.Sendov.Conjecture +public import LeanPool.Sendov.Counterexample.Factor +public import LeanPool.Sendov.Counterexample.Identities +public import LeanPool.Sendov.Defs +public import LeanPool.Sendov.FiniteRange.Batch +public import LeanPool.Sendov.FiniteRange.Certificate +public import LeanPool.Sendov.FiniteRange.Cover +public import LeanPool.Sendov.FiniteRange.Degree10To11 +public import LeanPool.Sendov.FiniteRange.Degree12To13 +public import LeanPool.Sendov.FiniteRange.Degree14To15 +public import LeanPool.Sendov.FiniteRange.Degree16To18 +public import LeanPool.Sendov.FiniteRange.Degree18To20 +public import LeanPool.Sendov.FiniteRange.Degree20To22 +public import LeanPool.Sendov.FiniteRange.Degree22To24 +public import LeanPool.Sendov.FiniteRange.Degree24To26 +public import LeanPool.Sendov.FiniteRange.Degree26To27 +public import LeanPool.Sendov.FiniteRange.Degree28To29 +public import LeanPool.Sendov.FiniteRange.Degree30To31 +public import LeanPool.Sendov.FiniteRange.Degree32To33 +public import LeanPool.Sendov.FiniteRange.Degree34To35 +public import LeanPool.Sendov.FiniteRange.Degree36To37 +public import LeanPool.Sendov.FiniteRange.Degree38To39 +public import LeanPool.Sendov.FiniteRange.Degree40To41 +public import LeanPool.Sendov.FiniteRange.Degree42To43 +public import LeanPool.Sendov.FiniteRange.Degree44To45 +public import LeanPool.Sendov.FiniteRange.Degree46To47 +public import LeanPool.Sendov.FiniteRange.Degree48To49 +public import LeanPool.Sendov.FiniteRange.Degree5 +public import LeanPool.Sendov.FiniteRange.Degree50To51 +public import LeanPool.Sendov.FiniteRange.Degree52To53 +public import LeanPool.Sendov.FiniteRange.Degree54To55 +public import LeanPool.Sendov.FiniteRange.Degree56To58 +public import LeanPool.Sendov.FiniteRange.Degree58To60 +public import LeanPool.Sendov.FiniteRange.Degree60To63 +public import LeanPool.Sendov.FiniteRange.Degree64To69 +public import LeanPool.Sendov.FiniteRange.Degree6To6 +public import LeanPool.Sendov.FiniteRange.Degree7 +public import LeanPool.Sendov.FiniteRange.Degree70To79 +public import LeanPool.Sendov.FiniteRange.Degree80To100 +public import LeanPool.Sendov.FiniteRange.Degree8To9 +public import LeanPool.Sendov.FiniteRange.Moments +public import LeanPool.Sendov.FiniteRange.OddBound +public import LeanPool.Sendov.FiniteRange.Pack +public import LeanPool.Sendov.FiniteRange.PackBridge +public import LeanPool.Sendov.FiniteRange.Recurrence +public import LeanPool.Sendov.Interior +public import LeanPool.Sendov.LargeDegree.Endgame +public import LeanPool.Sendov.LargeDegree.Monotone +public import LeanPool.Sendov.LargeDegree.Tail +public import LeanPool.Sendov.Main +public import LeanPool.Sendov.Reduction.Alpha17 +public import LeanPool.Sendov.Reduction.BetaBound +public import LeanPool.Sendov.Reduction.Main +public import LeanPool.Sendov.Reduction.Polar +public import LeanPool.Sendov.Reduction.Setup +public import LeanPool.Sendov.Reduction.Simplified +public import LeanPool.Sendov.Reduction.Stat public import LeanPool.Sensitivity public import LeanPool.Sensitivity.Basic public import LeanPool.Sensitivity.Consequences diff --git a/LeanPool/Sendov.lean b/LeanPool/Sendov.lean new file mode 100644 index 0000000000..b08132c8a0 --- /dev/null +++ b/LeanPool/Sendov.lean @@ -0,0 +1,37 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Conjecture + +/-! +# Sendov's conjecture and the Phelps–Rodriguez conjecture + +Source: url:https://github.com/teorth/sendov/tree/1ddea92d89f951a0a7cbbffa6c267cf7e6640b1d +Authors: Terence Tao +Status: verified +Main declarations: `Sendov.sendov`, `Sendov.phelps_rodriguez` +Tags: sendov-conjecture, polynomial-zeros, critical-points, bernstein-certificates +MSC: 30C15, 30C10, 12D10 +-/ + +/-! +# Sendov's conjecture in Lean Pool + +Adapted from Terence Tao's Apache-2.0-licensed repository `teorth/sendov` at commit +`1ddea92d89f951a0a7cbbffa6c267cf7e6640b1d`, a Lean formalization of Sendov's conjecture and +the Phelps–Rodriguez conjecture following Tao's digestion of Lech Mazur's proof. The Lean +source was written by Claude Opus 5 under Tao's direction and review. + +Modifications for Lean Pool: Lean/Mathlib v4.35.0-rc3 port and module-system migration; +the numerical certificates of `Sendov.FiniteRange` and `Sendov.LargeDegree.Endgame` are +now checked by the kernel through the list-polynomial infrastructure of +`Sendov.FiniteRange.Certificate` instead of `ring` identities under raised heartbeat +budgets, long numerals are assembled from decimal chunks, and the remaining nonlinear +arithmetic in `Sendov.Reduction.Alpha17` is closed from explicit product hints. Seven +upstream modules outside the dependency closure of the main theorems (six development +cross-checks and one unused reduction-lemma file) were not imported. +-/ diff --git a/LeanPool/Sendov/Analytic/Defect.lean b/LeanPool/Sendov/Analytic/Defect.lean new file mode 100644 index 0000000000..000f23fb2d --- /dev/null +++ b/LeanPool/Sendov/Analytic/Defect.lean @@ -0,0 +1,127 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Linarith + +/-! +# The defect lemma + +For points `w₁, …, w_N` in the closed unit disk, + + `(∏ ‖wⱼ‖) · ∑ⱼ ‖wⱼ⁻¹ - conj wⱼ‖ ≤ 1 - (∏ ‖wⱼ‖)²`. + +The origin argument uses this to replace the inversion identities `1/zⱼ = conj zⱼ`, which hold +only when the points lie *on* the unit circle, by inequalities valid throughout the disk, at a +cost proportional to `1 - |J|²` where `J` is the product. + +The blog post proves it by writing `‖wⱼ‖ = e^{-aⱼ}`, computing `‖wⱼ⁻¹ - conj wⱼ‖ = 2 sinh aⱼ`, +and reducing to superadditivity of `sinh`. None of that is needed. Splitting off one point, + + `D (w ::ₘ t) = P · (r · δ_w) + r · D t`, `r = ‖w‖`, `P = ∏ over t`, + +the pointwise fact `r · δ_w ≤ 1 - r²` and the inductive hypothesis `D t ≤ 1 - P²` leave + + `1 - r²P² - [P(1-r²) + r(1-P²)] = (1-r)(1-P)(1-rP) ≥ 0`, + +which is immediate for `r, P ∈ [0,1]`. + +Points *at* the origin need no separate treatment. There `wⱼ⁻¹` is Lean's junk value `0`, but +the pointwise fact is still true — as an inequality rather than an equality — because the +left-hand side carries a factor `‖wⱼ‖`. A limiting argument, which the informal proof needs, +is therefore avoided. + +## Main statements + +* `Sendov.norm_mul_norm_inv_sub_conj_le`: the pointwise fact; +* `Sendov.defect`: the lemma. +-/ + +@[expose] public section + +namespace Sendov + +open Multiset + +/-! ### Products of norms -/ + +lemma prod_norm_nonneg (s : Multiset ℂ) : 0 ≤ (s.map (fun z => ‖z‖)).prod := by + refine Multiset.prod_nonneg ?_ + intro y hy + obtain ⟨z, _, rfl⟩ := Multiset.mem_map.1 hy + exact norm_nonneg z + +lemma prod_norm_le_one : ∀ (s : Multiset ℂ), (∀ z ∈ s, ‖z‖ ≤ 1) → + (s.map (fun z => ‖z‖)).prod ≤ 1 := by + intro s + induction s using Multiset.induction_on with + | empty => intro _; simp + | cons w t ih => + intro hs + have hw : ‖w‖ ≤ 1 := hs w (mem_cons_self w t) + have ht : ∀ z ∈ t, ‖z‖ ≤ 1 := fun z hz => hs z (mem_cons_of_mem hz) + have hIH := ih ht + have hP0 : 0 ≤ (t.map (fun z => ‖z‖)).prod := prod_norm_nonneg t + simp only [Multiset.map_cons, Multiset.prod_cons] + nlinarith [norm_nonneg w] + +/-! ### The pointwise fact -/ + +/-- `‖w‖ · ‖w⁻¹ - conj w‖ ≤ 1 - ‖w‖²` for `‖w‖ ≤ 1`, with equality unless `w = 0`. The +factor `‖w‖` on the left is what makes the origin harmless. -/ +lemma norm_mul_norm_inv_sub_conj_le {w : ℂ} (hw : ‖w‖ ≤ 1) : + ‖w‖ * ‖w⁻¹ - (starRingEnd ℂ) w‖ ≤ 1 - ‖w‖ ^ 2 := by + rcases eq_or_ne w 0 with rfl | hne + · simp + · have hkey : w * (w⁻¹ - (starRingEnd ℂ) w) = 1 - ((‖w‖ : ℝ) : ℂ) ^ 2 := by + rw [mul_sub, mul_inv_cancel₀ hne, Complex.mul_conj] + norm_cast + rw [Complex.normSq_eq_norm_sq] + have h1 : ‖w‖ * ‖w⁻¹ - (starRingEnd ℂ) w‖ = ‖(1 : ℂ) - ((‖w‖ : ℝ) : ℂ) ^ 2‖ := by + rw [← norm_mul, hkey] + rw [h1] + have h2 : ((1 : ℂ) - ((‖w‖ : ℝ) : ℂ) ^ 2) = ((1 - ‖w‖ ^ 2 : ℝ) : ℂ) := by + push_cast + ring + rw [h2, Complex.norm_real, Real.norm_eq_abs, + abs_of_nonneg (by nlinarith [norm_nonneg w])] + +/-! ### The lemma -/ + +/-- **The defect lemma.** -/ +theorem defect : ∀ (s : Multiset ℂ), (∀ z ∈ s, ‖z‖ ≤ 1) → + (s.map (fun z => ‖z‖)).prod * (s.map (fun z => ‖z⁻¹ - (starRingEnd ℂ) z‖)).sum + ≤ 1 - ((s.map (fun z => ‖z‖)).prod) ^ 2 := by + intro s + induction s using Multiset.induction_on with + | empty => intro _; simp + | cons w t ih => + intro hs + have hw : ‖w‖ ≤ 1 := hs w (mem_cons_self w t) + have ht : ∀ z ∈ t, ‖z‖ ≤ 1 := fun z hz => hs z (mem_cons_of_mem hz) + have hIH := ih ht + have hP0 : 0 ≤ (t.map (fun z => ‖z‖)).prod := prod_norm_nonneg t + have hP1 : (t.map (fun z => ‖z‖)).prod ≤ 1 := prod_norm_le_one t ht + have hT0 : 0 ≤ (t.map (fun z => ‖z⁻¹ - (starRingEnd ℂ) z‖)).sum := by + refine Multiset.sum_nonneg ?_ + intro y hy + obtain ⟨z, _, rfl⟩ := Multiset.mem_map.1 hy + exact norm_nonneg _ + have hr0 : 0 ≤ ‖w‖ := norm_nonneg w + have hpt := norm_mul_norm_inv_sub_conj_le hw + simp only [Multiset.map_cons, Multiset.prod_cons, Multiset.sum_cons] + -- `r P (δ + T) = P (r δ) + r (P T) ≤ P(1-r²) + r(1-P²) ≤ 1 - r²P²` + have hstep1 := mul_le_mul_of_nonneg_left hpt hP0 + have hstep2 := mul_le_mul_of_nonneg_left hIH hr0 + have hfac : 0 ≤ (1 - ‖w‖) * (1 - (t.map (fun z => ‖z‖)).prod) + * (1 - ‖w‖ * (t.map (fun z => ‖z‖)).prod) := by + have h3 : ‖w‖ * (t.map (fun z => ‖z‖)).prod ≤ 1 := by nlinarith + exact mul_nonneg (mul_nonneg (by linarith) (by linarith)) (by linarith) + nlinarith [hstep1, hstep2, hfac] + +end Sendov diff --git a/LeanPool/Sendov/Analytic/Jsum.lean b/LeanPool/Sendov/Analytic/Jsum.lean new file mode 100644 index 0000000000..991df0c734 --- /dev/null +++ b/LeanPool/Sendov/Analytic/Jsum.lean @@ -0,0 +1,256 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Counterexample.Identities +public import LeanPool.Sendov.Analytic.Defect +public import LeanPool.Sendov.Analytic.Polar + +/-! +# Estimating `J ∑ⱼ 1/zⱼ` + +The origin argument needs `∑ⱼ 1/zⱼ`, which the centroid identity supplies only after the +inversions `1/zⱼ = conj zⱼ` and `1/qⱼ = conj qⱼ` are used. Those hold exactly when the points +lie on the unit circle, i.e. when `|J| = 1`, and the **defect lemma** measures the failure by +`1 - |J|²`. Conjugating the centroid identity and paying that defect gives + + `J ∑ⱼ 1/zⱼ = a (n-1) J - n J (x+iy) + O_≤( (n/(n-1)) (1 - |J|²) )`, + +which is `Sendov.Jsum_estimate` below. A single application of the defect lemma, to the +`2(n-1)` points `z₁,…,z_{n-1}, conj q₁,…,conj q_{n-1}`, pays for both substitutions at once. + +Everything is division-free on the `z` side: `J ∑ⱼ 1/zⱼ` is written as `(∏ qⱼ) · sumEraseProd z`, +which is well defined even when some `zⱼ` vanishes. That case is not excluded by hypothesis but +handled: if `∏ zⱼ = 0` then at most one term of `sumEraseProd z` survives, so the left side is at +most `1` while the right side is at least `n/(n-1) > 1`. On the `q` side no such care is needed, +since the `qⱼ` are reciprocals and never vanish. + +## Main statements + +* `Sendov.Jsum_estimate`: the estimate above; +* `Sendov.sumEraseProd_norm_le_one`: the degenerate case `∏ zⱼ = 0`; +* `Sendov.prod_mul_sum_inv`: `(∏ s) ∑ⱼ 1/sⱼ = sumEraseProd s` when no `sⱼ` vanishes. +-/ + +@[expose] public section + +namespace Sendov + +/-! ### Multiset odds and ends -/ + +lemma sum_map_sub (s : Multiset ℂ) (f g : ℂ → ℂ) : + (s.map (fun v => f v - g v)).sum = (s.map f).sum - (s.map g).sum := by + induction s using Multiset.induction_on with + | empty => simp + | cons v t ih => + simp only [Multiset.map_cons, Multiset.sum_cons, ih] + ring + +lemma sum_map_const_sub (s : Multiset ℂ) (c : ℂ) (g : ℂ → ℂ) : + (s.map (fun v => c - g v)).sum = (s.card : ℂ) * c - (s.map g).sum := by + induction s using Multiset.induction_on with + | empty => simp + | cons v t ih => + simp only [Multiset.map_cons, Multiset.sum_cons, Multiset.card_cons, ih] + push_cast + ring + +lemma sum_map_re (s : Multiset ℂ) : (s.map (fun v => v.re)).sum = s.sum.re := by + induction s using Multiset.induction_on with + | empty => simp + | cons v t ih => simp only [Multiset.map_cons, Multiset.sum_cons, Complex.add_re, ih] + +lemma norm_sum_map_le (s : Multiset ℂ) (f : ℂ → ℂ) : + ‖(s.map f).sum‖ ≤ (s.map (fun w => ‖f w‖)).sum := by + induction s using Multiset.induction_on with + | empty => simp + | cons v t ih => + simp only [Multiset.map_cons, Multiset.sum_cons] + linarith [norm_add_le (f v) ((t.map f).sum), ih] + +lemma norm_prod_le_one : ∀ (s : Multiset ℂ), (∀ w ∈ s, ‖w‖ ≤ 1) → ‖s.prod‖ ≤ 1 := by + intro s + induction s using Multiset.induction_on with + | empty => intro _; simp + | cons v t ih => + intro hs + have hv := hs v (Multiset.mem_cons_self v t) + have ht : ∀ u ∈ t, ‖u‖ ≤ 1 := fun u hu => hs u (Multiset.mem_cons_of_mem hu) + rw [Multiset.prod_cons, norm_mul] + nlinarith [ih ht, norm_nonneg v, norm_nonneg t.prod] + +/-- `(∏ s) ∑ⱼ 1/sⱼ = ∑ⱼ ∏_{k≠j} sₖ`, the clearing of denominators that is valid exactly when +no `sⱼ` vanishes. -/ +lemma prod_mul_sum_inv : ∀ (s : Multiset ℂ), (∀ w ∈ s, w ≠ 0) → + s.prod * (s.map (fun w => w⁻¹)).sum = sumEraseProd s := by + intro s + induction s using Multiset.induction_on with + | empty => simp [sumEraseProd] + | cons v t ih => + intro hs + have hv := hs v (Multiset.mem_cons_self v t) + have ht : ∀ u ∈ t, u ≠ 0 := fun u hu => hs u (Multiset.mem_cons_of_mem hu) + rw [Multiset.prod_cons, Multiset.map_cons, Multiset.sum_cons, sumEraseProd_cons, ← ih ht] + field_simp + +/-- The degenerate case. If `∏ sⱼ = 0` then some `sⱼ` vanishes, so at most one term of +`∑ⱼ ∏_{k≠j} sₖ` is nonzero — and that term is a product of points of the closed unit disk. -/ +lemma sumEraseProd_norm_le_one : ∀ (s : Multiset ℂ), (∀ w ∈ s, ‖w‖ ≤ 1) → s.prod = 0 → + ‖sumEraseProd s‖ ≤ 1 := by + intro s + induction s using Multiset.induction_on with + | empty => intro _ h; simp at h + | cons v t ih => + intro hs hp + have hv := hs v (Multiset.mem_cons_self v t) + have ht : ∀ u ∈ t, ‖u‖ ≤ 1 := fun u hu => hs u (Multiset.mem_cons_of_mem hu) + rw [sumEraseProd_cons] + rcases eq_or_ne t.prod 0 with ht0 | ht0 + · rw [ht0, zero_add, norm_mul] + nlinarith [ih ht ht0, norm_nonneg v, norm_nonneg (sumEraseProd t), hv] + · have hv0 : v = 0 := by + rw [Multiset.prod_cons] at hp + rcases mul_eq_zero.1 hp with h | h + · exact h + · exact absurd h ht0 + rw [hv0, zero_mul, add_zero] + exact norm_prod_le_one t ht + +/-! ### The estimate -/ + +/-- **The estimate for `J ∑ⱼ 1/zⱼ`.** Conjugating the centroid identity replaces `1/zⱼ` by +`conj zⱼ` and `qⱼ` by `1/conj qⱼ`; the defect lemma pays for both substitutions at once. -/ +theorem Jsum_estimate {n : ℕ} (hn : 2 ≤ n) {a x y : ℝ} {z q : Multiset ℂ} + (hqcard : q.card = n - 1) + (hz1 : ∀ w ∈ z, ‖w‖ ≤ 1) (hq1 : ∀ v ∈ q, ‖v‖ ≤ 1) + (hcent : ((n : ℂ) - 1) * ((a : ℂ) + z.sum) = (n : ℂ) * (q.map (fun v => (a : ℂ) - v⁻¹)).sum) + (hxy : q.sum = ((n : ℂ) - 1) * ((x : ℂ) + (y : ℂ) * Complex.I)) : + ‖q.prod * sumEraseProd z + - ((a : ℂ) * ((n : ℂ) - 1) - (n : ℂ) * ((x : ℂ) + (y : ℂ) * Complex.I)) + * (q.prod * z.prod)‖ + ≤ ((n : ℝ) / ((n : ℝ) - 1)) * (1 - (‖q.prod‖ * ‖z.prod‖) ^ 2) := by + have hnR : (2 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + have hn1 : (0 : ℝ) < (n : ℝ) - 1 := by linarith + have hratio : (1 : ℝ) ≤ (n : ℝ) / ((n : ℝ) - 1) := by + rw [le_div_iff₀ hn1]; linarith + have hqpnorm : ‖q.prod‖ ≤ 1 := norm_prod_le_one q hq1 + rcases eq_or_ne z.prod 0 with hz0 | hz0 + · -- degenerate: `J = 0`, and `sumEraseProd z` has at most one surviving term + rw [hz0, mul_zero, mul_zero, sub_zero, norm_zero, mul_zero, norm_mul] + have h2 : ‖sumEraseProd z‖ ≤ 1 := sumEraseProd_norm_le_one z hz1 hz0 + nlinarith [norm_nonneg q.prod, norm_nonneg (sumEraseProd z)] + · -- the main case: every `zⱼ` is nonzero, so denominators may be cleared + have hzne : ∀ w ∈ z, w ≠ 0 := by + intro w hw hw0 + exact hz0 (Multiset.prod_eq_zero (hw0 ▸ hw)) + set qc : Multiset ℂ := q.map (fun v => (starRingEnd ℂ) v) with hqc + have hqcnorm : ∀ w ∈ qc, ‖w‖ ≤ 1 := by + intro w hw + rw [hqc] at hw + obtain ⟨v, hv, rfl⟩ := Multiset.mem_map.1 hw + simpa using hq1 v hv + have hqsum : q.sum = (qc.map (fun w => (starRingEnd ℂ) w)).sum := by + rw [hqc, Multiset.map_map] + simp + -- the conjugated centroid identity + have hconj : ((n : ℂ) - 1) * ((a : ℂ) + (z.map (fun w => (starRingEnd ℂ) w)).sum) + = (n : ℂ) * (((n : ℂ) - 1) * (a : ℂ) - (qc.map (fun w => w⁻¹)).sum) := by + have h := congrArg (starRingEnd ℂ) hcent + simp only [map_mul, map_sub, map_add, map_one, map_inv₀, map_natCast, + Complex.conj_ofReal, map_multiset_sum, Multiset.map_map, Function.comp_def] at h + rw [sum_map_const_sub, hqcard] at h + have hcard : ((n - 1 : ℕ) : ℂ) = (n : ℂ) - 1 := by + push_cast [Nat.cast_sub (by omega : (1 : ℕ) ≤ n)] + ring + rw [hcard] at h + rw [hqc, Multiset.map_map] + simp only [Function.comp_def] + exact h + -- `J ∑ⱼ 1/zⱼ` in division-free form + have hSz : q.prod * sumEraseProd z = (q.prod * z.prod) * (z.map (fun w => w⁻¹)).sum := by + rw [← prod_mul_sum_inv z hzne]; ring + -- name the error and the bracket + obtain ⟨E, hEdef⟩ : ∃ w : ℂ, w = q.prod * sumEraseProd z + - ((a : ℂ) * ((n : ℂ) - 1) - (n : ℂ) * ((x : ℂ) + (y : ℂ) * Complex.I)) + * (q.prod * z.prod) := ⟨_, rfl⟩ + obtain ⟨X, hXdef⟩ : ∃ w : ℂ, w = ((n : ℂ) - 1) + * ((z.map (fun w => w⁻¹)).sum - (z.map (fun w => (starRingEnd ℂ) w)).sum) + + (n : ℂ) * (q.sum - (qc.map (fun w => w⁻¹)).sum) := ⟨_, rfl⟩ + rw [← hEdef] + -- the exact rearrangement + have hE : ((n : ℂ) - 1) * E = (q.prod * z.prod) * X := by + rw [hEdef, hXdef, hSz, hxy] + linear_combination (q.prod * z.prod) * hconj + -- the defect lemma, applied to `z` together with the conjugates of `q` + have hdefect := defect (z + qc) (by + intro w hw + rcases Multiset.mem_add.1 hw with h | h + · exact hz1 w h + · exact hqcnorm w h) + rw [Multiset.map_add, Multiset.prod_add, Multiset.map_add, Multiset.sum_add] at hdefect + have hzp : (z.map (fun w => ‖w‖)).prod = ‖z.prod‖ := (norm_multiset_prod z).symm + have hqp : (qc.map (fun w => ‖w‖)).prod = ‖q.prod‖ := by + rw [hqc, Multiset.map_map] + simp only [Function.comp_def, RCLike.norm_conj] + exact (norm_multiset_prod q).symm + rw [hzp, hqp] at hdefect + obtain ⟨Dz, hDz⟩ : ∃ r : ℝ, r = (z.map (fun w => ‖w⁻¹ - (starRingEnd ℂ) w‖)).sum := ⟨_, rfl⟩ + obtain ⟨Dq, hDq⟩ : ∃ r : ℝ, r = (qc.map (fun w => ‖w⁻¹ - (starRingEnd ℂ) w‖)).sum := ⟨_, rfl⟩ + rw [← hDz, ← hDq] at hdefect + have hDz0 : 0 ≤ Dz := by + rw [hDz] + exact Multiset.sum_nonneg (by + intro r hr + obtain ⟨w, _, rfl⟩ := Multiset.mem_map.1 hr + exact norm_nonneg _) + have hDq0 : 0 ≤ Dq := by + rw [hDq] + exact Multiset.sum_nonneg (by + intro r hr + obtain ⟨w, _, rfl⟩ := Multiset.mem_map.1 hr + exact norm_nonneg _) + -- the two substitution errors + have hbz : ‖(z.map (fun w => w⁻¹)).sum - (z.map (fun w => (starRingEnd ℂ) w)).sum‖ ≤ Dz := by + rw [← sum_map_sub, hDz] + exact norm_sum_map_le z _ + have hbq : ‖q.sum - (qc.map (fun w => w⁻¹)).sum‖ ≤ Dq := by + have hneg : q.sum - (qc.map (fun w => w⁻¹)).sum + = -((qc.map (fun w => w⁻¹ - (starRingEnd ℂ) w)).sum) := by + rw [hqsum, sum_map_sub] + ring + rw [hneg, norm_neg, hDq] + exact norm_sum_map_le qc _ + -- assemble + have hnorm : ‖((n : ℂ) - 1)‖ = (n : ℝ) - 1 := by + have hc : ((n : ℂ) - 1) = (((n : ℝ) - 1 : ℝ) : ℂ) := by push_cast; ring + rw [hc, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (le_of_lt hn1)] + have hnn : ‖(n : ℂ)‖ = (n : ℝ) := by simp + have hXle : ‖X‖ ≤ ((n : ℝ) - 1) * Dz + (n : ℝ) * Dq := by + rw [hXdef] + refine (norm_add_le _ _).trans ?_ + rw [norm_mul, norm_mul, hnorm, hnn] + exact add_le_add (mul_le_mul_of_nonneg_left hbz (by linarith)) + (mul_le_mul_of_nonneg_left hbq (by positivity)) + have hkey : ((n : ℝ) - 1) * ‖E‖ = ‖q.prod‖ * ‖z.prod‖ * ‖X‖ := by + have h := congrArg norm hE + rw [norm_mul, norm_mul, norm_mul, hnorm] at h + exact h + have hP0 : (0 : ℝ) ≤ ‖q.prod‖ * ‖z.prod‖ := by positivity + have hstep : ((n : ℝ) - 1) * ‖E‖ ≤ (n : ℝ) * (1 - (‖q.prod‖ * ‖z.prod‖) ^ 2) := by + rw [hkey] + calc ‖q.prod‖ * ‖z.prod‖ * ‖X‖ + ≤ ‖q.prod‖ * ‖z.prod‖ * (((n : ℝ) - 1) * Dz + (n : ℝ) * Dq) := + mul_le_mul_of_nonneg_left hXle hP0 + _ ≤ ‖q.prod‖ * ‖z.prod‖ * ((n : ℝ) * (Dz + Dq)) := by nlinarith [hDz0, hP0] + _ = (n : ℝ) * (‖z.prod‖ * ‖q.prod‖ * (Dz + Dq)) := by ring + _ ≤ (n : ℝ) * (1 - (‖z.prod‖ * ‖q.prod‖) ^ 2) := by + have hnpos : (0 : ℝ) ≤ (n : ℝ) := by linarith + exact mul_le_mul_of_nonneg_left hdefect hnpos + _ = (n : ℝ) * (1 - (‖q.prod‖ * ‖z.prod‖) ^ 2) := by ring + rw [div_mul_eq_mul_div, le_div_iff₀ hn1] + linarith [hstep] + +end Sendov diff --git a/LeanPool/Sendov/Analytic/LowDegree.lean b/LeanPool/Sendov/Analytic/LowDegree.lean new file mode 100644 index 0000000000..5e94a9da3a --- /dev/null +++ b/LeanPool/Sendov/Analytic/LowDegree.lean @@ -0,0 +1,224 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Analytic.Polar + +/-! +# The low-degree branch: degrees `2 ≤ n ≤ 5` + +The high-degree argument relaxes the branch point `(⋆)`, + + `1 ≤ ∫₀¹ ∏ⱼ ‖a + t(1-a²)qⱼ‖ dt`, + +by AM–GM to the raw polar inequality `(1Q)`, and then needs the origin channel as well. In low +degree none of that is necessary: bounding each factor of `(⋆)` by the *scalar* +`X(t) = a + (1-a²)t` already contradicts itself. + +Writing `m = n - 1` for the number of non-distinguished zeroes and `J_m(a) = ∫₀¹ X(t)^m dt`, +the branch point gives `1 ≤ J_m(a)` while a direct computation gives `J_m(a) < 1` for +`0 < a < 1` and `1 ≤ m ≤ 4`. The computation is done once, at `m = 4`: + + `1 - J₄(a) = ((1-a)³(1+a)/5)(a⁴ - 3a³ + 3a + 4)`, + +whose last factor is `2 + 3a + (1-a)(2 + 2a + a²(2-a)) > 0`; the smaller exponents are dominated +by `X^m ≤ 1 - m/4 + (m/4)X⁴`, four instances of weighted AM–GM that factor as squares. + +Note the off-by-one: `m ≤ 4` is degree `n ≤ 5`, so this branch covers degree five as well. All +strictness comes from `a < 1`; at `a = 1` one has `J_m(1) = 1`, matching the regular-polygon +equality examples. + +## Main statements + +* `Sendov.low_degree_contradiction`: `(⋆)` is contradictory for `2 ≤ n ≤ 5`; +* `Sendov.lowJ_lt_one`: `J_m(a) < 1` for `0 < a < 1` and `1 ≤ m ≤ 4`. +-/ + +@[expose] public section + +namespace Sendov + +/-! ### The scalar chord and its moments -/ + +/-- `X(t) = a + (1-a²)t`, the pointwise majorant of `‖a + t(1-a²)qⱼ‖`. -/ +noncomputable def lowX (a t : ℝ) : ℝ := a + (1 - a ^ 2) * t + +/-- `J_m(a) = ∫₀¹ X(t)^m dt`. -/ +noncomputable def lowJ (m : ℕ) (a : ℝ) : ℝ := ∫ t in (0 : ℝ)..1, lowX a t ^ m + +lemma lowX_nonneg {a t : ℝ} (ha0 : 0 ≤ a) (ha1 : a ≤ 1) (ht0 : 0 ≤ t) : 0 ≤ lowX a t := by + have hb : (0 : ℝ) ≤ 1 - a ^ 2 := by nlinarith + simp only [lowX] + positivity + +lemma continuous_lowX_pow (a : ℝ) (m : ℕ) : Continuous fun t : ℝ => lowX a t ^ m := by + simp only [lowX] + fun_prop + +/-! ### The branch point, bounded factor by factor -/ + +lemma norm_le_lowX {a t : ℝ} (ha0 : 0 ≤ a) (ha1 : a ≤ 1) (ht0 : 0 ≤ t) {v : ℂ} + (hv : ‖v‖ ≤ 1) : ‖(a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v‖ ≤ lowX a t := by + have hb : (0 : ℝ) ≤ 1 - a ^ 2 := by nlinarith + have hcast : (a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v + = ((a : ℝ) : ℂ) + ((t * (1 - a ^ 2) : ℝ) : ℂ) * v := by push_cast; ring + rw [hcast] + refine (norm_add_le _ _).trans ?_ + rw [norm_mul, Complex.norm_real, Complex.norm_real, Real.norm_eq_abs, Real.norm_eq_abs, + abs_of_nonneg ha0, abs_of_nonneg (mul_nonneg ht0 hb)] + simp only [lowX] + nlinarith [hv, norm_nonneg v, mul_nonneg ht0 hb] + +lemma prod_norm_le_lowX_pow {a t : ℝ} (ha0 : 0 ≤ a) (ha1 : a ≤ 1) (ht0 : 0 ≤ t) : + ∀ (q : Multiset ℂ), (∀ v ∈ q, ‖v‖ ≤ 1) → + (q.map (fun v => ‖(a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v‖)).prod + ≤ lowX a t ^ q.card := by + intro q + induction q using Multiset.induction_on with + | empty => intro _; simp + | cons v s ih => + intro hq + have hv := hq v (Multiset.mem_cons_self v s) + have hs : ∀ u ∈ s, ‖u‖ ≤ 1 := fun u hu => hq u (Multiset.mem_cons_of_mem hu) + have hX0 : 0 ≤ lowX a t := lowX_nonneg ha0 ha1 ht0 + have h3 : 0 ≤ (s.map (fun v => ‖(a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v‖)).prod := + prod_map_norm_nonneg s _ + simp only [Multiset.map_cons, Multiset.prod_cons, Multiset.card_cons, pow_succ] + calc ‖(a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v‖ + * (s.map (fun v => ‖(a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v‖)).prod + ≤ lowX a t * lowX a t ^ s.card := + mul_le_mul (norm_le_lowX ha0 ha1 ht0 hv) (ih hs) h3 hX0 + _ = lowX a t ^ s.card * lowX a t := by ring + +/-- The branch point `(⋆)`, with every factor replaced by the scalar `X(t)`. -/ +theorem one_le_lowJ {n : ℕ} {a : ℝ} (ha0 : 0 ≤ a) (ha1 : a ≤ 1) + {q : Multiset ℂ} (hqcard : q.card = n - 1) (hq1 : ∀ v ∈ q, ‖v‖ ≤ 1) + (hstar : 1 ≤ ∫ t in (0 : ℝ)..1, + (q.map (fun v => ‖(a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v‖)).prod) : + 1 ≤ lowJ (n - 1) a := by + refine hstar.trans ?_ + rw [lowJ] + refine intervalIntegral.integral_mono_on (by norm_num) + ((continuous_prod_norm a q).intervalIntegrable _ _) + ((continuous_lowX_pow a (n - 1)).intervalIntegrable _ _) ?_ + intro u hu + have h := prod_norm_le_lowX_pow ha0 ha1 hu.1 q hq1 + rwa [hqcard] at h + +/-! ### The fourth moment -/ + +/-- `J₄(a)`, by the fundamental theorem of calculus against an explicit antiderivative. The +antiderivative is written without dividing by `1 - a²`, so no side condition on `a` appears. -/ +lemma lowJ_four (a : ℝ) : + lowJ 4 a = a ^ 4 + 2 * a ^ 3 * (1 - a ^ 2) + 2 * a ^ 2 * (1 - a ^ 2) ^ 2 + + a * (1 - a ^ 2) ^ 3 + (1 - a ^ 2) ^ 4 / 5 := by + have hderiv : ∀ t : ℝ, HasDerivAt (fun s : ℝ => + a ^ 4 * s + 2 * a ^ 3 * (1 - a ^ 2) * s ^ 2 + 2 * a ^ 2 * (1 - a ^ 2) ^ 2 * s ^ 3 + + a * (1 - a ^ 2) ^ 3 * s ^ 4 + (1 - a ^ 2) ^ 4 / 5 * s ^ 5) (lowX a t ^ 4) t := by + intro t + have h1 : HasDerivAt (fun s : ℝ => a ^ 4 * s) (a ^ 4 * 1) t := + (hasDerivAt_id' (x := t)).const_mul _ + have h2 : HasDerivAt (fun s : ℝ => 2 * a ^ 3 * (1 - a ^ 2) * s ^ 2) + (2 * a ^ 3 * (1 - a ^ 2) * (2 * t)) t := by + simpa using (hasDerivAt_pow 2 t).const_mul (2 * a ^ 3 * (1 - a ^ 2)) + have h3 : HasDerivAt (fun s : ℝ => 2 * a ^ 2 * (1 - a ^ 2) ^ 2 * s ^ 3) + (2 * a ^ 2 * (1 - a ^ 2) ^ 2 * (3 * t ^ 2)) t := by + simpa using (hasDerivAt_pow 3 t).const_mul (2 * a ^ 2 * (1 - a ^ 2) ^ 2) + have h4 : HasDerivAt (fun s : ℝ => a * (1 - a ^ 2) ^ 3 * s ^ 4) + (a * (1 - a ^ 2) ^ 3 * (4 * t ^ 3)) t := by + simpa using (hasDerivAt_pow 4 t).const_mul (a * (1 - a ^ 2) ^ 3) + have h5 : HasDerivAt (fun s : ℝ => (1 - a ^ 2) ^ 4 / 5 * s ^ 5) + ((1 - a ^ 2) ^ 4 / 5 * (5 * t ^ 4)) t := by + simpa using (hasDerivAt_pow 5 t).const_mul ((1 - a ^ 2) ^ 4 / 5) + have hval : lowX a t ^ 4 = a ^ 4 * 1 + 2 * a ^ 3 * (1 - a ^ 2) * (2 * t) + + 2 * a ^ 2 * (1 - a ^ 2) ^ 2 * (3 * t ^ 2) + a * (1 - a ^ 2) ^ 3 * (4 * t ^ 3) + + (1 - a ^ 2) ^ 4 / 5 * (5 * t ^ 4) := by + simp only [lowX] + ring + rw [hval] + exact ((((h1.add h2).add h3).add h4).add h5) + rw [lowJ, intervalIntegral.integral_eq_sub_of_hasDerivAt (fun t _ => hderiv t) + ((continuous_lowX_pow a 4).intervalIntegrable _ _)] + norm_num + +lemma lowJ_four_identity (a : ℝ) : + 1 - lowJ 4 a = ((1 - a) ^ 3 * (1 + a) / 5) * (a ^ 4 - 3 * a ^ 3 + 3 * a + 4) := by + rw [lowJ_four] + ring + +lemma quartic_aux_pos {a : ℝ} (ha0 : 0 < a) (ha1 : a < 1) : + 0 < a ^ 4 - 3 * a ^ 3 + 3 * a + 4 := by + have hfactor : a ^ 4 - 3 * a ^ 3 + 3 * a + 4 + = 2 + 3 * a + (1 - a) * (2 + 2 * a + a ^ 2 * (2 - a)) := by ring + have h1 : (0 : ℝ) < 1 - a := by linarith + have h2 : (0 : ℝ) < 2 - a := by linarith + rw [hfactor] + positivity + +lemma lowJ_four_lt_one {a : ℝ} (ha0 : 0 < a) (ha1 : a < 1) : lowJ 4 a < 1 := by + have haux := quartic_aux_pos ha0 ha1 + have h1 : (0 : ℝ) < 1 - a := by linarith + have h2 : (0 : ℝ) < 1 + a := by linarith + rw [← sub_pos, lowJ_four_identity] + positivity + +/-! ### Dominating exponents one through four by the fourth -/ + +/-- `X^m ≤ 1 - m/4 + (m/4)X⁴` for `0 ≤ X` and `1 ≤ m ≤ 4`: weighted AM–GM, but at these four +exponents each instance factors as a square times a positive quadratic. -/ +lemma pow_le_quartic_average {x : ℝ} (hx : 0 ≤ x) {m : ℕ} (hm0 : 1 ≤ m) (hm4 : m ≤ 4) : + x ^ m ≤ 1 - (m : ℝ) / 4 + (m : ℝ) / 4 * x ^ 4 := by + interval_cases m + · -- `m = 1`: `X⁴ - 4X + 3 = (X-1)²(X² + 2X + 3)` + have hpos : (0 : ℝ) ≤ x ^ 2 + 2 * x + 3 := by positivity + norm_num + nlinarith [mul_nonneg (sq_nonneg (x - 1)) hpos] + · -- `m = 2`: `X⁴ - 2X² + 1 = (X² - 1)²` + norm_num + nlinarith [sq_nonneg (x ^ 2 - 1)] + · -- `m = 3`: `3X⁴ - 4X³ + 1 = (X-1)²(3X² + 2X + 1)` + have hpos : (0 : ℝ) ≤ 3 * x ^ 2 + 2 * x + 1 := by positivity + norm_num + nlinarith [mul_nonneg (sq_nonneg (x - 1)) hpos] + · -- `m = 4`: equality + norm_num + +theorem lowJ_lt_one {a : ℝ} (ha0 : 0 < a) (ha1 : a < 1) {m : ℕ} (hm0 : 1 ≤ m) (hm4 : m ≤ 4) : + lowJ m a < 1 := by + have hcont4 := continuous_lowX_pow a 4 + have hcontm := continuous_lowX_pow a m + have hmaj : Continuous fun t : ℝ => 1 - (m : ℝ) / 4 + (m : ℝ) / 4 * lowX a t ^ 4 := + continuous_const.add (hcont4.const_mul _) + have hint : (∫ t in (0 : ℝ)..1, (1 - (m : ℝ) / 4 + (m : ℝ) / 4 * lowX a t ^ 4)) + = 1 - (m : ℝ) / 4 + (m : ℝ) / 4 * lowJ 4 a := by + rw [intervalIntegral.integral_add (intervalIntegrable_const) + ((hcont4.const_mul _).intervalIntegrable _ _), intervalIntegral.integral_const_mul, lowJ] + simp + have hle : lowJ m a ≤ 1 - (m : ℝ) / 4 + (m : ℝ) / 4 * lowJ 4 a := by + rw [lowJ, ← hint] + refine intervalIntegral.integral_mono_on (by norm_num) (hcontm.intervalIntegrable _ _) + (hmaj.intervalIntegrable _ _) ?_ + intro u hu + exact pow_le_quartic_average (lowX_nonneg (le_of_lt ha0) (le_of_lt ha1) hu.1) hm0 hm4 + have h4 := lowJ_four_lt_one ha0 ha1 + have hmpos : (0 : ℝ) < (m : ℝ) := by exact_mod_cast hm0 + nlinarith [hle, h4, hmpos] + +/-! ### The contradiction -/ + +/-- **The low-degree branch.** The branch point `(⋆)` is already contradictory for +`2 ≤ n ≤ 5`, with no recourse to the origin channel. -/ +theorem low_degree_contradiction {n : ℕ} (hn : 2 ≤ n) (hn5 : n ≤ 5) {a : ℝ} + (ha0 : 0 < a) (ha1 : a < 1) {q : Multiset ℂ} + (hqcard : q.card = n - 1) (hq1 : ∀ v ∈ q, ‖v‖ ≤ 1) + (hstar : 1 ≤ ∫ t in (0 : ℝ)..1, + (q.map (fun v => ‖(a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v‖)).prod) : + False := by + have h1 := one_le_lowJ (n := n) (le_of_lt ha0) (le_of_lt ha1) hqcard hq1 hstar + have h2 := lowJ_lt_one ha0 ha1 (m := n - 1) (by omega) (by omega) + linarith + +end Sendov diff --git a/LeanPool/Sendov/Analytic/Maclaurin.lean b/LeanPool/Sendov/Analytic/Maclaurin.lean new file mode 100644 index 0000000000..8b62f7ac01 --- /dev/null +++ b/LeanPool/Sendov/Analytic/Maclaurin.lean @@ -0,0 +1,229 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import Mathlib.Basic.Real.Basic +public import Mathlib.RingTheory.MvPolynomial.Symmetric.Defs +public import Mathlib.Algebra.Order.Ring.Pow +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Ring +public import Mathlib.Algebra.Order.BigOperators.GroupWithZero.Multiset + +/-! +# Maclaurin's inequality, top case + +The origin inequality needs + + `(1/N) ∑ⱼ ∏_{k≠j} bₖ ≤ ((1/N) ∑ₖ bₖ) ^ (N-1)`, + +that is `p_{N-1} ≤ p₁^{N-1}` for the elementary symmetric means. Mathlib has neither +Maclaurin's nor Newton's inequalities, and the usual route to them — real-rootedness of the +derivative, via Rolle — is a sizeable development on its own. + +It is not needed. Writing `E s` for `∑ⱼ ∏_{k≠j}`, splitting off one element gives + + `E (a ::ₘ t) = t.prod + a * E t`, + +and after the inductive hypothesis and AM–GM the step reduces, on dividing by `uᴺ` where `u` +is the mean of `t`, to `1 + N(w-1) ≤ wᴺ` — **Bernoulli's inequality**, which Mathlib has. + +AM–GM itself is proved here the same way rather than imported, because the Mathlib version is +stated for a `Finset`-indexed family and the whole development uses multisets (roots come as +multisets, and repeated roots must be allowed). Its induction step reduces to Bernoulli too, +so the two proofs share their only real ingredient. + +Neither statement mentions anything Sendov-specific; both are candidates for upstreaming. + +## Main statements + +* `Sendov.Multiset.prod_le_mean_pow`: `∏ s ≤ (mean s) ^ card s`; +* `Sendov.Multiset.esymm_card_pred_le`: `e_{N-1}(s) ≤ N (mean s)^{N-1}`. +-/ + +@[expose] public section + +namespace Sendov + +open Multiset + +variable {a : ℝ} {t : Multiset ℝ} + +/-! ### The two Bernoulli steps -/ + +/-- The AM–GM induction step: `a uᴺ ≤ μ^{N+1}` where `μ` is the mean of `a` together with `N` +copies of `u`. Dividing by `u^{N+1}` this is Bernoulli. -/ +lemma amgm_step (N : ℕ) {u : ℝ} (hu : 0 < u) (ha : 0 ≤ a) : + a * u ^ N ≤ ((a + N * u) / (N + 1)) ^ (N + 1) := by + have hN1 : (0 : ℝ) < (N : ℝ) + 1 := by positivity + set w : ℝ := (a + N * u) / ((N + 1) * u) with hw + have hw0 : 0 ≤ w := by rw [hw]; positivity + have hbase : (a + (N : ℝ) * u) / ((N : ℝ) + 1) = w * u := by + rw [hw]; field_simp + have hber : 1 + ((N : ℝ) + 1) * (w - 1) ≤ w ^ (N + 1) := by + have := one_add_mul_le_pow (a := w - 1) (by linarith) (N + 1) + simpa using this + have hau : a / u = ((N : ℝ) + 1) * w - N := by + rw [hw]; field_simp; ring + have hkey : a / u ≤ w ^ (N + 1) := by linarith [hber] + rw [hbase, mul_pow] + have : a ≤ w ^ (N + 1) * u := by + rw [div_le_iff₀ hu] at hkey; linarith + calc a * u ^ N ≤ (w ^ (N + 1) * u) * u ^ N := by + exact mul_le_mul_of_nonneg_right this (by positivity) + _ = w ^ (N + 1) * u ^ (N + 1) := by ring + +/-- The Maclaurin induction step. -/ +lemma maclaurin_step (N : ℕ) (hN : 1 ≤ N) {u : ℝ} (hu : 0 < u) (ha : 0 ≤ a) : + u ^ N + N * a * u ^ (N - 1) ≤ ((N : ℝ) + 1) * ((a + N * u) / (N + 1)) ^ N := by + have hN1 : (0 : ℝ) < (N : ℝ) + 1 := by positivity + set w : ℝ := (a + N * u) / ((N + 1) * u) with hw + have hw0 : 0 ≤ w := by rw [hw]; positivity + have hbase : (a + (N : ℝ) * u) / ((N : ℝ) + 1) = w * u := by + rw [hw]; field_simp + have hber : 1 + (N : ℝ) * (w - 1) ≤ w ^ N := by + have := one_add_mul_le_pow (a := w - 1) (by linarith) N + simpa using this + have hau : a / u = ((N : ℝ) + 1) * w - N := by + rw [hw]; field_simp; ring + -- `u ^ N = u ^ (N-1) * u` + obtain ⟨m, rfl⟩ : ∃ m, N = m + 1 := ⟨N - 1, by omega⟩ + have hpow : u ^ (m + 1) = u ^ m * u := by ring + rw [hbase, mul_pow] + simp only [Nat.add_sub_cancel] + push_cast + have hkey : 1 + ((m : ℝ) + 1) * (a / u) ≤ ((m : ℝ) + 1 + 1) * w ^ (m + 1) := by + push_cast at hber hau ⊢ + nlinarith [hber, hau] + have humpos : (0 : ℝ) < u ^ m := by positivity + have := mul_le_mul_of_nonneg_right hkey humpos.le + calc u ^ (m + 1) + ((m : ℝ) + 1) * a * u ^ m + = (1 + ((m : ℝ) + 1) * (a / u)) * u ^ m * u := by field_simp; ring + _ ≤ (((m : ℝ) + 1 + 1) * w ^ (m + 1)) * u ^ m * u := by + exact mul_le_mul_of_nonneg_right this hu.le + _ = ((m : ℝ) + 1 + 1) * (w ^ (m + 1) * u ^ (m + 1)) := by ring + +/-! ### AM–GM -/ + +/-- **AM–GM for multisets.** `∏ s ≤ (mean s) ^ card s`. -/ +theorem Multiset.prod_le_mean_pow : ∀ (s : Multiset ℝ), (∀ x ∈ s, 0 ≤ x) → + s.prod ≤ (s.sum / s.card) ^ s.card := by + intro s + induction s using Multiset.induction_on with + | empty => intro _; simp + | cons a t ih => + intro hs + have ha : 0 ≤ a := hs a (mem_cons_self a t) + have ht : ∀ x ∈ t, 0 ≤ x := fun x hx => hs x (mem_cons_of_mem hx) + have hIH := ih ht + have htsum : 0 ≤ t.sum := Multiset.sum_nonneg ht + have htprod : 0 ≤ t.prod := Multiset.prod_nonneg ht + simp only [Multiset.card_cons, Multiset.sum_cons, Multiset.prod_cons, Nat.cast_add, + Nat.cast_one] + rcases Nat.eq_zero_or_pos t.card with hc | hc + · -- `t` is empty + have ht0 : t = 0 := Multiset.card_eq_zero.1 hc + subst ht0 + simp + · have hcpos : (0 : ℝ) < t.card := by exact_mod_cast hc + set u : ℝ := t.sum / t.card with hu + have hu0 : 0 ≤ u := by rw [hu]; positivity + have hsum : t.sum = t.card * u := by rw [hu]; field_simp + rcases eq_or_lt_of_le hu0 with hz | hupos + · -- `u = 0` forces `t.prod = 0` + have hzero : t.prod = 0 := by + have : t.prod ≤ u ^ t.card := hIH + rw [← hz] at this + have h0 : (0 : ℝ) ^ t.card = 0 := zero_pow (by omega) + rw [h0] at this + linarith + rw [hzero, mul_zero] + positivity + · have hstep := amgm_step (a := a) t.card hupos ha + calc a * t.prod ≤ a * u ^ t.card := mul_le_mul_of_nonneg_left hIH ha + _ ≤ ((a + t.card * u) / (t.card + 1)) ^ (t.card + 1) := hstep + _ = ((a + t.sum) / (t.card + 1)) ^ (t.card + 1) := by rw [hsum] + +/-! ### Maclaurin -/ + +/-- Splitting off one element: `E (a ::ₘ t) = ∏ t + a · E t`. -/ +lemma esymm_card_cons (a : ℝ) (t : Multiset ℝ) (ht : t ≠ 0) : + (a ::ₘ t).esymm t.card = t.prod + a * t.esymm (t.card - 1) := by + obtain ⟨m, hm⟩ : ∃ m, t.card = m + 1 := ⟨t.card - 1, by + have : 0 < t.card := Multiset.card_pos.2 ht + omega⟩ + rw [hm] + simp only [Multiset.esymm, Multiset.powersetCard_cons, Multiset.map_add, Multiset.sum_add, + Multiset.map_map, Nat.add_sub_cancel] + congr 1 + · rw [← hm, Multiset.powersetCard_self] + simp + · rw [← Multiset.sum_map_mul_left] + congr 1 + apply Multiset.map_congr rfl + intro u _ + simp + +/-- **Maclaurin's inequality, top case.** `e_{N-1}(s) ≤ N (mean s)^{N-1}`. -/ +theorem Multiset.esymm_card_pred_le : ∀ (s : Multiset ℝ), (∀ x ∈ s, 0 ≤ x) → s ≠ 0 → + s.esymm (s.card - 1) ≤ s.card * (s.sum / s.card) ^ (s.card - 1) := by + intro s + induction s using Multiset.induction_on with + | empty => intro _ h; exact absurd rfl h + | cons a t ih => + intro hs _ + have ha : 0 ≤ a := hs a (mem_cons_self a t) + have ht : ∀ x ∈ t, 0 ≤ x := fun x hx => hs x (mem_cons_of_mem hx) + have htsum : 0 ≤ t.sum := Multiset.sum_nonneg ht + have htprod : 0 ≤ t.prod := Multiset.prod_nonneg ht + have hamgm := Multiset.prod_le_mean_pow t ht + simp only [Multiset.card_cons, Multiset.sum_cons, Nat.add_sub_cancel, Nat.cast_add, + Nat.cast_one] + rcases eq_or_ne t 0 with rfl | ht0 + · simp [Multiset.esymm] + · have hc : 0 < t.card := Multiset.card_pos.2 ht0 + have hcpos : (0 : ℝ) < t.card := by exact_mod_cast hc + have hIH := ih ht ht0 + rw [esymm_card_cons a t ht0] + set u : ℝ := t.sum / t.card with hu + have hu0 : 0 ≤ u := by rw [hu]; positivity + have hsum : t.sum = t.card * u := by rw [hu]; field_simp + rcases eq_or_lt_of_le hu0 with hz | hupos + · -- `u = 0` + have hzero : t.prod = 0 := by + have h0 : (0 : ℝ) ^ t.card = 0 := zero_pow (by omega) + rw [← hz, h0] at hamgm + linarith + have hsum0 : t.sum = 0 := by rw [hsum, ← hz, mul_zero] + rw [hzero, hsum0, zero_add, add_zero] + rcases Nat.lt_or_ge t.card 2 with h1 | h2 + · -- `card t = 1` + have hc1 : t.card = 1 := by omega + have he0 : t.esymm (t.card - 1) = 1 := by + rw [hc1] + simp [Multiset.esymm] + rw [he0, hc1] + norm_num + linarith + · -- `card t ≥ 2` + have hz0 : (0 : ℝ) ^ (t.card - 1) = 0 := zero_pow (by omega) + rw [← hz, hz0, mul_zero] at hIH + have : a * t.esymm (t.card - 1) ≤ 0 := by nlinarith [hIH, ha] + have hrhs : (0 : ℝ) ≤ ((t.card : ℝ) + 1) * (a / ((t.card : ℝ) + 1)) ^ t.card := by + positivity + linarith + · have hstep := maclaurin_step (a := a) t.card hc hupos ha + calc t.prod + a * t.esymm (t.card - 1) + ≤ u ^ t.card + a * ((t.card : ℝ) * u ^ (t.card - 1)) := by + have h2 : a * t.esymm (t.card - 1) ≤ a * ((t.card : ℝ) * u ^ (t.card - 1)) := + mul_le_mul_of_nonneg_left hIH ha + linarith [hamgm] + _ = u ^ t.card + (t.card : ℝ) * a * u ^ (t.card - 1) := by ring + _ ≤ ((t.card : ℝ) + 1) * ((a + t.card * u) / (t.card + 1)) ^ t.card := hstep + _ = ((t.card : ℝ) + 1) * ((a + t.sum) / ((t.card : ℝ) + 1)) ^ t.card := by rw [hsum] + +end Sendov diff --git a/LeanPool/Sendov/Analytic/Origin.lean b/LeanPool/Sendov/Analytic/Origin.lean new file mode 100644 index 0000000000..c0850f6264 --- /dev/null +++ b/LeanPool/Sendov/Analytic/Origin.lean @@ -0,0 +1,458 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Counterexample.Identities +public import LeanPool.Sendov.Analytic.Maclaurin +public import LeanPool.Sendov.Analytic.Defect +public import LeanPool.Sendov.Common.Quadratic +public import LeanPool.Sendov.Analytic.Polar + +/-! +# The origin inequality: the pointwise estimate and `(tri)` + +The origin argument controls `F(t) = ∏ⱼ (1 - a t qⱼ)` through its derivative, + + `F'(t) = -(n-1) a (x+iy) F(t) - a² t ∑ⱼ qⱼ² ∏_{k≠j} (1 - a t q_k)`, + +whose error term is bounded by `a² t (n-1) β(t)^{(n-2)/2}`. Integrating that against the +fundamental theorem of calculus and `F(0) = 1` gives the triangle inequality `(tri)`. The +`J`-algebra that turns `(tri)` into `(origin-exact)` follows in a later file. + +The error bound has three steps, in increasing order of depth: + +* `∑ⱼ ‖1 - a t qⱼ‖² ≤ (n-1) β(t)`, the same expansion that produced the quadratic mean in the + polar channel — this is where `x` enters; +* Cauchy–Schwarz, `(∑ b)² ≤ N ∑ b²`; +* **Maclaurin's inequality**, `∑ⱼ ∏_{k≠j} bₖ ≤ N (mean b)^{N-1}` — the one ingredient absent + from Mathlib, proved in `Sendov.Analytic.Maclaurin`. + +The blog post applies Maclaurin to `(1/(n-1)) ∑ⱼ ∏_{k≠j} |1 - a t q_k|` and then Cauchy–Schwarz; +the order is immaterial and it is done the same way here. + +A note on the bookkeeping. The quantity `∑ⱼ ∏_{k≠j} f(qⱼ)` is written as a sum over erasures +of `q`, whereas `Multiset.esymm` — which Maclaurin is stated for — is a sum over sub-multisets +of the *image* `q.map f`. Rather than relate erasure and `map` directly, which needs `f` +injective, the two are matched through the recurrence they share. + +## Main statements + +* `Sendov.sumEraseProdMap_eq_esymm`: the two forms of `∑ⱼ ∏_{k≠j}` agree; +* `Sendov.sum_norm_sq_one_sub_le`: `∑ⱼ ‖1 - a t qⱼ‖² ≤ (n-1) β(t)`; +* `Sendov.sumEraseProdMap_norm_le`: the error bound `(n-1) β(t)^{(n-2)/2}`; +* `Sendov.hasDerivAt_Fprod`: `F'(t) = -a ∑ⱼ qⱼ ∏_{k≠j} (1 - a t q_k)`; +* `Sendov.norm_deriv_add_le`: `‖F'(t) + (n-1) a (x+iy) F(t)‖ ≤ a² t (n-1) β(t)^{(n-2)/2}`; +* `Sendov.one_le_tri`: the triangle inequality `(tri)`. + +The derivative is assembled from a *weighted* erasure sum `sumEraseProdC q g f = ∑ⱼ g(qⱼ) +∏_{k≠j} f(q_k)`: taking `g = id` gives `F'` itself, and the identity `1 - (1 - a t qⱼ) = a t qⱼ` +splits that into the main term `(∑ⱼ qⱼ) F(t)` plus `a t` times the case `g = (· ^ 2)`, which is +the residual actually being estimated. +-/ + +@[expose] public section + +namespace Sendov + +/-! ### `∑ⱼ ∏_{k≠j}` over erasures, and `esymm` -/ + +open scoped Classical in +/-- `∑ⱼ ∏_{k≠j} f(sₖ)`, as a sum over erasures of `s`. -/ +noncomputable def sumEraseProdMap {α : Type*} (s : Multiset α) (f : α → ℝ) : ℝ := + (s.map (fun j => ((s.erase j).map f).prod)).sum + +open scoped Classical in +lemma sumEraseProdMap_cons {α : Type*} (v : α) (t : Multiset α) (f : α → ℝ) : + sumEraseProdMap (v ::ₘ t) f = (t.map f).prod + f v * sumEraseProdMap t f := by + simp only [sumEraseProdMap, Multiset.map_cons, Multiset.sum_cons, Multiset.erase_cons_head] + congr 1 + rw [← Multiset.sum_map_mul_left] + refine congrArg Multiset.sum (Multiset.map_congr rfl ?_) + intro j hj + rw [Multiset.erase_cons_tail_of_mem hj, Multiset.map_cons, Multiset.prod_cons] + +/-- The erasure form and `Multiset.esymm` agree, matched through their common recurrence. -/ +theorem sumEraseProdMap_eq_esymm {α : Type*} : ∀ (s : Multiset α) (f : α → ℝ), s ≠ 0 → + sumEraseProdMap s f = (s.map f).esymm ((s.map f).card - 1) := by + intro s + induction s using Multiset.induction_on with + | empty => intro _ h; exact absurd rfl h + | cons v t ih => + intro f _ + rcases eq_or_ne t 0 with rfl | ht + · simp [sumEraseProdMap, Multiset.esymm] + · rw [sumEraseProdMap_cons, ih f ht, Multiset.map_cons, Multiset.card_cons] + rw [show (t.map f).card + 1 - 1 = (t.map f).card from by omega] + rw [esymm_card_cons (f v) (t.map f) (by simpa using ht)] + +/-! ### The quadratic mean -/ + +/-- `‖1 + s v‖² = 1 + 2 s Re v + s² ‖v‖²` for real `s`. -/ +lemma norm_sq_one_add_real_mul (s : ℝ) (v : ℂ) : + ‖1 + (s : ℂ) * v‖ ^ 2 = 1 + 2 * s * v.re + s ^ 2 * ‖v‖ ^ 2 := by + rw [← Complex.normSq_eq_norm_sq, ← Complex.normSq_eq_norm_sq] + simp only [Complex.normSq_apply, Complex.add_re, Complex.add_im, Complex.mul_re, + Complex.mul_im, Complex.ofReal_re, Complex.ofReal_im, Complex.one_re, Complex.one_im] + ring + +lemma sum_norm_sq_one_sub_split (s : ℝ) (q : Multiset ℂ) : + (q.map (fun v => ‖1 + (s : ℂ) * v‖ ^ 2)).sum + = (q.card : ℝ) + 2 * s * ((q.map (fun v => v.re)).sum) + + s ^ 2 * ((q.map (fun v => ‖v‖ ^ 2)).sum) := by + induction q using Multiset.induction_on with + | empty => simp + | cons v t ih => + simp only [Multiset.map_cons, Multiset.sum_cons, Multiset.card_cons] + rw [ih, norm_sq_one_add_real_mul] + push_cast + ring + +/-- `∑ⱼ ‖1 - a t qⱼ‖² ≤ (n-1) β(t)`, where `β(t) = 1 - 2 a x t + a² t²`. -/ +theorem sum_norm_sq_one_sub_le {n : ℕ} {a x t : ℝ} {q : Multiset ℂ} + (hqcard : q.card = n - 1) (hq1 : ∀ v ∈ q, ‖v‖ ≤ 1) (hn : 1 ≤ n) + (hx : (q.map (fun v => v.re)).sum = ((n : ℝ) - 1) * x) : + (q.map (fun v => ‖1 - (a : ℂ) * (t : ℂ) * v‖ ^ 2)).sum + ≤ ((n : ℝ) - 1) * QQ (a * x) (a ^ 2) t := by + have hNcast : ((q.card : ℕ) : ℝ) = (n : ℝ) - 1 := by + rw [hqcard] + push_cast [Nat.cast_sub hn] + ring + have hcast : ∀ v : ℂ, 1 - (a : ℂ) * (t : ℂ) * v = 1 + ((-(a * t) : ℝ) : ℂ) * v := by + intro v + push_cast + ring + simp only [hcast] + rw [sum_norm_sq_one_sub_split, hx, hNcast] + have hsum2 := sum_norm_sq_le_card q hq1 + rw [hNcast] at hsum2 + simp only [QQ] + nlinarith [hsum2, sq_nonneg (a * t)] + +/-! ### Cauchy–Schwarz and the error bound -/ + +lemma sq_sum_le_card_mul_sum_sq (s : Multiset ℝ) (hs : ∀ b ∈ s, 0 ≤ b) : + (s.sum) ^ 2 ≤ (s.card : ℝ) * (s.map (fun b => b ^ 2)).sum := by + induction s using Multiset.induction_on with + | empty => simp + | cons b t ih => + have hb := hs b (Multiset.mem_cons_self b t) + have ht : ∀ u ∈ t, 0 ≤ u := fun u hu => hs u (Multiset.mem_cons_of_mem hu) + rcases eq_or_ne t 0 with rfl | ht0 + · simp + · have hIH := ih ht + have hcard : (0 : ℝ) < (t.card : ℕ) := by + have := Multiset.card_pos.2 ht0 + exact_mod_cast this + have hsum : 0 ≤ t.sum := Multiset.sum_nonneg ht + have hQ : (0 : ℝ) ≤ (t.map (fun b => b ^ 2)).sum := + Multiset.sum_nonneg (by + intro y hy + obtain ⟨u, _, rfl⟩ := Multiset.mem_map.1 hy + exact sq_nonneg u) + simp only [Multiset.sum_cons, Multiset.card_cons, Multiset.map_cons] + push_cast + nlinarith [hIH, sq_nonneg (t.sum - (t.card : ℝ) * b), hcard, hsum, hb, hQ] + +/-- **The error bound.** `∑ⱼ ∏_{k≠j} ‖1 - a t q_k‖ ≤ (n-1) β(t)^{(n-2)/2}`: Maclaurin's +inequality, then Cauchy–Schwarz, then the quadratic mean. Nonnegativity of `β(t)` is not +assumed — it follows from the quadratic-mean bound, `β(t)` dominating an average of squares. -/ +theorem sumEraseProdMap_norm_le {n : ℕ} (hn : 2 ≤ n) {a x t : ℝ} {q : Multiset ℂ} + (hqcard : q.card = n - 1) (hq0 : q ≠ 0) (hq1 : ∀ v ∈ q, ‖v‖ ≤ 1) + (hx : (q.map (fun v => v.re)).sum = ((n : ℝ) - 1) * x) : + sumEraseProdMap q (fun v => ‖1 - (a : ℂ) * (t : ℂ) * v‖) + ≤ ((n : ℝ) - 1) * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2) := by + set f : ℂ → ℝ := fun v => ‖1 - (a : ℂ) * (t : ℂ) * v‖ with hf + set bs : Multiset ℝ := q.map f with hbs + have hbcard : bs.card = n - 1 := by rw [hbs, Multiset.card_map, hqcard] + have hNcast : ((bs.card : ℕ) : ℝ) = (n : ℝ) - 1 := by + rw [hbcard] + push_cast [Nat.cast_sub (by omega : (1 : ℕ) ≤ n)] + ring + have hNpos : (0 : ℝ) < (bs.card : ℕ) := by + rw [hNcast] + have : (2 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + linarith + have hbs0 : bs ≠ 0 := by + rw [hbs] + simpa using hq0 + have hbnn : ∀ b ∈ bs, 0 ≤ b := by + intro b hb + rw [hbs] at hb + obtain ⟨v, _, rfl⟩ := Multiset.mem_map.1 hb + exact norm_nonneg _ + have hsumnn : 0 ≤ bs.sum := Multiset.sum_nonneg hbnn + -- the quadratic mean + have hsq : (bs.map (fun b => b ^ 2)).sum ≤ ((n : ℝ) - 1) * QQ (a * x) (a ^ 2) t := by + rw [hbs, Multiset.map_map] + exact sum_norm_sq_one_sub_le hqcard hq1 (by omega) hx + have hβ0 : 0 ≤ QQ (a * x) (a ^ 2) t := by + have hnn : (0 : ℝ) ≤ (bs.map (fun b => b ^ 2)).sum := + Multiset.sum_nonneg (by + intro y hy + obtain ⟨u, _, rfl⟩ := Multiset.mem_map.1 hy + exact sq_nonneg u) + nlinarith [hsq, hnn, hNcast, hNpos] + -- Cauchy–Schwarz + have hcs : (bs.sum) ^ 2 ≤ ((n : ℝ) - 1) ^ 2 * QQ (a * x) (a ^ 2) t := by + have h := sq_sum_le_card_mul_sum_sq bs hbnn + rw [hNcast] at h + nlinarith [h, hsq, hNcast, hNpos] + have hmean : bs.sum / (bs.card : ℕ) ≤ Real.sqrt (QQ (a * x) (a ^ 2) t) := by + rw [div_le_iff₀ hNpos, hNcast] + have hsqrt : Real.sqrt (QQ (a * x) (a ^ 2) t) ^ 2 = QQ (a * x) (a ^ 2) t := + Real.sq_sqrt hβ0 + have hn1 : (0 : ℝ) < (n : ℝ) - 1 := by rw [← hNcast]; exact hNpos + have hprodnn : (0 : ℝ) ≤ Real.sqrt (QQ (a * x) (a ^ 2) t) * ((n : ℝ) - 1) := + mul_nonneg (Real.sqrt_nonneg _) (le_of_lt hn1) + nlinarith [hcs, hsqrt, hsumnn, hprodnn, hn1] + -- Maclaurin + have hmac := Multiset.esymm_card_pred_le bs hbnn hbs0 + rw [sumEraseProdMap_eq_esymm q f hq0, ← hbs] + refine hmac.trans ?_ + have hpow : (bs.sum / (bs.card : ℕ)) ^ (bs.card - 1) + ≤ Real.sqrt (QQ (a * x) (a ^ 2) t) ^ (bs.card - 1) := by + refine pow_le_pow_left₀ (by positivity) hmean _ + have hfin : Real.sqrt (QQ (a * x) (a ^ 2) t) ^ (bs.card - 1) + = QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2) := by + rw [Real.sqrt_eq_rpow, ← Real.rpow_natCast (QQ (a * x) (a ^ 2) t ^ ((1 : ℝ) / 2)) + (bs.card - 1), ← Real.rpow_mul hβ0] + congr 1 + have hcast2 : ((bs.card - 1 : ℕ) : ℝ) = (n : ℝ) - 2 := by + rw [hbcard] + have h2 : n - 1 - 1 = n - 2 := by omega + rw [h2] + push_cast [Nat.cast_sub (by omega : (2 : ℕ) ≤ n)] + ring + rw [hcast2] + ring + rw [hNcast] at * + calc ((n : ℝ) - 1) * (bs.sum / ((n : ℝ) - 1)) ^ (bs.card - 1) + ≤ ((n : ℝ) - 1) * Real.sqrt (QQ (a * x) (a ^ 2) t) ^ (bs.card - 1) := by + refine mul_le_mul_of_nonneg_left ?_ (by linarith) + rw [← hNcast] at hpow ⊢ + exact hpow + _ = ((n : ℝ) - 1) * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2) := by rw [hfin] + +/-! ### The derivative of `F(t) = ∏ⱼ (1 - a t qⱼ)` -/ + +open scoped Classical in +/-- `∑ⱼ g(qⱼ) ∏_{k≠j} f(q_k)`, the weighted erasure sum over `ℂ`. Taking `g = id` gives the +derivative of a product; taking `g = (· ^ 2)` gives the residual left after the main term is +split off. -/ +noncomputable def sumEraseProdC (s : Multiset ℂ) (g f : ℂ → ℂ) : ℂ := + (s.map (fun j => g j * ((s.erase j).map f).prod)).sum + +open scoped Classical in +@[simp] lemma sumEraseProdC_zero (g f : ℂ → ℂ) : sumEraseProdC 0 g f = 0 := by + simp [sumEraseProdC] + +open scoped Classical in +lemma sumEraseProdC_cons (v : ℂ) (t : Multiset ℂ) (g f : ℂ → ℂ) : + sumEraseProdC (v ::ₘ t) g f = g v * (t.map f).prod + f v * sumEraseProdC t g f := by + simp only [sumEraseProdC, Multiset.map_cons, Multiset.sum_cons, Multiset.erase_cons_head] + congr 1 + rw [← Multiset.sum_map_mul_left] + refine congrArg Multiset.sum (Multiset.map_congr rfl ?_) + intro j hj + rw [Multiset.erase_cons_tail_of_mem hj, Multiset.map_cons, Multiset.prod_cons] + ring + +/-- A weighted erasure sum with unit-size weights is dominated by the unweighted one. -/ +lemma norm_sumEraseProdC_le (g f : ℂ → ℂ) : ∀ (s : Multiset ℂ), (∀ v ∈ s, ‖g v‖ ≤ 1) → + ‖sumEraseProdC s g f‖ ≤ sumEraseProdMap s (fun v => ‖f v‖) := by + intro s + induction s using Multiset.induction_on with + | empty => intro _; simp [sumEraseProdMap] + | cons v t ih => + intro hg + have hv := hg v (Multiset.mem_cons_self v t) + have ht : ∀ u ∈ t, ‖g u‖ ≤ 1 := fun u hu => hg u (Multiset.mem_cons_of_mem hu) + rw [sumEraseProdC_cons, sumEraseProdMap_cons] + refine (norm_add_le _ _).trans ?_ + rw [norm_mul, norm_mul, norm_prod_map] + have h2 : (0 : ℝ) ≤ (t.map (fun v => ‖f v‖)).prod := prod_map_norm_nonneg t f + nlinarith [ih ht, norm_nonneg (f v), norm_nonneg (sumEraseProdC t g f), h2, hv] + +/-- `F(t) = ∏ⱼ (1 - a t qⱼ)`. -/ +noncomputable def Fprod (a : ℝ) (q : Multiset ℂ) (t : ℝ) : ℂ := + (q.map (fun v => 1 - (a : ℂ) * (t : ℂ) * v)).prod + +@[simp] lemma Fprod_zero (a : ℝ) (q : Multiset ℂ) : Fprod a q 0 = 1 := by + simp [Fprod] + +/-- Splitting the derivative sum into its main term and its residual: +`∑ⱼ qⱼ ∏_{k≠j}(1-atq_k) = (∑ⱼ qⱼ) F(t) + a t ∑ⱼ qⱼ² ∏_{k≠j}(1-atq_k)`, since +`1 - (1 - a t qⱼ) = a t qⱼ`. -/ +lemma sumEraseProdC_id_eq (a t : ℝ) : ∀ (q : Multiset ℂ), + sumEraseProdC q id (fun v => 1 - (a : ℂ) * (t : ℂ) * v) + = q.sum * Fprod a q t + + (a : ℂ) * (t : ℂ) * sumEraseProdC q (fun v => v ^ 2) + (fun v => 1 - (a : ℂ) * (t : ℂ) * v) := by + intro q + induction q using Multiset.induction_on with + | empty => simp [Fprod] + | cons v r ih => + rw [sumEraseProdC_cons, sumEraseProdC_cons, ih, Multiset.sum_cons] + simp only [Fprod, Multiset.map_cons, Multiset.prod_cons, id] + ring + +/-- `F'(t) = -a ∑ⱼ qⱼ ∏_{k≠j}(1 - a t q_k)`. -/ +lemma hasDerivAt_Fprod (a t : ℝ) : ∀ (q : Multiset ℂ), + HasDerivAt (Fprod a q) + (-(a : ℂ) * sumEraseProdC q id (fun v => 1 - (a : ℂ) * (t : ℂ) * v)) t := by + intro q + induction q using Multiset.induction_on with + | empty => + have he : Fprod a 0 = fun _ : ℝ => (1 : ℂ) := by funext s; simp [Fprod] + have hz : -(a : ℂ) * sumEraseProdC 0 id (fun v => 1 - (a : ℂ) * (t : ℂ) * v) = 0 := by simp + rw [he, hz] + exact hasDerivAt_const t 1 + | cons v r ih => + have h0 : HasDerivAt (fun s : ℝ => (s : ℂ)) 1 t := Complex.ofRealCLM.hasDerivAt + have h1 : HasDerivAt (fun s : ℝ => 1 - (a : ℂ) * (s : ℂ) * v) (-((a : ℂ) * v)) t := by + simpa using ((h0.const_mul (a : ℂ)).mul_const v).const_sub 1 + have h2 := h1.mul ih + have hfun : Fprod a (v ::ₘ r) + = fun s : ℝ => (1 - (a : ℂ) * (s : ℂ) * v) * Fprod a r s := by + funext s + simp only [Fprod, Multiset.map_cons, Multiset.prod_cons] + have hderiv : -(a : ℂ) * ((v : ℂ) * (r.map (fun w => 1 - (a : ℂ) * (t : ℂ) * w)).prod + + (1 - (a : ℂ) * (t : ℂ) * v) * sumEraseProdC r id (fun w => 1 - (a : ℂ) * (t : ℂ) * w)) + = -((a : ℂ) * v) * Fprod a r t + + (1 - (a : ℂ) * (t : ℂ) * v) + * (-(a : ℂ) * sumEraseProdC r id (fun w => 1 - (a : ℂ) * (t : ℂ) * w)) := by + simp only [Fprod] + ring + rw [hfun, sumEraseProdC_cons, id_eq, hderiv] + exact h2 + +/-- **The pointwise estimate.** `‖F'(t) + (n-1) a (x+iy) F(t)‖ ≤ a² t (n-1) β(t)^{(n-2)/2}`. -/ +theorem norm_deriv_add_le {n : ℕ} (hn : 2 ≤ n) {a x y t : ℝ} {q : Multiset ℂ} + (hqcard : q.card = n - 1) (hq0 : q ≠ 0) (hq1 : ∀ v ∈ q, ‖v‖ ≤ 1) + (ha0 : 0 ≤ a) (ht0 : 0 ≤ t) + (hx : (q.map (fun v => v.re)).sum = ((n : ℝ) - 1) * x) + (hsum : q.sum = (((n : ℝ) - 1) : ℂ) * ((x : ℂ) + (y : ℂ) * Complex.I)) : + ‖(-(a : ℂ) * sumEraseProdC q id (fun v => 1 - (a : ℂ) * (t : ℂ) * v)) + + (((n : ℝ) - 1) : ℂ) * (a : ℂ) * ((x : ℂ) + (y : ℂ) * Complex.I) * Fprod a q t‖ + ≤ a ^ 2 * t * ((n : ℝ) - 1) * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2) := by + set S : ℂ := sumEraseProdC q (fun v => v ^ 2) (fun v => 1 - (a : ℂ) * (t : ℂ) * v) with hS + have hmain : (-(a : ℂ) * sumEraseProdC q id (fun v => 1 - (a : ℂ) * (t : ℂ) * v)) + + (((n : ℝ) - 1) : ℂ) * (a : ℂ) * ((x : ℂ) + (y : ℂ) * Complex.I) * Fprod a q t + = -((a : ℂ) ^ 2 * (t : ℂ)) * S := by + rw [sumEraseProdC_id_eq, hsum, ← hS] + ring + rw [hmain, norm_mul] + have hnorm : ‖-((a : ℂ) ^ 2 * (t : ℂ))‖ = a ^ 2 * t := by + simp [abs_of_nonneg ha0, abs_of_nonneg ht0] + rw [hnorm] + have hSle : ‖S‖ ≤ sumEraseProdMap q (fun v => ‖1 - (a : ℂ) * (t : ℂ) * v‖) := by + rw [hS] + refine norm_sumEraseProdC_le _ _ q ?_ + intro v hv + rw [norm_pow] + exact pow_le_one₀ (norm_nonneg v) (hq1 v hv) + have hbd := sumEraseProdMap_norm_le (a := a) (x := x) (t := t) hn hqcard hq0 hq1 hx + have hfac : (0 : ℝ) ≤ a ^ 2 * t := mul_nonneg (pow_nonneg ha0 2) ht0 + calc a ^ 2 * t * ‖S‖ + ≤ a ^ 2 * t * (((n : ℝ) - 1) * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2)) := + mul_le_mul_of_nonneg_left (hSle.trans hbd) hfac + _ = a ^ 2 * t * ((n : ℝ) - 1) * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2) := by ring + +/-! ### Integrating the pointwise estimate: the triangle inequality `(tri)` -/ + +lemma continuous_prodC (a : ℝ) : ∀ (q : Multiset ℂ), + Continuous fun t : ℝ => (q.map (fun v => 1 - (a : ℂ) * (t : ℂ) * v)).prod := by + intro q + induction q using Multiset.induction_on with + | empty => simpa using continuous_const + | cons v r ih => + simp only [Multiset.map_cons, Multiset.prod_cons] + exact (by fun_prop : Continuous fun t : ℝ => 1 - (a : ℂ) * (t : ℂ) * v).mul ih + +lemma continuous_Fprod (a : ℝ) (q : Multiset ℂ) : Continuous (Fprod a q) := + continuous_prodC a q + +lemma continuous_sumEraseProdC (a : ℝ) (g : ℂ → ℂ) : ∀ (q : Multiset ℂ), + Continuous fun t : ℝ => sumEraseProdC q g (fun v => 1 - (a : ℂ) * (t : ℂ) * v) := by + intro q + induction q using Multiset.induction_on with + | empty => + simp only [sumEraseProdC_zero] + exact continuous_const + | cons v r ih => + simp only [sumEraseProdC_cons] + exact (continuous_const.mul (continuous_prodC a r)).add + ((by fun_prop : Continuous fun t : ℝ => 1 - (a : ℂ) * (t : ℂ) * v).mul ih) + +/-- **The triangle inequality `(tri)`.** Integrating `norm_deriv_add_le` against the +fundamental theorem of calculus, using `F(0) = 1`. -/ +theorem one_le_tri {n : ℕ} (hn : 2 ≤ n) {a x y : ℝ} {q : Multiset ℂ} + (hqcard : q.card = n - 1) (hq0 : q ≠ 0) (hq1 : ∀ v ∈ q, ‖v‖ ≤ 1) (ha0 : 0 ≤ a) + (hx : (q.map (fun v => v.re)).sum = ((n : ℝ) - 1) * x) + (hsum : q.sum = ((n : ℂ) - 1) * ((x : ℂ) + (y : ℂ) * Complex.I)) : + 1 ≤ ‖Fprod a q 1 + ((n : ℂ) - 1) * (a : ℂ) * ((x : ℂ) + (y : ℂ) * Complex.I) + * ∫ t in (0 : ℝ)..1, Fprod a q t‖ + + a ^ 2 * ((n : ℝ) - 1) + * ∫ t in (0 : ℝ)..1, t * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2) := by + set c : ℂ := ((n : ℂ) - 1) * (a : ℂ) * ((x : ℂ) + (y : ℂ) * Complex.I) with hc + set D : ℝ → ℂ := fun t => -(a : ℂ) * sumEraseProdC q id (fun v => 1 - (a : ℂ) * (t : ℂ) * v) + with hDdef + have hDcont : Continuous D := by + rw [hDdef] + exact continuous_const.mul (continuous_sumEraseProdC a id q) + have hFcont : Continuous (Fprod a q) := continuous_Fprod a q + have hDint : IntervalIntegrable D MeasureTheory.volume 0 1 := hDcont.intervalIntegrable _ _ + have hFint : IntervalIntegrable (Fprod a q) MeasureTheory.volume 0 1 := + hFcont.intervalIntegrable _ _ + have hFTC : ∫ t in (0 : ℝ)..1, D t = Fprod a q 1 - Fprod a q 0 := + intervalIntegral.integral_eq_sub_of_hasDerivAt (fun t _ => hasDerivAt_Fprod a t q) hDint + -- the exact identity behind the triangle inequality + have hG : ∫ t in (0 : ℝ)..1, (D t + c * Fprod a q t) + = (Fprod a q 1 - 1) + c * ∫ t in (0 : ℝ)..1, Fprod a q t := by + rw [intervalIntegral.integral_add hDint (hFint.const_mul c), hFTC, Fprod_zero, + intervalIntegral.integral_const_mul] + have hkey : (1 : ℂ) = (Fprod a q 1 + c * ∫ t in (0 : ℝ)..1, Fprod a q t) + - ∫ t in (0 : ℝ)..1, (D t + c * Fprod a q t) := by + rw [hG]; ring + -- the pointwise bound, integrated + have hexp : (0 : ℝ) ≤ ((n : ℝ) - 2) / 2 := by + have : (2 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + linarith + have hRcont : Continuous fun t : ℝ => + a ^ 2 * ((n : ℝ) - 1) * (t ^ 1 * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2)) := + continuous_const.mul (continuous_pow_mul_QQ (a * x) (a ^ 2) 1 hexp) + have hGnorm : ∀ t ∈ Set.Icc (0 : ℝ) 1, ‖D t + c * Fprod a q t‖ + ≤ a ^ 2 * ((n : ℝ) - 1) * (t ^ 1 * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2)) := by + intro t ht + have h := norm_deriv_add_le hn hqcard hq0 hq1 ha0 ht.1 hx hsum (t := t) (y := y) + rw [hDdef, hc] + calc ‖-(a : ℂ) * sumEraseProdC q id (fun v => 1 - (a : ℂ) * (t : ℂ) * v) + + ((n : ℂ) - 1) * (a : ℂ) * ((x : ℂ) + (y : ℂ) * Complex.I) * Fprod a q t‖ + ≤ a ^ 2 * t * ((n : ℝ) - 1) * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2) := h + _ = a ^ 2 * ((n : ℝ) - 1) * (t ^ 1 * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2)) := by ring + have hint : ‖∫ t in (0 : ℝ)..1, (D t + c * Fprod a q t)‖ + ≤ a ^ 2 * ((n : ℝ) - 1) + * ∫ t in (0 : ℝ)..1, t * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2) := by + refine (intervalIntegral.norm_integral_le_integral_norm (by norm_num : (0 : ℝ) ≤ 1)).trans ?_ + have hni : IntervalIntegrable (fun t : ℝ => ‖D t + c * Fprod a q t‖) + MeasureTheory.volume 0 1 := + (hDcont.add (continuous_const.mul hFcont)).norm.intervalIntegrable _ _ + have hri : IntervalIntegrable (fun t : ℝ => + a ^ 2 * ((n : ℝ) - 1) * (t ^ 1 * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2))) + MeasureTheory.volume 0 1 := hRcont.intervalIntegrable _ _ + have hmono := intervalIntegral.integral_mono_on (by norm_num : (0 : ℝ) ≤ 1) hni hri hGnorm + refine hmono.trans ?_ + rw [intervalIntegral.integral_const_mul] + simp + -- assemble + have hnorm1 : ‖(1 : ℂ)‖ ≤ ‖Fprod a q 1 + c * ∫ t in (0 : ℝ)..1, Fprod a q t‖ + + ‖∫ t in (0 : ℝ)..1, (D t + c * Fprod a q t)‖ := by + conv_lhs => rw [hkey] + exact norm_sub_le _ _ + rw [norm_one] at hnorm1 + linarith [hnorm1, hint] + +end Sendov diff --git a/LeanPool/Sendov/Analytic/OriginExact.lean b/LeanPool/Sendov/Analytic/OriginExact.lean new file mode 100644 index 0000000000..ad07bcba6a --- /dev/null +++ b/LeanPool/Sendov/Analytic/OriginExact.lean @@ -0,0 +1,260 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Analytic.Origin +public import LeanPool.Sendov.Analytic.Jsum +public import LeanPool.Sendov.Reduction.Setup + +/-! +# The origin inequality + +This file closes the origin channel, deriving `(origin-exact)` — the hypothesis `horigin` of +`Sendov.polar_origin_incompatible` — from the triangle inequality `(tri)` of +`Sendov.Analytic.Origin`, the two origin identities, and the defect estimate of +`Sendov.Analytic.Jsum`. + +The chain is: + +* **(f1aq)** The two origin identities express `F(1) + (n-1) a (x+iy) ∫₀¹F` exactly, in terms of + `J = (∏ qⱼ)(∏ zⱼ)` and `∑ⱼ 1/zⱼ`. Feeding in `Jsum_estimate` collapses this to `J·W/n` plus + an error of size `a(1-|J|²)/(n-1)`, where `W = a²(n-1) + 1 - a(x+iy)`. +* **(grow)** `‖W‖ ≥ 2an/(n-1)`, which makes `|J|·‖W‖/n + a(1-|J|²)/(n-1)` non-decreasing in + `|J|` on `[0,1]`, so `|J|` may be replaced by `1`. This reduces to the quadratic + `(n-1)²a² - (3n-1)a + (n-1) > 0`, whose discriminant `(3n-1)² - 4(n-1)³` is negative exactly + from `n ≥ 5` on. **This is the only place the hypothesis `n ≥ 5` is used.** +* **Eliminating `y`.** `|s + it| ≤ s + t²/(2s)` for `s > 0`, applied to `W`, whose real part + `a²(n-1) + 1 - ax` is at least `a²(n-1)`, and whose imaginary part is `-ay` with + `y² ≤ 1 - x²`. + +## Main statements + +* `Sendov.origin_exact`: `(origin-exact)`, in exactly the form `polar_origin_incompatible` wants; +* `Sendov.grow`: the lower bound `‖W‖ ≥ 2an/(n-1)`. +-/ + +@[expose] public section + +namespace Sendov + +open Complex (I) + +/-! ### Scalar lemmas -/ + +lemma sum_norm_le_card : ∀ (q : Multiset ℂ), (∀ v ∈ q, ‖v‖ ≤ 1) → + (q.map (fun v => ‖v‖)).sum ≤ (q.card : ℝ) := by + intro q + induction q using Multiset.induction_on with + | empty => intro _; simp + | cons v t ih => + intro hq + have hv := hq v (Multiset.mem_cons_self v t) + have ht : ∀ u ∈ t, ‖u‖ ≤ 1 := fun u hu => hq u (Multiset.mem_cons_of_mem hu) + simp only [Multiset.map_cons, Multiset.sum_cons, Multiset.card_cons] + push_cast + linarith [ih ht] + +/-- `|s + it| ≤ s + t²/(2s)` for `s > 0`, in cleared form. Squaring both sides leaves +`t⁴ ≥ 0`. -/ +lemma norm_mul_two_re_le {w : ℂ} (_hs : 0 < w.re) : + ‖w‖ * (2 * w.re) ≤ 2 * w.re ^ 2 + w.im ^ 2 := by + have h1 : ‖w‖ ^ 2 = w.re ^ 2 + w.im ^ 2 := by + rw [← Complex.normSq_eq_norm_sq, Complex.normSq_apply] + ring + nlinarith [norm_nonneg w, h1, sq_nonneg (w.im ^ 2), sq_nonneg (w.re * w.im)] + +/-! ### The quantity `W`, the growth bound `(grow)`, and the two real-arithmetic steps -/ + +/-- `W = a²(n-1) + 1 - a(x+iy)`; `n` times the bracket in the blog post's `(tri-2)`. -/ +noncomputable def Worigin (n : ℕ) (a x y : ℝ) : ℂ := + (a : ℂ) ^ 2 * ((n : ℂ) - 1) + 1 - (a : ℂ) * ((x : ℂ) + (y : ℂ) * I) + +lemma Worigin_eq (n : ℕ) (a x y : ℝ) : + Worigin n a x y = ((a ^ 2 * ((n : ℝ) - 1) + 1 - a * x : ℝ) : ℂ) + + ((-(a * y) : ℝ) : ℂ) * I := by + simp only [Worigin] + push_cast + ring + +lemma Worigin_re (n : ℕ) (a x y : ℝ) : + (Worigin n a x y).re = a ^ 2 * ((n : ℝ) - 1) + 1 - a * x := by + rw [Worigin_eq, Complex.add_re, Complex.ofReal_re, Complex.mul_re, Complex.ofReal_re, + Complex.ofReal_im, Complex.I_re, Complex.I_im] + ring + +lemma Worigin_im (n : ℕ) (a x y : ℝ) : (Worigin n a x y).im = -(a * y) := by + rw [Worigin_eq, Complex.add_im, Complex.ofReal_im, Complex.mul_im, Complex.ofReal_re, + Complex.ofReal_im, Complex.I_re, Complex.I_im] + ring + +/-- **(grow).** `‖W‖ ≥ 2an/(n-1)`. Bounding `‖W‖` below by its real part reduces this to +`(n-1)²a² - (3n-1)a + (n-1) > 0`; completing the square turns that into +`4(n-1)³ - (3n-1)² > 0`, which is exactly where `n ≥ 5` is needed. -/ +theorem grow {n : ℕ} (hn : 5 ≤ n) {a x y : ℝ} (ha0 : 0 < a) (hx : x ≤ 1) : + 2 * a * (n : ℝ) / ((n : ℝ) - 1) ≤ ‖Worigin n a x y‖ := by + have hnR : (5 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + have hn1 : (0 : ℝ) < (n : ℝ) - 1 := by linarith + have hu : (0 : ℝ) ≤ (n : ℝ) - 5 := by linarith + have hdisc : 0 < 4 * ((n : ℝ) - 1) ^ 3 - (3 * (n : ℝ) - 1) ^ 2 := by + nlinarith [hu, sq_nonneg ((n : ℝ) - 5), mul_nonneg (mul_nonneg hu hu) hu] + have hquad : 0 < ((n : ℝ) - 1) ^ 2 * a ^ 2 - (3 * (n : ℝ) - 1) * a + ((n : ℝ) - 1) := by + nlinarith [sq_nonneg (2 * ((n : ℝ) - 1) ^ 2 * a - (3 * (n : ℝ) - 1)), hdisc, + mul_pos hn1 hn1] + have hre : 2 * a * (n : ℝ) / ((n : ℝ) - 1) ≤ (Worigin n a x y).re := by + rw [Worigin_re, div_le_iff₀ hn1] + nlinarith [hquad, mul_nonneg (mul_nonneg (le_of_lt ha0) (sub_nonneg.2 hx)) (le_of_lt hn1)] + exact hre.trans (Complex.re_le_norm _) + +/-- Replacing `|J|` by `1`: `P K + c(1 - P²) ≤ K` on `0 ≤ P ≤ 1` once `K ≥ 2c ≥ 0`, since +`K - P K - c(1-P²) = (1-P)(K - c(1+P))`. -/ +lemma collapse_J {K c P : ℝ} (hP1 : P ≤ 1) (hc0 : 0 ≤ c) (hcK : 2 * c ≤ K) : + P * K + c * (1 - P ^ 2) ≤ K := by + have hfac : 0 ≤ (1 - P) * (K - c * (1 + P)) := by + refine mul_nonneg (by linarith) ?_ + nlinarith [hc0, hP1, hcK] + nlinarith [hfac] + +/-- Eliminating `y`: `‖W‖ ≤ Re W + (Im W)²/(2 Re W)`, then `Re W ≥ a²(n-1)` and `y² ≤ 1 - x²`. -/ +lemma norm_Worigin_le {n : ℕ} {a x y : ℝ} (ha0 : 0 < a) (ha1 : a < 1) + (hn1 : (0 : ℝ) < (n : ℝ) - 1) (hxle : x ≤ 1) (hy2 : y ^ 2 ≤ 1 - x ^ 2) : + ‖Worigin n a x y‖ + ≤ a ^ 2 * ((n : ℝ) - 1) + 1 - a * x + (1 - x ^ 2) / (2 * ((n : ℝ) - 1)) := by + have hax : a * x ≤ a := mul_le_of_le_one_right (le_of_lt ha0) hxle + have ha2 : (0 : ℝ) < a ^ 2 * ((n : ℝ) - 1) := by positivity + have hslow : a ^ 2 * ((n : ℝ) - 1) ≤ a ^ 2 * ((n : ℝ) - 1) + 1 - a * x := by linarith + have hpos : 0 < (Worigin n a x y).re := by rw [Worigin_re]; linarith + have hs : (0 : ℝ) < 2 * (a ^ 2 * ((n : ℝ) - 1) + 1 - a * x) := by linarith + have hden : (0 : ℝ) < 2 * ((n : ℝ) - 1) := by linarith + have h := norm_mul_two_re_le hpos + rw [Worigin_re, Worigin_im] at h + have hmain : ‖Worigin n a x y‖ + ≤ (a ^ 2 * ((n : ℝ) - 1) + 1 - a * x) + + a ^ 2 * y ^ 2 / (2 * (a ^ 2 * ((n : ℝ) - 1) + 1 - a * x)) := by + rw [← sub_le_iff_le_add', le_div_iff₀ hs] + nlinarith [h] + have htail : a ^ 2 * y ^ 2 / (2 * (a ^ 2 * ((n : ℝ) - 1) + 1 - a * x)) + ≤ (1 - x ^ 2) / (2 * ((n : ℝ) - 1)) := by + rw [div_le_div_iff₀ hs hden] + nlinarith [hy2, hslow, ha2, sq_nonneg y, hn1] + linarith [hmain, htail] + +/-- `x` and `y` are determined by `q.sum`, and inherit two bounds from `‖qⱼ‖ ≤ 1`: the real +part is what the polar and origin estimates need, and `x² + y² ≤ 1` is what eliminates `y`. -/ +lemma xy_bounds {n : ℕ} (hn : 2 ≤ n) {x y : ℝ} {q : Multiset ℂ} + (hqcard : q.card = n - 1) (hq1 : ∀ v ∈ q, ‖v‖ ≤ 1) + (hxy : q.sum = ((n : ℂ) - 1) * ((x : ℂ) + (y : ℂ) * I)) : + (q.map (fun v => v.re)).sum = ((n : ℝ) - 1) * x ∧ x ^ 2 + y ^ 2 ≤ 1 := by + have hnR : (2 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + have hn1 : (0 : ℝ) < (n : ℝ) - 1 := by linarith + have hnc : ‖((n : ℂ) - 1)‖ = (n : ℝ) - 1 := by + have hc : ((n : ℂ) - 1) = (((n : ℝ) - 1 : ℝ) : ℂ) := by push_cast; ring + rw [hc, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (le_of_lt hn1)] + have hqcardR : ((q.card : ℕ) : ℝ) = (n : ℝ) - 1 := by + rw [hqcard] + push_cast [Nat.cast_sub (by omega : (1 : ℕ) ≤ n)] + ring + refine ⟨?_, ?_⟩ + · have hc : ((n : ℂ) - 1) * ((x : ℂ) + (y : ℂ) * I) + = ((((n : ℝ) - 1) * x : ℝ) : ℂ) + ((((n : ℝ) - 1) * y : ℝ) : ℂ) * I := by + push_cast; ring + rw [sum_map_re, hxy, hc] + simp + · have hxynorm : ‖(x : ℂ) + (y : ℂ) * I‖ ^ 2 = x ^ 2 + y ^ 2 := by + rw [← Complex.normSq_eq_norm_sq, Complex.normSq_add_mul_I] + have h2 : ‖q.sum‖ ≤ (q.map (fun v => ‖v‖)).sum := by + have h := norm_sum_map_le q (fun v => v) + simpa using h + have h3 := sum_norm_le_card q hq1 + rw [hqcardR] at h3 + have h1 : ‖q.sum‖ ≤ (n : ℝ) - 1 := h2.trans h3 + rw [hxy, norm_mul, hnc] at h1 + have h4 : ‖(x : ℂ) + (y : ℂ) * I‖ ≤ 1 := by + by_contra hcon + rw [not_le] at hcon + nlinarith [h1, hn1] + nlinarith [hxynorm, h4, norm_nonneg ((x : ℂ) + (y : ℂ) * I)] + +/-! ### The origin inequality -/ + +/-- **`(origin-exact)`.** The origin channel, in the form the reduction consumes. -/ +theorem origin_exact {n : ℕ} (hn : 5 ≤ n) {a x y α : ℝ} {z q : Multiset ℂ} + (ha0 : 0 < a) (ha1 : a < 1) + (hqcard : q.card = n - 1) (hq0 : q ≠ 0) + (hz1 : ∀ w ∈ z, ‖w‖ ≤ 1) (hq1 : ∀ v ∈ q, ‖v‖ ≤ 1) + (hxy : q.sum = ((n : ℂ) - 1) * ((x : ℂ) + (y : ℂ) * I)) + (hcent : ((n : ℂ) - 1) * ((a : ℂ) + z.sum) = (n : ℂ) * (q.map (fun v => (a : ℂ) - v⁻¹)).sum) + (hfirst : (n : ℂ) * ∫ t in (0 : ℝ)..1, Fprod a q t = (-1) ^ (n - 1) * q.prod * z.prod) + (hsecond : (n : ℂ) * (q.map (fun v => 1 - (a : ℂ) * v)).prod + = (-1) ^ (n - 1) * q.prod * (z.prod + (a : ℂ) * sumEraseProd z)) + (hα : α = M n * (1 - a ^ 2) / 2) : + 2 * α + a * x ≤ (1 - x ^ 2) / (2 * M n) + + a ^ 2 * n * M n * ∫ t in (0 : ℝ)..1, t * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2) := by + have hn2 : 2 ≤ n := by omega + have hnR : (5 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + have hn1 : (0 : ℝ) < (n : ℝ) - 1 := by linarith + have hnpos : (0 : ℝ) < (n : ℝ) := by linarith + obtain ⟨hxre, hx2⟩ := xy_bounds hn2 hqcard hq1 hxy + have hxle : x ≤ 1 := by nlinarith [hx2, sq_nonneg y] + -- the triangle inequality `(tri)` and the defect estimate + have htri := one_le_tri hn2 hqcard hq0 hq1 (le_of_lt ha0) hxre hxy + have hJ := Jsum_estimate (n := n) hn2 (a := a) (x := x) (y := y) hqcard hz1 hq1 hcent hxy + -- `(f1aq)` + have hF1 : Fprod a q 1 = (q.map (fun v => 1 - (a : ℂ) * v)).prod := by + simp only [Fprod, Complex.ofReal_one, mul_one] + have hsecond' : (n : ℂ) * Fprod a q 1 + = (-1) ^ (n - 1) * q.prod * (z.prod + (a : ℂ) * sumEraseProd z) := by + rw [hF1]; exact hsecond + have hf1aq : (n : ℂ) * (Fprod a q 1 + + ((n : ℂ) - 1) * (a : ℂ) * ((x : ℂ) + (y : ℂ) * I) * ∫ t in (0 : ℝ)..1, Fprod a q t) + = (-1) ^ (n - 1) * ((q.prod * z.prod) * Worigin n a x y + + (a : ℂ) * (q.prod * sumEraseProd z + - ((a : ℂ) * ((n : ℂ) - 1) - (n : ℂ) * ((x : ℂ) + (y : ℂ) * I)) + * (q.prod * z.prod))) := by + simp only [Worigin] + linear_combination hsecond' + ((n : ℂ) - 1) * (a : ℂ) * ((x : ℂ) + (y : ℂ) * I) * hfirst + -- `(tri-2)` + have hsign : ‖((-1 : ℂ)) ^ (n - 1)‖ = 1 := by + rw [norm_pow, norm_neg, norm_one, one_pow] + have hnn : ‖(n : ℂ)‖ = (n : ℝ) := by simp + have hana : ‖(a : ℂ)‖ = a := by + rw [Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (le_of_lt ha0)] + have hPJ0 : (0 : ℝ) ≤ ‖q.prod‖ * ‖z.prod‖ := by positivity + have hPJ1 : ‖q.prod‖ * ‖z.prod‖ ≤ 1 := by + have h1 : ‖q.prod‖ ≤ 1 := norm_prod_le_one q hq1 + have h2 : ‖z.prod‖ ≤ 1 := norm_prod_le_one z hz1 + nlinarith [norm_nonneg q.prod, norm_nonneg z.prod] + have hstep1 : (n : ℝ) * ‖Fprod a q 1 + + ((n : ℂ) - 1) * (a : ℂ) * ((x : ℂ) + (y : ℂ) * I) * ∫ t in (0 : ℝ)..1, Fprod a q t‖ + ≤ ‖q.prod‖ * ‖z.prod‖ * ‖Worigin n a x y‖ + + a * ((n : ℝ) / ((n : ℝ) - 1)) * (1 - (‖q.prod‖ * ‖z.prod‖) ^ 2) := by + have h := congrArg norm hf1aq + rw [norm_mul, hnn, norm_mul, hsign, one_mul] at h + rw [h] + refine (norm_add_le _ _).trans ?_ + simp only [norm_mul, hana] + have hmul := mul_le_mul_of_nonneg_left hJ (le_of_lt ha0) + linarith [hmul] + -- `(grow)` collapses `|J|` to `1`, giving `(tri-3)` + have hgrow := grow (n := n) hn (a := a) (x := x) (y := y) ha0 hxle + have hcoll : ‖q.prod‖ * ‖z.prod‖ * ‖Worigin n a x y‖ + + a * ((n : ℝ) / ((n : ℝ) - 1)) * (1 - (‖q.prod‖ * ‖z.prod‖) ^ 2) + ≤ ‖Worigin n a x y‖ := by + have hc : 2 * (a * ((n : ℝ) / ((n : ℝ) - 1))) ≤ ‖Worigin n a x y‖ := by + have he : 2 * (a * ((n : ℝ) / ((n : ℝ) - 1))) = 2 * a * (n : ℝ) / ((n : ℝ) - 1) := by ring + rw [he]; exact hgrow + have hcnn : (0 : ℝ) ≤ a * ((n : ℝ) / ((n : ℝ) - 1)) := by positivity + exact collapse_J hPJ1 hcnn hc + have htri3 : (n : ℝ) ≤ ‖Worigin n a x y‖ + + (n : ℝ) * (a ^ 2 * ((n : ℝ) - 1) + * ∫ t in (0 : ℝ)..1, t * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2)) := by + have h := mul_le_mul_of_nonneg_left htri (le_of_lt hnpos) + linarith [h, hstep1, hcoll] + -- eliminate `y`, and assemble + have hWle := norm_Worigin_le (n := n) (y := y) ha0 ha1 hn1 hxle (by linarith [hx2]) + simp only [M] at hα ⊢ + linarith [htri3, hWle, hα] + +end Sendov diff --git a/LeanPool/Sendov/Analytic/Polar.lean b/LeanPool/Sendov/Analytic/Polar.lean new file mode 100644 index 0000000000..d7c0db8d44 --- /dev/null +++ b/LeanPool/Sendov/Analytic/Polar.lean @@ -0,0 +1,293 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Counterexample.Identities +public import LeanPool.Sendov.Analytic.Maclaurin +public import LeanPool.Sendov.Reduction.Setup + +/-! +# The polar inequality, up to the branch point + +The polar identity says + + `(∏ q) ∏ⱼ (1 - a zⱼ) = n ∫₀¹ ∏ⱼ (t(1-a²)qⱼ + a) dt`, `(∏ q) ∏ⱼ (a - zⱼ) = n`. + +The Möbius estimate `|a - zⱼ| ≤ |1 - a zⱼ|`, valid because `zⱼ` lies in the closed unit disk +and `a` is real with `|a| ≤ 1`, therefore gives + + `n = |(∏ q) ∏ (a - zⱼ)| ≤ |(∏ q) ∏ (1 - a zⱼ)| = n |∫₀¹ ∏ⱼ (t(1-a²)qⱼ + a) dt|`, + +and after the integral triangle inequality + + `1 ≤ ∫₀¹ ∏ⱼ |a + t(1-a²)qⱼ| dt`. (⋆) + +**`(⋆)` is the branch point of the whole argument.** The high-degree route relaxes it by +AM–GM into the raw polar inequality `(1Q)` of `Sendov.Reduction.Setup`; the low-degree route +for `2 ≤ n ≤ 5` (see `docs/plan-low-degrees.md`) instead bounds each factor by `a + (1-a²)t` +and integrates a quartic. Neither may be folded into the other, so `(⋆)` is stated on its own. + +Note that no division occurs anywhere: splitting the blog post's quotient +`∏(1-azⱼ)/(a-zⱼ)` into its numerator and denominator identities is what makes that possible, +and `p'(a) ≠ 0` is never needed. + +## Main statements + +* `Sendov.norm_sub_le_norm_one_sub_mul`: the Möbius estimate; +* `Sendov.one_le_integral_prod_norm`: the branch point `(⋆)`. +-/ + +@[expose] public section + +namespace Sendov + +open Polynomial MeasureTheory + +/-! ### The Möbius estimate -/ + +/-- `|a - z| ≤ |1 - a z|` for real `a` with `|a| ≤ 1` and `z` in the closed unit disk. The +difference of squares is `(1-a²)(1-|z|²)`, which is why `a` must be real: for complex `a` the +cross terms contribute `(conj a - a)(z - conj z)`, which need not vanish. -/ +lemma norm_sub_le_norm_one_sub_mul {a : ℝ} (ha : |a| ≤ 1) {z : ℂ} (hz : ‖z‖ ≤ 1) : + ‖(a : ℂ) - z‖ ≤ ‖1 - (a : ℂ) * z‖ := by + have hkey : Complex.normSq (1 - (a : ℂ) * z) - Complex.normSq ((a : ℂ) - z) + = (1 - a ^ 2) * (1 - Complex.normSq z) := by + simp only [Complex.normSq_apply, Complex.sub_re, Complex.sub_im, Complex.mul_re, + Complex.mul_im, Complex.one_re, Complex.one_im, Complex.ofReal_re, Complex.ofReal_im] + ring + have ha2 : a ^ 2 ≤ 1 := by + have := abs_le.1 ha + nlinarith [this.1, this.2] + have hz2 : Complex.normSq z ≤ 1 := by + rw [Complex.normSq_eq_norm_sq] + nlinarith [norm_nonneg z] + have hdiff : 0 ≤ Complex.normSq (1 - (a : ℂ) * z) - Complex.normSq ((a : ℂ) - z) := by + rw [hkey] + have h1 : (0 : ℝ) ≤ 1 - a ^ 2 := by linarith + have h2 : (0 : ℝ) ≤ 1 - Complex.normSq z := by linarith + positivity + have hsq : ‖(a : ℂ) - z‖ ^ 2 ≤ ‖1 - (a : ℂ) * z‖ ^ 2 := by + rw [← Complex.normSq_eq_norm_sq, ← Complex.normSq_eq_norm_sq] + linarith + nlinarith [norm_nonneg ((a : ℂ) - z), norm_nonneg (1 - (a : ℂ) * z), hsq] + +/-! ### Products of norms over a multiset -/ + +lemma norm_multiset_prod (s : Multiset ℂ) : ‖s.prod‖ = (s.map (fun w => ‖w‖)).prod := by + induction s using Multiset.induction_on with + | empty => simp + | cons w t ih => simp [ih] + +lemma prod_map_le_of_le {s : Multiset ℂ} {f g : ℂ → ℂ} (h : ∀ w ∈ s, ‖f w‖ ≤ ‖g w‖) : + (s.map (fun w => ‖f w‖)).prod ≤ (s.map (fun w => ‖g w‖)).prod := by + induction s using Multiset.induction_on with + | empty => simp + | cons w t ih => + have hw := h w (Multiset.mem_cons_self w t) + have ht : ∀ u ∈ t, ‖f u‖ ≤ ‖g u‖ := fun u hu => h u (Multiset.mem_cons_of_mem hu) + have hnn : (0 : ℝ) ≤ (t.map (fun u => ‖f u‖)).prod := + Multiset.prod_nonneg (by + intro y hy + obtain ⟨u, _, rfl⟩ := Multiset.mem_map.1 hy + exact norm_nonneg _) + simp only [Multiset.map_cons, Multiset.prod_cons] + exact mul_le_mul hw (ih ht) hnn (norm_nonneg _) + +/-! ### The branch point -/ + +/-- Norms distribute over a mapped multiset product. -/ +lemma norm_prod_map (s : Multiset ℂ) (f : ℂ → ℂ) : + ‖(s.map f).prod‖ = (s.map (fun w => ‖f w‖)).prod := by + rw [norm_multiset_prod, Multiset.map_map] + rfl + +lemma prod_map_norm_nonneg (s : Multiset ℂ) (f : ℂ → ℂ) : + 0 ≤ (s.map (fun w => ‖f w‖)).prod := by + refine Multiset.prod_nonneg ?_ + intro y hy + obtain ⟨u, _, rfl⟩ := Multiset.mem_map.1 hy + exact norm_nonneg _ + +/-- **The branch point `(⋆)`.** `1 ≤ ∫₀¹ ∏ⱼ |a + t(1-a²)qⱼ| dt`. + +The high-degree argument relaxes this by AM–GM to the raw polar inequality; the low-degree +argument bounds each factor by `a + (1-a²)t`. It is stated separately so that neither route +has to reproduce the other's work. -/ +theorem one_le_integral_prod_norm {n : ℕ} (hn : 2 ≤ n) {a : ℝ} (ha : |a| ≤ 1) + {z q : Multiset ℂ} (hz : ∀ w ∈ z, ‖w‖ ≤ 1) + (hpolar : q.prod * (z.map (fun w => 1 - (a : ℂ) * w)).prod + = (n : ℂ) * ∫ t in (0 : ℝ)..1, + (q.map (fun v => (a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v)).prod) + (hdenom : q.prod * (z.map (fun w => (a : ℂ) - w)).prod = (n : ℂ)) : + 1 ≤ ∫ t in (0 : ℝ)..1, + (q.map (fun v => ‖(a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v‖)).prod := by + have hnpos : (0 : ℝ) < (n : ℝ) := by + have : (0 : ℕ) < n := by omega + exact_mod_cast this + -- the Möbius estimate, multiplied over the multiset + have hmob : (z.map (fun w => ‖(a : ℂ) - w‖)).prod + ≤ (z.map (fun w => ‖1 - (a : ℂ) * w‖)).prod := + prod_map_le_of_le (fun w hw => norm_sub_le_norm_one_sub_mul ha (hz w hw)) + -- take norms in the two identities + have h1 : (n : ℝ) = ‖q.prod‖ * (z.map (fun w => ‖(a : ℂ) - w‖)).prod := by + have := congrArg (fun w : ℂ => ‖w‖) hdenom + simpa [norm_mul, norm_prod_map] using this.symm + have h2 : ‖q.prod‖ * (z.map (fun w => ‖1 - (a : ℂ) * w‖)).prod + = (n : ℝ) * ‖∫ t in (0 : ℝ)..1, + (q.map (fun v => (a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v)).prod‖ := by + have := congrArg (fun w : ℂ => ‖w‖) hpolar + simpa [norm_mul, norm_prod_map] using this + -- so the integral has norm at least one + have h3 : (1 : ℝ) ≤ ‖∫ t in (0 : ℝ)..1, + (q.map (fun v => (a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v)).prod‖ := by + have hstep : (n : ℝ) ≤ (n : ℝ) * ‖∫ t in (0 : ℝ)..1, + (q.map (fun v => (a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v)).prod‖ := by + rw [← h2, h1] + exact mul_le_mul_of_nonneg_left hmob (norm_nonneg _) + nlinarith [hstep, hnpos] + -- and the triangle inequality moves the norm inside + refine h3.trans ?_ + refine (intervalIntegral.norm_integral_le_integral_norm (by norm_num)).trans_eq ?_ + refine intervalIntegral.integral_congr ?_ + intro t _ + simp only [] + exact norm_prod_map q _ + +/-! ### The AM–GM relaxation to `(1Q)` -/ + +/-- `‖a + s v‖² = a² + 2 a s Re v + s² ‖v‖²` for real `a`, `s`. -/ +lemma norm_sq_add_real_mul (a s : ℝ) (v : ℂ) : + ‖(a : ℂ) + (s : ℂ) * v‖ ^ 2 = a ^ 2 + 2 * a * s * v.re + s ^ 2 * ‖v‖ ^ 2 := by + rw [← Complex.normSq_eq_norm_sq, ← Complex.normSq_eq_norm_sq] + simp only [Complex.normSq_apply, Complex.add_re, Complex.add_im, Complex.mul_re, + Complex.mul_im, Complex.ofReal_re, Complex.ofReal_im] + ring + +lemma prod_map_sq (s : Multiset ℂ) (f : ℂ → ℝ) : + (s.map (fun v => f v ^ 2)).prod = ((s.map f).prod) ^ 2 := by + induction s using Multiset.induction_on with + | empty => simp + | cons v t ih => + simp only [Multiset.map_cons, Multiset.prod_cons, ih] + ring + +/-- Splitting `∑ⱼ ‖a + s qⱼ‖²` into its three pieces. -/ +lemma sum_norm_sq_split (a s : ℝ) (q : Multiset ℂ) : + (q.map (fun v => ‖(a : ℂ) + (s : ℂ) * v‖ ^ 2)).sum + = (q.card : ℝ) * a ^ 2 + 2 * a * s * ((q.map (fun v => v.re)).sum) + + s ^ 2 * ((q.map (fun v => ‖v‖ ^ 2)).sum) := by + induction q using Multiset.induction_on with + | empty => simp + | cons v t ih => + simp only [Multiset.map_cons, Multiset.sum_cons, Multiset.card_cons] + rw [ih, norm_sq_add_real_mul] + push_cast + ring + +lemma sum_norm_sq_le_card (q : Multiset ℂ) (hq1 : ∀ v ∈ q, ‖v‖ ≤ 1) : + (q.map (fun v => ‖v‖ ^ 2)).sum ≤ (q.card : ℝ) := by + induction q using Multiset.induction_on with + | empty => simp + | cons v t ih => + have hv := hq1 v (Multiset.mem_cons_self v t) + have ht : ∀ u ∈ t, ‖u‖ ≤ 1 := fun u hu => hq1 u (Multiset.mem_cons_of_mem hu) + simp only [Multiset.map_cons, Multiset.sum_cons, Multiset.card_cons] + push_cast + nlinarith [ih ht, norm_nonneg v] + +lemma continuous_prod_norm (a : ℝ) (q : Multiset ℂ) : + Continuous fun t : ℝ => + (q.map (fun v => ‖(a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v‖)).prod := by + induction q using Multiset.induction_on with + | empty => simpa using continuous_const + | cons v t ih => + simp only [Multiset.map_cons, Multiset.prod_cons] + exact (by fun_prop : Continuous fun t : ℝ => + ‖(a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v‖).mul ih + +/-- **The pointwise quadratic-mean bound.** `∏ⱼ |a + t(1-a²)qⱼ| ≤ P(t)^{(n-1)/2)}`, by AM–GM +on the squares followed by `∑ ‖qⱼ‖² ≤ n-1`. -/ +lemma prod_norm_le_Ppolar {n : ℕ} (hn : 2 ≤ n) {a x t : ℝ} + {q : Multiset ℂ} (hqcard : q.card = n - 1) (hq1 : ∀ v ∈ q, ‖v‖ ≤ 1) + (hx : (q.map (fun v => v.re)).sum = ((n : ℝ) - 1) * x) : + (q.map (fun v => ‖(a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v‖)).prod + ≤ Ppolar a x t ^ (((n : ℝ) - 1) / 2) := by + have hNcast : ((q.card : ℕ) : ℝ) = (n : ℝ) - 1 := by + rw [hqcard] + have h1 : (1 : ℕ) ≤ n := by omega + push_cast [Nat.cast_sub h1] + ring + have hNpos : (0 : ℝ) < (q.card : ℕ) := by + rw [hNcast] + have : (2 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + linarith + set s : ℝ := t * (1 - a ^ 2) with hs + have hcast : ∀ v : ℂ, (a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v = (a : ℂ) + (s : ℂ) * v := by + intro v + rw [hs] + push_cast + ring + simp only [hcast] + -- the product of squares + set P : ℝ := (q.map (fun v => ‖(a : ℂ) + (s : ℂ) * v‖)).prod with hP + have hP0 : 0 ≤ P := prod_map_norm_nonneg q _ + have hM0 : ∀ v ∈ q, (0 : ℝ) ≤ ‖(a : ℂ) + (s : ℂ) * v‖ ^ 2 := fun v _ => sq_nonneg _ + have hamgm := Multiset.prod_le_mean_pow (q.map (fun v => ‖(a : ℂ) + (s : ℂ) * v‖ ^ 2)) + (by + intro y hy + obtain ⟨v, _, rfl⟩ := Multiset.mem_map.1 hy + exact sq_nonneg _) + rw [Multiset.card_map, prod_map_sq] at hamgm + set M : ℝ := (q.map (fun v => ‖(a : ℂ) + (s : ℂ) * v‖ ^ 2)).sum / (q.card : ℝ) with hM + -- `M ≤ P(t)` + have hMle : M ≤ Ppolar a x t := by + rw [hM, div_le_iff₀ hNpos] + have hsplit := sum_norm_sq_split a s q + have hcard2 := sum_norm_sq_le_card q hq1 + rw [hsplit, hx, hNcast] + have hPp : Ppolar a x t = a ^ 2 + 2 * a * s * x + s ^ 2 := by + rw [Ppolar, hs]; ring + rw [hPp] + nlinarith [hcard2, hNcast, sq_nonneg s, hNpos] + have hM0' : 0 ≤ M := by + rw [hM] + apply div_nonneg _ (le_of_lt hNpos) + exact Multiset.sum_nonneg (by + intro y hy + obtain ⟨v, _, rfl⟩ := Multiset.mem_map.1 hy + exact sq_nonneg _) + -- take square roots + have hexp : ((q.card : ℕ) : ℝ) / 2 = ((n : ℝ) - 1) / 2 := by rw [hNcast] + have hb : (0 : ℝ) ≤ Ppolar a x t := le_trans hM0' hMle + have hsq : (Ppolar a x t ^ (((n : ℝ) - 1) / 2)) ^ 2 = Ppolar a x t ^ (q.card : ℕ) := by + rw [← Real.rpow_natCast (Ppolar a x t ^ (((n : ℝ) - 1) / 2)) 2, ← Real.rpow_mul hb, + ← Real.rpow_natCast (Ppolar a x t) q.card, hNcast] + congr 1 + push_cast + ring + have hchain : P ^ 2 ≤ Ppolar a x t ^ (q.card : ℕ) := by + refine hamgm.trans ?_ + exact pow_le_pow_left₀ hM0' hMle _ + rw [← hsq] at hchain + nlinarith [hchain, hP0, Real.rpow_nonneg (le_trans hM0' hMle) (((n : ℝ) - 1) / 2)] + +/-- **The raw polar inequality `(1Q)`.** -/ +theorem one_le_integral_Ppolar {n : ℕ} (hn : 2 ≤ n) {a x : ℝ} + {q : Multiset ℂ} (hqcard : q.card = n - 1) (hq1 : ∀ v ∈ q, ‖v‖ ≤ 1) + (hx : (q.map (fun v => v.re)).sum = ((n : ℝ) - 1) * x) + (hstar : 1 ≤ ∫ t in (0 : ℝ)..1, + (q.map (fun v => ‖(a : ℂ) + (t : ℂ) * (1 - (a : ℂ) ^ 2) * v‖)).prod) : + 1 ≤ ∫ t in (0 : ℝ)..1, Ppolar a x t ^ (((n : ℝ) - 1) / 2) := by + have he : (0 : ℝ) ≤ ((n : ℝ) - 1) / 2 := by + have : (2 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + linarith + refine hstar.trans (intervalIntegral.integral_mono_on (by norm_num) + ((continuous_prod_norm a q).intervalIntegrable _ _) + (((continuous_rpow_const he).comp (continuous_Ppolar a x)).intervalIntegrable _ _) ?_) + intro u _ + exact prod_norm_le_Ppolar hn hqcard hq1 hx + +end Sendov diff --git a/LeanPool/Sendov/Boundary.lean b/LeanPool/Sendov/Boundary.lean new file mode 100644 index 0000000000..2b5f22f5b2 --- /dev/null +++ b/LeanPool/Sendov/Boundary.lean @@ -0,0 +1,340 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Counterexample.Factor +public import LeanPool.Sendov.Counterexample.Identities +public import LeanPool.Sendov.Analytic.Jsum + +/-! +# Rubinstein's boundary theorem, at the zero `a = 1` + +If `p` has degree `n ≥ 2`, all zeroes in the closed unit disk, and `p(1) = 0`, then `p'` has a +zero strictly inside `D(1,1)` **unless** `p = c(Xⁿ - 1)`. + +The polar identity is useless here: at `a = 1` the reflected point `1/a` coincides with `a`, +`1 - a² = 0`, and the identity degenerates. One elementary identity replaces it, obtained from +`p''(1)/p'(1)`. Writing `p = c(X-1)Q` and `p' = ncR`, evaluation at `1` gives + + `Q(1) = n R(1)` and `2 Q'(1) = n R'(1)` + +— the factor `2` coming from `p''(1) = 2Q'(1)` — whence the **boundary reciprocal identity** + + `∑ⱼ qⱼ = 2 ∑ⱼ 1/(1 - zⱼ)`, `qⱼ = 1/(1 - wⱼ)`. + +Both sides are then sandwiched. On the left `Re qⱼ ≤ ‖qⱼ‖ ≤ 1`, so the real part is at most +`n-1`; on the right `Re 1/(1-z) ≥ 1/2` for `‖z‖ ≤ 1`, because +`Re 1/(1-z) - 1/2 = (1-‖z‖²)/(2‖1-z‖²)`, so the real part is at least `n-1`. Equality forces +`Re qⱼ = 1` for every `j`, hence `qⱼ = 1`, hence every critical point is `0`, hence +`p' = n c Xⁿ⁻¹` and `p = c(Xⁿ - 1)`. + +The repeated-root case is handled before any division: if `1` is a multiple zero then `p'(1) = 0` +and `ζ = 1` is a strict witness, so under the contradiction hypothesis `p'(1) ≠ 0` and every +`zⱼ ≠ 1`. + +No polar integral, origin identity, defect lemma, numerical certificate or Gauss–Lucas theorem +is used. Only the two factorizations of `Sendov.Counterexample.Factor` are shared with the +interior argument. + +## Main statements + +* `Sendov.rubinstein_one`: the strict-or-extremal alternative; +* `Sendov.sendov_boundary_one`: the closed-disk form, `‖ζ - 1‖ ≤ 1`; +* `Sendov.boundary_reciprocal`: `(BR)`, in division-free form. +-/ + +@[expose] public section + +namespace Sendov + +open Polynomial + +/-! ### Evaluating `∏ⱼ (X - zⱼ)` and its derivative at a point + +The versions in `Sendov.Counterexample.Identities` are specialized to the origin; the boundary +argument needs them at `1`. -/ + +lemma eval_prod_at (u : ℂ) (s : Multiset ℂ) : + ((s.map (fun w => X - C w)).prod).eval u = (s.map (fun w => u - w)).prod := by + rw [eval_multiset_prod, Multiset.map_map] + exact congrArg Multiset.prod (Multiset.map_congr rfl fun w _ => by simp) + +lemma eval_deriv_prod_at (u : ℂ) : ∀ (s : Multiset ℂ), + (derivative (s.map (fun w => X - C w)).prod).eval u + = sumEraseProd (s.map (fun w => u - w)) := by + intro s + induction s using Multiset.induction_on with + | empty => simp + | cons v t ih => + simp only [Multiset.map_cons, Multiset.prod_cons, derivative_mul, derivative_sub, + derivative_X, derivative_C, sub_zero, one_mul, eval_add, eval_mul, eval_sub, eval_X, + eval_C] + rw [ih, eval_prod_at, sumEraseProd_cons] + +/-! ### Scalar facts -/ + +/-- **The disk inequality.** `Re 1/(1-z) ≥ 1/2` for `‖z‖ ≤ 1`, `z ≠ 1`; after clearing the +positive denominator this is exactly `1 - ‖z‖² ≥ 0`. -/ +lemma half_le_re_inv_one_sub {z : ℂ} (hz : ‖z‖ ≤ 1) (hz1 : z ≠ 1) : + (1 : ℝ) / 2 ≤ (((1 : ℂ) - z)⁻¹).re := by + have hne : (1 : ℂ) - z ≠ 0 := sub_ne_zero.2 (Ne.symm hz1) + have hd : 0 < Complex.normSq ((1 : ℂ) - z) := Complex.normSq_pos.2 hne + have hsq : z.re ^ 2 + z.im ^ 2 ≤ 1 := by + have h := Complex.normSq_eq_norm_sq z + rw [Complex.normSq_apply] at h + nlinarith [hz, norm_nonneg z, h] + rw [Complex.inv_re, le_div_iff₀ hd, Complex.normSq_apply] + simp only [Complex.sub_re, Complex.sub_im, Complex.one_re, Complex.one_im] + nlinarith [hsq] + +/-- A point of the closed unit disk with real part `1` is `1`. -/ +lemma eq_one_of_re_eq_one_of_norm_le_one {v : ℂ} (hre : v.re = 1) (hv : ‖v‖ ≤ 1) : v = 1 := by + have hsq : v.re ^ 2 + v.im ^ 2 ≤ 1 := by + have h := Complex.normSq_eq_norm_sq v + rw [Complex.normSq_apply] at h + nlinarith [hv, norm_nonneg v, h] + have him : v.im = 0 := by nlinarith [hsq, hre, sq_nonneg v.im] + apply Complex.ext <;> simp [hre, him] + +/-- A multiset of nonnegative reals summing to zero is all zeroes. -/ +lemma eq_zero_of_sum_eq_zero {s : Multiset ℝ} (hs : ∀ x ∈ s, 0 ≤ x) (h : s.sum = 0) : + ∀ x ∈ s, x = 0 := by + intro x hx + have hsplit : s.sum = x + (s.erase x).sum := by + conv_lhs => rw [← Multiset.cons_erase hx] + rw [Multiset.sum_cons] + have hrest : 0 ≤ (s.erase x).sum := + Multiset.sum_nonneg fun y hy => hs y (Multiset.mem_of_mem_erase hy) + rw [hsplit] at h + have := hs x hx + linarith + +lemma sum_le_card_mul (c : ℝ) : ∀ (s : Multiset ℝ), (∀ x ∈ s, x ≤ c) → + s.sum ≤ (s.card : ℝ) * c := by + intro s + induction s using Multiset.induction_on with + | empty => intro _; simp + | cons v t ih => + intro h + have hv := h v (Multiset.mem_cons_self v t) + have ht : ∀ x ∈ t, x ≤ c := fun x hx => h x (Multiset.mem_cons_of_mem hx) + simp only [Multiset.sum_cons, Multiset.card_cons] + push_cast + linarith [ih ht] + +lemma card_mul_le_sum (c : ℝ) : ∀ (s : Multiset ℝ), (∀ x ∈ s, c ≤ x) → + (s.card : ℝ) * c ≤ s.sum := by + intro s + induction s using Multiset.induction_on with + | empty => intro _; simp + | cons v t ih => + intro h + have hv := h v (Multiset.mem_cons_self v t) + have ht : ∀ x ∈ t, c ≤ x := fun x hx => h x (Multiset.mem_cons_of_mem hx) + simp only [Multiset.sum_cons, Multiset.card_cons] + push_cast + linarith [ih ht] + +lemma sum_map_one_sub_re (s : Multiset ℂ) : + (s.map (fun v => 1 - v.re)).sum = (s.card : ℝ) - (s.map (fun v => v.re)).sum := by + induction s using Multiset.induction_on with + | empty => simp + | cons v t ih => + simp only [Multiset.map_cons, Multiset.sum_cons, Multiset.card_cons, ih] + push_cast + ring + +/-! ### The boundary reciprocal identity -/ + +/-- **`(BR)`, in division-free form.** From `∏ Zs = n ∏ Qi` and `2 ∑ₑ Zs = n ∑ₑ Qi` — the two +readings of `p'(1)` and `p''(1)` — one gets `∑ⱼ 1/Qiⱼ = 2 ∑ⱼ 1/Zsⱼ`. Applied with +`Zsⱼ = 1 - zⱼ` and `Qiⱼ = 1/qⱼ` this is `∑ⱼ qⱼ = 2 ∑ⱼ 1/(1-zⱼ)`. -/ +theorem boundary_reciprocal {n : ℕ} {Zs Qi : Multiset ℂ} (hn0 : (n : ℂ) ≠ 0) + (hZ : ∀ u ∈ Zs, u ≠ 0) (hQ : ∀ u ∈ Qi, u ≠ 0) + (hI : Zs.prod = (n : ℂ) * Qi.prod) + (hII : 2 * sumEraseProd Zs = (n : ℂ) * sumEraseProd Qi) : + (Qi.map (fun u => u⁻¹)).sum = 2 * (Zs.map (fun u => u⁻¹)).sum := by + have hQ0 : Qi.prod ≠ 0 := Multiset.prod_ne_zero fun h => hQ 0 h rfl + have h1 := prod_mul_sum_inv Zs hZ + have h2 := prod_mul_sum_inv Qi hQ + have h : (n : ℂ) * Qi.prod * (2 * (Zs.map (fun u => u⁻¹)).sum) + = (n : ℂ) * Qi.prod * (Qi.map (fun u => u⁻¹)).sum := by + linear_combination (-2 * (Zs.map (fun u => u⁻¹)).sum) * hI + 2 * h1 + hII - (n : ℂ) * h2 + exact (mul_left_cancel₀ (mul_ne_zero hn0 hQ0) h).symm + +/-! ### The sandwich -/ + +/-- Both sides of `(BR)` are pinned: the left has real part at most `N`, the right at least `N`, +so every `qⱼ` has real part `1` and hence, lying in the closed unit disk, equals `1`. -/ +theorem all_q_eq_one {N : ℕ} {qs zs : Multiset ℂ} + (hqcard : qs.card = N) (hzcard : zs.card = N) + (hq1 : ∀ v ∈ qs, ‖v‖ ≤ 1) (hz1 : ∀ w ∈ zs, ‖w‖ ≤ 1) (hzne : ∀ w ∈ zs, w ≠ 1) + (hBR : qs.sum = 2 * (zs.map (fun w => ((1 : ℂ) - w)⁻¹)).sum) : + ∀ v ∈ qs, v = 1 := by + have hupper : (qs.map (fun v => v.re)).sum ≤ (N : ℝ) := by + have h := sum_le_card_mul 1 (qs.map (fun v => v.re)) (by + intro r hr + obtain ⟨v, hv, rfl⟩ := Multiset.mem_map.1 hr + exact (Complex.re_le_norm v).trans (hq1 v hv)) + rwa [Multiset.card_map, hqcard, mul_one] at h + have hlower : (N : ℝ) ≤ (qs.map (fun v => v.re)).sum := by + have h := card_mul_le_sum (1 / 2) (zs.map (fun w => (((1 : ℂ) - w)⁻¹).re)) (by + intro r hr + obtain ⟨w, hw, rfl⟩ := Multiset.mem_map.1 hr + exact half_le_re_inv_one_sub (hz1 w hw) (hzne w hw)) + rw [Multiset.card_map, hzcard] at h + have hmapre : (zs.map (fun w => (((1 : ℂ) - w)⁻¹).re)).sum + = (zs.map (fun w => ((1 : ℂ) - w)⁻¹)).sum.re := by + rw [← sum_map_re, Multiset.map_map] + rfl + have hre : (qs.map (fun v => v.re)).sum + = 2 * (zs.map (fun w => (((1 : ℂ) - w)⁻¹).re)).sum := by + rw [sum_map_re, hBR, hmapre, Complex.mul_re] + simp + rw [hre] + linarith + have heq : (qs.map (fun v => 1 - v.re)).sum = 0 := by + rw [sum_map_one_sub_re, hqcard] + linarith + intro v hv + refine eq_one_of_re_eq_one_of_norm_le_one ?_ (hq1 v hv) + have hzero := eq_zero_of_sum_eq_zero (s := qs.map (fun v => 1 - v.re)) (by + intro r hr + obtain ⟨u, hu, rfl⟩ := Multiset.mem_map.1 hr + have := (Complex.re_le_norm u).trans (hq1 u hu) + linarith) heq (1 - v.re) (Multiset.mem_map_of_mem _ hv) + linarith + +/-! ### Rubinstein's theorem at `a = 1` -/ + +/-- **Rubinstein's boundary theorem at `a = 1`**, with its equality case. -/ +theorem rubinstein_one {n : ℕ} (hn : 2 ≤ n) {p : ℂ[X]} (hdeg : p.natDegree = n) + (hroots : ∀ w ∈ p.roots, ‖w‖ ≤ 1) (hp1 : p.eval 1 = 0) : + (∃ ζ : ℂ, (derivative p).eval ζ = 0 ∧ ‖ζ - 1‖ < 1) + ∨ p = C p.leadingCoeff * (X ^ n - 1) := by + by_cases hex : ∃ ζ : ℂ, (derivative p).eval ζ = 0 ∧ ‖ζ - 1‖ < 1 + · exact Or.inl hex + refine Or.inr ?_ + have hcrit : ∀ w : ℂ, (derivative p).eval w = 0 → 1 ≤ ‖w - 1‖ := by + intro w hw + by_contra hlt + exact hex ⟨w, hw, not_le.1 hlt⟩ + have hpne : p ≠ 0 := by + intro h + rw [h, natDegree_zero] at hdeg + omega + have hc0 : p.leadingCoeff ≠ 0 := leadingCoeff_ne_zero.2 hpne + have hn0 : (n : ℂ) ≠ 0 := by + intro h + have h1 : n = 0 := by exact_mod_cast h + omega + obtain ⟨z, hzcard, hz1, hpz⟩ := exists_root_multiset (by omega : 1 ≤ n) hdeg hroots hp1 + obtain ⟨q, hqcard, hq1, hq0, hpq⟩ := exists_crit_multiset hn hdeg hcrit + have hpq' : derivative p = C ((n : ℂ) * p.leadingCoeff) + * ((q.map (fun v => (1 : ℂ) - v⁻¹)).map (fun u => X - C u)).prod := by + simp only [Multiset.map_map, Function.comp_def] + exact hpq + -- the repeated-root case is already excluded + have hp'1 : (derivative p).eval 1 ≠ 0 := fun h => hex ⟨1, h, by simp⟩ + -- `p'` and `p''` from `p = c (X-1) Q` + have hd1 : derivative p = C p.leadingCoeff + * ((z.map (fun w => X - C w)).prod + + (X - C 1) * derivative (z.map (fun w => X - C w)).prod) := by + conv_lhs => rw [hpz] + rw [derivative_C_mul, derivative_mul, derivative_sub, derivative_X, derivative_C, + sub_zero, one_mul] + have hd2 : derivative (derivative p) = C p.leadingCoeff + * (2 * derivative (z.map (fun w => X - C w)).prod + + (X - C 1) * derivative (derivative (z.map (fun w => X - C w)).prod)) := by + rw [hd1, derivative_C_mul, derivative_add, derivative_mul, derivative_sub, derivative_X, + derivative_C, sub_zero, one_mul] + ring + have hA : (derivative p).eval 1 = p.leadingCoeff * (z.map (fun w => (1 : ℂ) - w)).prod := by + rw [hd1] + simp [eval_prod_at] + have hB : (derivative (derivative p)).eval 1 + = p.leadingCoeff * (2 * sumEraseProd (z.map (fun w => (1 : ℂ) - w))) := by + rw [hd2] + simp [eval_deriv_prod_at] + -- `p'` and `p''` from `p' = n c R` + have hmapq : (q.map (fun v => (1 : ℂ) - v⁻¹)).map (fun u => (1 : ℂ) - u) + = q.map (fun v => v⁻¹) := by + rw [Multiset.map_map] + exact Multiset.map_congr rfl fun v _ => by simp + have hC : (derivative p).eval 1 + = (n : ℂ) * p.leadingCoeff * (q.map (fun v => v⁻¹)).prod := by + rw [hpq', eval_mul, eval_C, eval_prod_at, hmapq] + have hD : (derivative (derivative p)).eval 1 + = (n : ℂ) * p.leadingCoeff * sumEraseProd (q.map (fun v => v⁻¹)) := by + rw [hpq', derivative_C_mul, eval_mul, eval_C, eval_deriv_prod_at, hmapq] + -- the two relations, after cancelling the leading coefficient + have hI : (z.map (fun w => (1 : ℂ) - w)).prod = (n : ℂ) * (q.map (fun v => v⁻¹)).prod := by + refine mul_left_cancel₀ hc0 ?_ + have h := hA.symm.trans hC + linear_combination h + have hII : 2 * sumEraseProd (z.map (fun w => (1 : ℂ) - w)) + = (n : ℂ) * sumEraseProd (q.map (fun v => v⁻¹)) := by + refine mul_left_cancel₀ hc0 ?_ + have h := hB.symm.trans hD + linear_combination h + -- no `zⱼ` equals `1` + have hZ0 : (z.map (fun w => (1 : ℂ) - w)).prod ≠ 0 := by + intro h + exact hp'1 (by rw [hA, h, mul_zero]) + have hZne : ∀ u ∈ z.map (fun w => (1 : ℂ) - w), u ≠ 0 := by + intro u hu hu0 + exact hZ0 (Multiset.prod_eq_zero (hu0 ▸ hu)) + have hzne : ∀ w ∈ z, w ≠ 1 := by + intro w hw hw1 + exact hZne ((1 : ℂ) - w) (Multiset.mem_map_of_mem _ hw) (by rw [hw1]; ring) + have hQne : ∀ u ∈ q.map (fun v => v⁻¹), u ≠ 0 := by + intro u hu + obtain ⟨v, hv, rfl⟩ := Multiset.mem_map.1 hu + exact inv_ne_zero (hq0 v hv) + -- `(BR)` + have hBRraw := boundary_reciprocal (n := n) hn0 hZne hQne hI hII + have hQiinv : ((q.map (fun v => v⁻¹)).map (fun u => u⁻¹)).sum = q.sum := by + rw [Multiset.map_map] + simp + have hZsinv : (z.map (fun w => (1 : ℂ) - w)).map (fun u => u⁻¹) + = z.map (fun w => ((1 : ℂ) - w)⁻¹) := by + rw [Multiset.map_map] + rfl + rw [hQiinv, hZsinv] at hBRraw + -- every `qⱼ` is `1`, so every critical point is `0` + have hqone := all_q_eq_one hqcard hzcard hq1 hz1 hzne hBRraw + have hderivX : derivative p = C ((n : ℂ) * p.leadingCoeff) * X ^ (n - 1) := by + rw [hpq] + congr 1 + have hmap : q.map (fun v => X - C ((1 : ℂ) - v⁻¹)) + = Multiset.replicate q.card (X : ℂ[X]) := by + rw [← Multiset.map_const'] + exact Multiset.map_congr rfl fun v hv => by rw [hqone v hv]; simp + rw [hmap, Multiset.prod_replicate, hqcard] + -- hence `p - c Xⁿ` is constant + have hdz : derivative (p - C p.leadingCoeff * X ^ n) = 0 := by + rw [derivative_sub, hderivX, derivative_C_mul, derivative_X_pow, map_mul] + ring + have hdeg0 : (p - C p.leadingCoeff * X ^ n).natDegree = 0 := derivative_eq_zero.1 hdz + obtain ⟨d, hd⟩ := natDegree_eq_zero.1 hdeg0 + have hdval : d = -p.leadingCoeff := by + have h := congrArg (Polynomial.eval (1 : ℂ)) hd + simpa [hp1] using h + have hCd : (C d : ℂ[X]) = -C p.leadingCoeff := by rw [hdval, map_neg] + linear_combination -hd + hCd + +/-- The closed-disk form. In the extremal case `p = c(Xⁿ - 1)` the only critical point is `0`, +at distance exactly `1` from the zero `1`. -/ +theorem sendov_boundary_one {n : ℕ} (hn : 2 ≤ n) {p : ℂ[X]} (hdeg : p.natDegree = n) + (hroots : ∀ w ∈ p.roots, ‖w‖ ≤ 1) (hp1 : p.eval 1 = 0) : + ∃ ζ : ℂ, (derivative p).eval ζ = 0 ∧ ‖ζ - 1‖ ≤ 1 := by + rcases rubinstein_one hn hdeg hroots hp1 with ⟨ζ, hζ, hlt⟩ | hext + · exact ⟨ζ, hζ, le_of_lt hlt⟩ + refine ⟨0, ?_, by norm_num⟩ + rw [hext, derivative_C_mul, derivative_sub, derivative_X_pow, derivative_one] + simp [zero_pow (by omega : n - 1 ≠ 0)] + +end Sendov diff --git a/LeanPool/Sendov/Common/Basic.lean b/LeanPool/Sendov/Common/Basic.lean new file mode 100644 index 0000000000..3d07064288 --- /dev/null +++ b/LeanPool/Sendov/Common/Basic.lean @@ -0,0 +1,135 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Defs + +/-! +# Basic properties of the quantities in the finite-range claim + +Elementary facts about `Sendov.M`, `Sendov.A`, `Sendov.c` and `Sendov.Q`, used by every +degree-specific argument. The two facts that matter are: + +* `Sendov.Q_nonneg`: the feasibility constraint `c ^ 2 ≤ A` says exactly that `Q` is a sum + of squares, hence nonnegative. This is what makes the real power `Q ^ ((n-4)/2)` + appearing in `Sendov.R` behave, and in particular avoids the junk values of `Real.rpow` + at negative bases. +* `Sendov.Q_one`: `Q n α 1 = α / (3 + α)`, the value `B` prescribed by the simplified polar + inequality of the blog post. Since `Q n α 1 = 1 - 2 * c n α + A n α`, this pins down + `A - 2 * c = B - 1 < 0`, which is what gives `Sendov.Q_le_one`. +-/ + +@[expose] public section + +namespace Sendov + +variable {n : ℕ} {α t : ℝ} + +lemma M_pos (hn : 2 ≤ n) : 0 < M n := by + have : (2 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + simp only [M] + linarith + +lemma three_add_pos (hα : 0 ≤ α) : (0 : ℝ) < 3 + α := by linarith + +/-- `Q` written as a sum of squares. Compare `β(t) = (1 - a x t) ^ 2 + a² t² (1 - x²)` +in the blog post. -/ +lemma Q_eq (n : ℕ) (α t : ℝ) : + Q n α t = (1 - c n α * t) ^ 2 + (A n α - c n α ^ 2) * t ^ 2 := by + simp only [Q] + ring + +/-- Feasibility forces `a² ≥ 0`. -/ +lemma A_nonneg (hfeas : c n α ^ 2 ≤ A n α) : 0 ≤ A n α := + le_trans (sq_nonneg _) hfeas + +/-- Feasibility bounds `α` by `(n-1)/2`, simply because it forces `A = 1 - 2α/(n-1) ≥ 0`. + +This crude consequence is all that the *numerical* step of any degree needs: on +`0 ≤ α ≤ min 17 ((n-1)/2)` the upper bounds for `R n α` used in this development stay below +`0.856` for every `5 ≤ n ≤ 97`. The exact shape of the feasible region, which is cut out +by a quartic in `α`, is therefore never required by the polynomial certificates. + +This must not be read as saying that `A ≥ 0` replaces feasibility everywhere. It does not: +the odd-degree bound needs `0 ≤ Q n α t` on `[0,1]`, which is `Sendov.Q_nonneg` and uses the +full constraint `c ^ 2 ≤ A` — it does not follow from `A ≥ 0`. Accordingly +`Sendov.integral_rpow_le` takes `hfeas` itself, and only the passage from the resulting +rational function to a polynomial positivity statement is weakened to `α ≤ M n / 2`. For +even degrees the moment identity `Sendov.integral_moment` needs no hypothesis at all. -/ +lemma alpha_le_half_M (hn : 2 ≤ n) (hfeas : c n α ^ 2 ≤ A n α) : α ≤ M n / 2 := by + have hM : 0 < M n := M_pos hn + have hA : 0 ≤ A n α := A_nonneg hfeas + rw [A] at hA + have h : 2 * α / M n ≤ 1 := by linarith + rw [div_le_one hM] at h + linarith + +lemma Q_nonneg (hfeas : c n α ^ 2 ≤ A n α) (t : ℝ) : 0 ≤ Q n α t := by + rw [Q_eq] + exact add_nonneg (sq_nonneg _) (mul_nonneg (by linarith) (sq_nonneg _)) + +/-- `Q n α 1 = B = α / (3 + α)`: the substituted quadratic takes at `t = 1` the value that +the simplified polar inequality `β(1) < α / (3 + α)` prescribes. -/ +lemma Q_one (hn : 2 ≤ n) (hα : 0 ≤ α) : Q n α 1 = α / (3 + α) := by + have hM : M n ≠ 0 := (M_pos hn).ne' + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + simp only [Q, c, A] + field_simp + ring + +/-- `Q` is convex with `Q 0 = 1` and `Q 1 = B ≤ 1`, hence bounded by `1` on `[0,1]`. + +Only `0 ≤ c` is needed, not `0 ≤ A`: writing `Q t - 1 = t (A t - 2c)`, the identity +`Q 1 = B < 1` gives `A ≤ 2c` outright, and then `A t ≤ 2c` holds whether `A` is nonnegative +(as `A t ≤ A`) or negative (as `A t ≤ 0 ≤ 2c`). That matters for batches of degrees whose +`α`-range reaches past `(n₀-1)/2`, where `A n₀ α` can be negative. -/ +lemma Q_le_one (hn : 2 ≤ n) (hα : 0 ≤ α) (hc : 0 ≤ c n α) + (ht0 : 0 ≤ t) (ht1 : t ≤ 1) : Q n α t ≤ 1 := by + have hB : Q n α 1 ≤ 1 := by + rw [Q_one hn hα, div_le_one (three_add_pos hα)] + linarith + have hAc : A n α - 2 * c n α ≤ 0 := by + simp only [Q] at hB + linarith + have h5 : A n α * t - 2 * c n α ≤ 0 := by + rcases le_total 0 (A n α) with h | h + · nlinarith [mul_le_of_le_one_right h ht1] + · nlinarith [mul_nonneg ht0 (neg_nonneg.2 h)] + simp only [Q] + nlinarith [mul_nonneg ht0 (neg_nonneg.2 h5)] + +/-- Feasibility gives `α ≤ (n-1)/2`, and hence `c ≥ (1-B)/2 > 0`. -/ +lemma c_pos_of_le_half_M (hn : 2 ≤ n) (hα : 0 ≤ α) (hhalf : α ≤ M n / 2) : 0 < c n α := by + have hM : 0 < M n := M_pos hn + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + have h1 : α / M n ≤ 1 / 2 := by + rw [div_le_div_iff₀ hM (by norm_num)] + linarith + have h2 : α / (2 * (3 + α)) < 1 / 2 := by + rw [div_lt_div_iff₀ (by positivity) (by norm_num)] + linarith + simp only [c] + linarith + +/-- The coefficient multiplying the integral in `Sendov.R` is nonnegative, so any upper +bound for the integral yields an upper bound for `R`. This is how each degree replaces its +integral by an explicit rational function. -/ +lemma R_le_of_integral_le (hn : 2 ≤ n) (hα : 0 ≤ α) {J : ℝ} + (hJ : (∫ t in (0 : ℝ)..1, t ^ 3 * Q n α t ^ (((n : ℝ) - 4) / 2)) ≤ J) : + R n α ≤ 1 / 6 + 1 / (4 * (3 + α)) + 1 / (2 * M n) + 1 / (4 * M n * (3 + α)) + + A n α ^ 2 * n * M n * ((n : ℝ) - 2) / (4 * (3 + α)) * J := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + have hn2 : (0 : ℝ) ≤ (n : ℝ) - 2 := by + have : (2 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + linarith + have hcoef : 0 ≤ A n α ^ 2 * n * M n * ((n : ℝ) - 2) / (4 * (3 + α)) := + div_nonneg (mul_nonneg (mul_nonneg (mul_nonneg (sq_nonneg _) (Nat.cast_nonneg n)) + (M_pos hn).le) hn2) (by linarith) + rw [R] + have := mul_le_mul_of_nonneg_left hJ hcoef + linarith + +end Sendov diff --git a/LeanPool/Sendov/Common/Chord.lean b/LeanPool/Sendov/Common/Chord.lean new file mode 100644 index 0000000000..a6397954f2 --- /dev/null +++ b/LeanPool/Sendov/Common/Chord.lean @@ -0,0 +1,295 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Common.Quadratic + +/-! +# Chord bounds and the Beta integrals + +Both halves of the argument replace a power of the quadratic by a power of its chord and +integrate. The blog post does this twice, with different weights: + +* with weight `t`, to bound `∫₀¹ t β(t)^{(n-2)/2}` in the proof of `α ≤ 17`; +* with weight `t³`, to bound `∫₀¹ t³ Q^{(n-4)/2}` in the large-degree argument. + +Both reduce to a Beta integral, and the split is the same in both cases, so it is proved once: +`Sendov.integral_le_tail_gen` bounds `∫₀¹ t^k QQ^r` by the chord integral over `[0,1/c]` plus +`QQ 1 ^ r / (k+1)`, for any natural `k`, leaving the Beta value to be substituted afterwards. + +The informal write-up instead uses `QQ ≤ exp(-ct)` and the Gamma integral +`∫₀^∞ t³ e^{-rct} dt = 6/(rc)⁴`. The Beta route is preferable in Lean — no improper integral +and no `Real.exp` — and is strictly sharper, since +`6/((s+1)(s+2)(s+3)(s+4)) ≤ 6/s⁴` (`Sendov.beta_le_six_div_pow`), so every numerical constant +downstream of the Gamma bound stays valid. + +## Main statements + +* `Sendov.integral_lin_mul_rpow`, `Sendov.integral_cube_mul_rpow`: the Beta values; +* `Sendov.integral_chord_lin`, `Sendov.integral_chord_pow`: the same, scaled to `[0,1/c]`; +* `Sendov.integral_le_tail_gen`: the split, for an arbitrary weight `t^k`; +* `Sendov.integral_le_tail_lin`, `Sendov.integral_le_tail_cube`: the two instances used. +-/ + +@[expose] public section + +namespace Sendov + +open MeasureTheory + +/-! ### The Beta integrals -/ + +/-- The Beta integral `B(2, s+1)`. -/ +lemma integral_lin_mul_rpow {s : ℝ} (hs : 0 < s) : + (∫ x in (0 : ℝ)..1, x * (1 - x) ^ s) = 1 / ((s + 1) * (s + 2)) := by + have hrefl : (∫ x in (0 : ℝ)..1, x * (1 - x) ^ s) + = ∫ x in (0 : ℝ)..1, (1 - x) * x ^ s := by + have := intervalIntegral.integral_comp_sub_left (a := (0 : ℝ)) (b := 1) + (fun y : ℝ => (1 - y) * y ^ s) 1 + simpa using this + have hcongr : ∀ x ∈ Set.uIcc (0 : ℝ) 1, + (1 - x) * x ^ s = x ^ s - x ^ (s + (1 : ℕ)) := by + intro x hx + rw [Set.uIcc_of_le (by norm_num : (0 : ℝ) ≤ 1)] at hx + rcases eq_or_lt_of_le hx.1 with h | h + · rw [← h, Real.zero_rpow (by positivity), Real.zero_rpow (by push_cast; linarith)] + ring + · rw [rpow_add_nat_pos h] + ring + rw [hrefl, intervalIntegral.integral_congr hcongr] + have hi' : IntervalIntegrable (fun x : ℝ => x ^ s) volume 0 1 := + intervalIntegral.intervalIntegrable_rpow' (by linarith) + have hi : IntervalIntegrable (fun x : ℝ => x ^ (s + (1 : ℕ))) volume 0 1 := by + apply intervalIntegral.intervalIntegrable_rpow' + push_cast + linarith + rw [intervalIntegral.integral_sub hi' hi, integral_rpow_zero_one (by linarith), + integral_rpow_zero_one (by push_cast; linarith)] + push_cast + field_simp + ring + +/-- The Beta integral `B(4, s+1)`. -/ +lemma integral_cube_mul_rpow {s : ℝ} (hs : 0 < s) : + (∫ x in (0 : ℝ)..1, x ^ 3 * (1 - x) ^ s) + = 6 / ((s + 1) * (s + 2) * (s + 3) * (s + 4)) := by + have h1 : (0 : ℝ) < s + 1 := by linarith + have hrefl : (∫ x in (0 : ℝ)..1, x ^ 3 * (1 - x) ^ s) + = ∫ x in (0 : ℝ)..1, (1 - x) ^ 3 * x ^ s := by + have := intervalIntegral.integral_comp_sub_left (a := (0 : ℝ)) (b := 1) + (fun y : ℝ => (1 - y) ^ 3 * y ^ s) 1 + simpa using this + have hcongr : ∀ x ∈ Set.uIcc (0 : ℝ) 1, + (1 - x) ^ 3 * x ^ s + = x ^ s - 3 * x ^ (s + (1 : ℕ)) + 3 * x ^ (s + (2 : ℕ)) - x ^ (s + (3 : ℕ)) := by + intro x hx + rw [Set.uIcc_of_le (by norm_num : (0 : ℝ) ≤ 1)] at hx + rcases eq_or_lt_of_le hx.1 with h | h + · rw [← h] + rw [Real.zero_rpow (by positivity), Real.zero_rpow (by push_cast; linarith), + Real.zero_rpow (by push_cast; linarith), Real.zero_rpow (by push_cast; linarith)] + ring + · rw [rpow_add_nat_pos h, rpow_add_nat_pos h, rpow_add_nat_pos h] + ring + rw [hrefl, intervalIntegral.integral_congr hcongr] + have hi' : IntervalIntegrable (fun x : ℝ => x ^ s) volume 0 1 := + intervalIntegral.intervalIntegrable_rpow' (by linarith) + have hi : ∀ m : ℕ, IntervalIntegrable (fun x : ℝ => x ^ (s + (m : ℕ))) volume 0 1 := by + intro m + apply intervalIntegral.intervalIntegrable_rpow' + have hm : (0 : ℝ) ≤ (m : ℝ) := Nat.cast_nonneg m + linarith + have hc : ∀ (a : ℝ) (m : ℕ), + IntervalIntegrable (fun x : ℝ => a * x ^ (s + (m : ℕ))) volume 0 1 := + fun a m => (hi m).const_mul a + rw [intervalIntegral.integral_sub ((hi'.sub (hc 3 1)).add (hc 3 2)) (hi 3), + intervalIntegral.integral_add (hi'.sub (hc 3 1)) (hc 3 2), + intervalIntegral.integral_sub hi' (hc 3 1), + intervalIntegral.integral_const_mul, intervalIntegral.integral_const_mul] + rw [integral_rpow_zero_one (by linarith), integral_rpow_zero_one (by push_cast; linarith), + integral_rpow_zero_one (by push_cast; linarith), + integral_rpow_zero_one (by push_cast; linarith)] + push_cast + field_simp + ring + +/-- The Beta value is at most `6/s⁴`; this is the form the informal argument uses, obtained +there from the Gamma integral. -/ +lemma beta_le_six_div_pow {s : ℝ} (hs : 0 < s) : + 6 / ((s + 1) * (s + 2) * (s + 3) * (s + 4)) ≤ 6 / s ^ 4 := by + apply div_le_div_of_nonneg_left (by norm_num) (by positivity) + nlinarith [hs.le, sq_nonneg s, sq_nonneg (s + 1)] + +/-- The chord integral with weight `t`, over `[0, 1/c]`. -/ +lemma integral_chord_lin {s c : ℝ} (hs : 0 < s) (hc : 0 < c) : + (∫ t in (0 : ℝ)..1 / c, t * (1 - c * t) ^ s) = 1 / (c ^ 2 * ((s + 1) * (s + 2))) := by + have hc' : c ≠ 0 := hc.ne' + have h := intervalIntegral.integral_comp_mul_left (a := (0 : ℝ)) (b := 1 / c) + (fun y : ℝ => (y / c) * (1 - y) ^ s) hc' + have hfun : (fun t : ℝ => ((c * t) / c) * (1 - c * t) ^ s) + = fun t : ℝ => t * (1 - c * t) ^ s := by + funext t + rw [mul_div_cancel_left₀ t hc'] + simp only [hfun] at h + rw [show c * (1 / c) = 1 by field_simp, mul_zero] at h + have hg : (fun y : ℝ => (y / c) * (1 - y) ^ s) + = fun y : ℝ => (1 / c) * (y * (1 - y) ^ s) := by + funext y + field_simp + rw [hg, intervalIntegral.integral_const_mul, integral_lin_mul_rpow hs] at h + rw [h] + simp only [smul_eq_mul] + field_simp + +/-- The chord integral with weight `t³`, over `[0, 1/c]`. -/ +lemma integral_chord_pow {s c : ℝ} (hs : 0 < s) (hc : 0 < c) : + (∫ t in (0 : ℝ)..1 / c, t ^ 3 * (1 - c * t) ^ s) + = 6 / (c ^ 4 * ((s + 1) * (s + 2) * (s + 3) * (s + 4))) := by + have hc' : c ≠ 0 := hc.ne' + have h := intervalIntegral.integral_comp_mul_left (a := (0 : ℝ)) (b := 1 / c) + (fun y : ℝ => (y / c) ^ 3 * (1 - y) ^ s) hc' + have hfun : (fun t : ℝ => ((c * t) / c) ^ 3 * (1 - c * t) ^ s) + = fun t : ℝ => t ^ 3 * (1 - c * t) ^ s := by + funext t + rw [mul_div_cancel_left₀ t hc'] + simp only [hfun] at h + rw [show c * (1 / c) = 1 by field_simp, mul_zero] at h + have hg : (fun y : ℝ => (y / c) ^ 3 * (1 - y) ^ s) + = fun y : ℝ => (1 / c ^ 3) * (y ^ 3 * (1 - y) ^ s) := by + funext y + field_simp + rw [hg, intervalIntegral.integral_const_mul, integral_cube_mul_rpow hs] at h + rw [h] + simp only [smul_eq_mul] + field_simp + +/-! ### The split -/ + +/-- **The tail bound, for an arbitrary weight `t^k`.** `QQ` is a convex parabola with vertex +at `c/A`; below the vertex it lies under the chord `1 - ct`, above it it is increasing and so +at most `QQ 1`. Splitting `∫₀¹` there gives the bound. + +Two points shape the proof. The chord bound needs `1 - ct ≥ 0`, which comes from +`ct ≤ c²/A ≤ 1` — feasibility again. And the vertex may lie outside `[0,1]`: the split is +made at `s = min (c/A) 1`, after which the first piece is enlarged to `[0, 1/c]` (legitimate +because `s ≤ 1/c`, using `c ≤ 1` when the vertex is to the right) and the second piece is +empty when the vertex is beyond `1`. -/ +theorem integral_le_tail_gen {c A : ℝ} (hfeas : c ^ 2 ≤ A) (hc : 0 < c) (hc1 : c ≤ 1) + {r : ℝ} (hr : 0 < r) (k : ℕ) : + (∫ t in (0 : ℝ)..1, t ^ k * QQ c A t ^ r) + ≤ (∫ t in (0 : ℝ)..1 / c, t ^ k * (1 - c * t) ^ r) + QQ c A 1 ^ r / (k + 1) := by + have hA : 0 < A := lt_of_lt_of_le (by positivity) hfeas + set t₀ : ℝ := c / A with ht₀def + have ht₀pos : 0 < t₀ := by positivity + set s : ℝ := min t₀ 1 with hsdef + have hs0 : 0 < s := lt_min ht₀pos one_pos + have hs1 : s ≤ 1 := min_le_right _ _ + have hcont : Continuous fun u : ℝ => u ^ k * QQ c A u ^ r := continuous_pow_mul_QQ c A k hr.le + have hint : ∀ a b : ℝ, IntervalIntegrable (fun u : ℝ => u ^ k * QQ c A u ^ r) volume a b := + fun a b => hcont.intervalIntegrable a b + have hchordcont : Continuous fun u : ℝ => u ^ k * (1 - c * u) ^ r := + (by fun_prop : Continuous fun u : ℝ => u ^ k).mul + ((continuous_rpow_const hr.le).comp (by fun_prop)) + have hsc : s ≤ 1 / c := by + rcases min_cases t₀ 1 with ⟨h, _⟩ | ⟨h, _⟩ + · rw [hsdef, h, ht₀def, le_div_iff₀ hc, div_mul_eq_mul_div, div_le_one hA] + nlinarith [hfeas] + · rw [hsdef, h, le_div_iff₀ hc] + linarith + rw [← intervalIntegral.integral_add_adjacent_intervals (hint 0 s) (hint s 1)] + have hfirst : (∫ u in (0 : ℝ)..s, u ^ k * QQ c A u ^ r) + ≤ ∫ u in (0 : ℝ)..1 / c, u ^ k * (1 - c * u) ^ r := by + have hle : (∫ u in (0 : ℝ)..s, u ^ k * QQ c A u ^ r) + ≤ ∫ u in (0 : ℝ)..s, u ^ k * (1 - c * u) ^ r := by + refine intervalIntegral.integral_mono_on hs0.le (hint 0 s) + (hchordcont.intervalIntegrable _ _) ?_ + intro u hu + obtain ⟨hu0, hus⟩ := hu + have huv : A * u ≤ c := by + have hut : u ≤ t₀ := le_trans hus (min_le_left _ _) + rw [ht₀def, le_div_iff₀ hA] at hut + linarith + exact mul_le_mul_of_nonneg_left + (Real.rpow_le_rpow (QQ_nonneg hfeas u) (QQ_le_chord hu0 huv) hr.le) (pow_nonneg hu0 k) + refine hle.trans ?_ + have hrest : 0 ≤ ∫ u in s..1 / c, u ^ k * (1 - c * u) ^ r := by + refine intervalIntegral.integral_nonneg hsc ?_ + intro u hu + have : 0 ≤ 1 - c * u := by + have := hu.2 + rw [le_div_iff₀ hc] at this + linarith + exact mul_nonneg (pow_nonneg (le_trans hs0.le hu.1) k) (Real.rpow_nonneg this _) + have hadd : (∫ u in (0 : ℝ)..s, u ^ k * (1 - c * u) ^ r) + + (∫ u in s..1 / c, u ^ k * (1 - c * u) ^ r) + = ∫ u in (0 : ℝ)..1 / c, u ^ k * (1 - c * u) ^ r := + intervalIntegral.integral_add_adjacent_intervals + (hchordcont.intervalIntegrable 0 s) (hchordcont.intervalIntegrable s (1 / c)) + linarith + have hsecond : (∫ u in s..1, u ^ k * QQ c A u ^ r) ≤ QQ c A 1 ^ r / (k + 1) := by + have hBnn : (0 : ℝ) ≤ QQ c A 1 ^ r := Real.rpow_nonneg (QQ_nonneg hfeas 1) _ + have hQB : ∀ u ∈ Set.Icc s 1, QQ c A u ≤ QQ c A 1 := by + intro u hu + rcases le_or_gt t₀ u with h | h + · rw [ht₀def, div_le_iff₀ hA] at h + exact QQ_le_at_one hA.le (by linarith) hu.2 + · have hu1 : u = 1 := by + rcases min_cases t₀ 1 with ⟨he, _⟩ | ⟨he, _⟩ + · rw [hsdef, he] at hu; linarith [hu.1] + · rw [hsdef, he] at hu; linarith [hu.1, hu.2] + rw [hu1] + have hle : (∫ u in s..1, u ^ k * QQ c A u ^ r) + ≤ ∫ u in s..1, QQ c A 1 ^ r * u ^ k := by + refine intervalIntegral.integral_mono_on hs1 (hint s 1) + ((by fun_prop : Continuous fun u : ℝ => QQ c A 1 ^ r * u ^ k).intervalIntegrable _ _) ?_ + intro u hu + have := Real.rpow_le_rpow (QQ_nonneg hfeas u) (hQB u hu) hr.le + nlinarith [pow_nonneg (le_trans hs0.le hu.1) k, this, hBnn] + refine hle.trans ?_ + rw [intervalIntegral.integral_const_mul, integral_pow] + have hsk : (0 : ℝ) ≤ s ^ (k + 1) := pow_nonneg hs0.le _ + rw [one_pow, ← mul_div_assoc] + gcongr + nlinarith [mul_nonneg hBnn hsk] + linarith + +/-- The integral is antitone in `c`: raising `c` lowers `QQ` pointwise on `[0,1]`. Note that +nonnegativity is only needed for the *larger* `c`; for the smaller one it comes free from the +pointwise comparison. (`Sendov.integral_anti` in `FiniteRange.Batch` is the same trick applied +to the degree instead.) -/ +lemma integral_QQ_anti {c₁ c₂ A : ℝ} (hle : c₁ ≤ c₂) (hfeas : c₂ ^ 2 ≤ A) {r : ℝ} (hr : 0 ≤ r) + (k : ℕ) : + (∫ t in (0 : ℝ)..1, t ^ k * QQ c₂ A t ^ r) + ≤ ∫ t in (0 : ℝ)..1, t ^ k * QQ c₁ A t ^ r := by + refine intervalIntegral.integral_mono_on (by norm_num) + ((continuous_pow_mul_QQ c₂ A k hr).intervalIntegrable _ _) + ((continuous_pow_mul_QQ c₁ A k hr).intervalIntegrable _ _) ?_ + intro u hu + refine mul_le_mul_of_nonneg_left ?_ (pow_nonneg hu.1 k) + refine Real.rpow_le_rpow (QQ_nonneg hfeas u) ?_ hr + simp only [QQ] + nlinarith [hu.1, hle] + +/-- The instance with weight `t`, used for `α ≤ 17`. -/ +theorem integral_le_tail_lin {c A : ℝ} (hfeas : c ^ 2 ≤ A) (hc : 0 < c) (hc1 : c ≤ 1) + {r : ℝ} (hr : 0 < r) : + (∫ t in (0 : ℝ)..1, t * QQ c A t ^ r) + ≤ 1 / (c ^ 2 * ((r + 1) * (r + 2))) + QQ c A 1 ^ r / 2 := by + have h := integral_le_tail_gen hfeas hc hc1 hr 1 + simp only [pow_one] at h + rw [integral_chord_lin hr hc, show ((1 : ℕ) : ℝ) + 1 = 2 by norm_num] at h + exact h + +/-- The instance with weight `t³`, used by the large-degree argument. -/ +theorem integral_le_tail_cube {c A : ℝ} (hfeas : c ^ 2 ≤ A) (hc : 0 < c) (hc1 : c ≤ 1) + {r : ℝ} (hr : 0 < r) : + (∫ t in (0 : ℝ)..1, t ^ 3 * QQ c A t ^ r) + ≤ 6 / (c ^ 4 * ((r + 1) * (r + 2) * (r + 3) * (r + 4))) + QQ c A 1 ^ r / 4 := by + have h := integral_le_tail_gen hfeas hc hc1 hr 3 + rw [integral_chord_pow hr hc, show ((3 : ℕ) : ℝ) + 1 = 4 by norm_num] at h + exact h + +end Sendov diff --git a/LeanPool/Sendov/Common/Quadratic.lean b/LeanPool/Sendov/Common/Quadratic.lean new file mode 100644 index 0000000000..a65a38cefc --- /dev/null +++ b/LeanPool/Sendov/Common/Quadratic.lean @@ -0,0 +1,95 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Common.Rpow + +/-! +# The quadratic `1 - 2ct + At²` + +Two quadratics drive the whole development, and they are the same object with different +parameters: + +* `β(t) = 1 - 2axt + a²t²`, the quantity the blog post's inequalities are stated in; +* `Q n α t = 1 - 2c(α)t + a²t²`, what `β` becomes after `β(1)` is replaced by `α/(3+α)`. + +So the facts about them — nonnegativity under feasibility, the chord bound below the vertex, +monotonicity above it — are proved once here for + + `QQ c A t = 1 - 2ct + At²`, + +and `Sendov.Q n α t = QQ (c n α) (A n α) t` holds by `rfl`. + +Note which hypothesis each fact needs. Nonnegativity is exactly feasibility `c² ≤ A`, since +`QQ = (1-ct)² + (A-c²)t²`. The bound `QQ ≤ 1` on `[0,1]` needs only `0 ≤ c` together with +`QQ 1 ≤ 1`: writing `QQ t - 1 = t(At - 2c)`, the value at `t = 1` already gives `A ≤ 2c`, and +then `At ≤ 2c` whether `A` is nonnegative (as `At ≤ A`) or negative (as `At ≤ 0 ≤ 2c`). That +matters, because `A` is genuinely negative in parts of the range. + +## Main statements + +* `Sendov.QQ_nonneg`, `Sendov.QQ_le_one`; +* `Sendov.QQ_le_chord`: `QQ t ≤ 1 - ct` below the vertex; +* `Sendov.QQ_le_at_one`: `QQ t ≤ QQ 1` above it. +-/ + +@[expose] public section + +namespace Sendov + +/-- The quadratic `1 - 2ct + At²`. -/ +noncomputable def QQ (c A t : ℝ) : ℝ := 1 - 2 * c * t + A * t ^ 2 + +/-- `Sendov.Q` is an instance of `Sendov.QQ`. Stated before the section variables below, +which deliberately shadow `Sendov.c` and `Sendov.A`. -/ +lemma Q_eq_QQ (n : ℕ) (α t : ℝ) : Q n α t = QQ (c n α) (A n α) t := rfl + +variable {c A t : ℝ} + +/-- `QQ` as a sum of squares. -/ +lemma QQ_eq (c A t : ℝ) : QQ c A t = (1 - c * t) ^ 2 + (A - c ^ 2) * t ^ 2 := by + simp only [QQ]; ring + +lemma QQ_zero (c A : ℝ) : QQ c A 0 = 1 := by simp [QQ] + +lemma QQ_one (c A : ℝ) : QQ c A 1 = 1 - 2 * c + A := by simp [QQ] + +/-- Feasibility `c² ≤ A` says exactly that `QQ` is a sum of squares. -/ +lemma QQ_nonneg (hfeas : c ^ 2 ≤ A) (t : ℝ) : 0 ≤ QQ c A t := by + rw [QQ_eq] + exact add_nonneg (sq_nonneg _) (mul_nonneg (by linarith) (sq_nonneg _)) + +/-- `QQ ≤ 1` on `[0,1]`, from `QQ 1 ≤ 1` and `0 ≤ c` alone. -/ +lemma QQ_le_one (hc : 0 ≤ c) (hB : QQ c A 1 ≤ 1) (ht0 : 0 ≤ t) (ht1 : t ≤ 1) : + QQ c A t ≤ 1 := by + have hAc : A - 2 * c ≤ 0 := by rw [QQ_one] at hB; linarith + have h5 : A * t - 2 * c ≤ 0 := by + rcases le_total 0 A with h | h + · nlinarith [mul_le_of_le_one_right h ht1] + · nlinarith [mul_nonneg ht0 (neg_nonneg.2 h)] + simp only [QQ] + nlinarith [mul_nonneg ht0 (neg_nonneg.2 h5)] + +/-- Below the vertex, `QQ` lies under the chord `1 - ct`. -/ +lemma QQ_le_chord (ht0 : 0 ≤ t) (ht : A * t ≤ c) : QQ c A t ≤ 1 - c * t := by + simp only [QQ] + nlinarith [mul_nonneg ht0 (sub_nonneg.2 ht)] + +/-- Above the vertex, `QQ` is increasing, so it is at most its value at `t = 1`. -/ +lemma QQ_le_at_one (hA : 0 ≤ A) (ht : c ≤ A * t) (ht1 : t ≤ 1) : QQ c A t ≤ QQ c A 1 := by + have hkey : 0 ≤ A * (1 + t) - 2 * c := by nlinarith [ht, hA, ht1] + simp only [QQ] + nlinarith [mul_nonneg (sub_nonneg.2 ht1) hkey] + +/-- `t ^ k * QQ ^ e` is continuous, hence interval integrable: needed wherever an integral of +this shape is split or compared. -/ +lemma continuous_pow_mul_QQ (c A : ℝ) (k : ℕ) {e : ℝ} (he : 0 ≤ e) : + Continuous fun t : ℝ => t ^ k * QQ c A t ^ e := by + have hQ : Continuous fun t : ℝ => QQ c A t := by simp only [QQ]; fun_prop + have hk : Continuous fun t : ℝ => t ^ k := by fun_prop + exact hk.mul ((continuous_rpow_const he).comp hQ) + +end Sendov diff --git a/LeanPool/Sendov/Common/Rpow.lean b/LeanPool/Sendov/Common/Rpow.lean new file mode 100644 index 0000000000..0a0d33b753 --- /dev/null +++ b/LeanPool/Sendov/Common/Rpow.lean @@ -0,0 +1,66 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Common.Basic +public import Mathlib.Analysis.SpecialFunctions.Integrals.Basic + +/-! +# Real powers, shared by both ranges + +The exponent `(n-4)/2` in `Sendov.R` is a real exponent, so both halves of the development — +the finite range and the large-degree argument — manipulate `Real.rpow`, and both need the +integrand `t ^ 3 * Q ^ e` to be continuous in order to integrate it. Those facts have no +connection to either strategy, so they live here rather than in the strategy-specific files. + +In particular: + +* the finite range uses `Sendov.continuous_integrand` to compare integrals in + `Sendov.integral_rpow_le`, and the large-degree argument needs the same fact to split + `∫₀¹` at the vertex of `Q`; +* `Sendov.rpow_add_nat_pos` is used by the Beta integral, and the same splitting of a real + power into a real and a natural part is what turns `B ^ ((n-4)/2)` into `B ^ k * √B` in + the large-degree reduction. +-/ + +@[expose] public section + +namespace Sendov + +open MeasureTheory + +/-- `∫₀¹ xˢ dx = 1/(s+1)` for `s > -1`. -/ +lemma integral_rpow_zero_one {s : ℝ} (hs : -1 < s) : + (∫ x in (0 : ℝ)..1, x ^ s) = 1 / (s + 1) := by + rw [integral_rpow (Or.inl hs), Real.one_rpow, Real.zero_rpow (by linarith)] + ring + +/-- `x ^ (s + m) = x ^ s * x ^ m` for positive `x` and a natural `m`. -/ +lemma rpow_add_nat_pos {x : ℝ} (hx : 0 < x) (s : ℝ) (m : ℕ) : + x ^ (s + (m : ℝ)) = x ^ s * x ^ m := by + rw [Real.rpow_add hx, Real.rpow_natCast] + +/-- `fun x ↦ x ^ e` is continuous on all of `ℝ` for a nonnegative real exponent `e`. The +exponent must be nonnegative: at `e < 0` the function blows up at the origin. -/ +lemma continuous_rpow_const {e : ℝ} (he : 0 ≤ e) : Continuous fun x : ℝ => x ^ e := + continuous_iff_continuousAt.2 fun x => Real.continuousAt_rpow_const x e (Or.inr he) + +/-- The integrand of `Sendov.R` is continuous, hence interval integrable. Needed wherever an +integral involving `Q ^ e` is split or compared. -/ +lemma continuous_integrand (n : ℕ) (α : ℝ) {e : ℝ} (he : 0 ≤ e) : + Continuous fun t : ℝ => t ^ 3 * Q n α t ^ e := by + have hQ : Continuous fun t : ℝ => Q n α t := by + simp only [Q]; fun_prop + have h3 : Continuous fun t : ℝ => t ^ 3 := by fun_prop + exact h3.mul ((continuous_rpow_const he).comp hQ) + +/-- On `[0,1]` a real power is decreasing in the exponent: `x ^ s ≤ x ^ t` for `t ≤ s`. +Used to drop the `√B` from `B ^ (k + 1/2)`. -/ +lemma rpow_le_rpow_of_le_one {x s t : ℝ} (hx0 : 0 < x) (hx1 : x ≤ 1) (hts : t ≤ s) : + x ^ s ≤ x ^ t := + Real.rpow_le_rpow_of_exponent_ge hx0 hx1 hts + +end Sendov diff --git a/LeanPool/Sendov/Common/Sinh.lean b/LeanPool/Sendov/Common/Sinh.lean new file mode 100644 index 0000000000..9d79cdc418 --- /dev/null +++ b/LeanPool/Sendov/Common/Sinh.lean @@ -0,0 +1,315 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import Mathlib.Analysis.SpecialFunctions.Log.Deriv +public import Mathlib.Analysis.SpecialFunctions.Sqrt +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +public import Mathlib.Analysis.Calculus.MeanValue + +/-! +# `log (sinh h / h) ≤ √(h² + 9) - 3` + +This is the sharp estimate behind the simplified polar inequality `β(1) ≤ α/(3+α)` of the blog +post: applied at `u = αβ(1)/2`, `h = α(2-β(1))/2`, it is exactly what turns + + `1 ≤ ∫₀¹ exp(α(-1 + (2-β(1))t)) dt = e^{-u} sinh h / h` + +into `β(1) ≤ α/(3+α)`. The constant `3` cannot be improved: at `B = α/(3+α)` the slack in the +integral inequality is `-α⁵/540 + α⁶/648`, so the bound is tight to three orders at `α = 0`. + +## The proof + +Differentiating, it suffices to prove `coth h - 1/h ≤ h/√(h²+9)`, which after clearing +denominators is + + `G(h) := h⁴ sinh²h - (h²+9) (h cosh h - sinh h)² ≥ 0`. + +The informal write-up gets this from the Taylor expansion +`G(h) = Σ_{k≥4} 2^{2k-3} (2k-1) (2k-6)² / (2k)! · h^{2k}`, all of whose coefficients are +nonnegative. Formalizing an infinite series with nonnegative coefficients is unpleasant, and +unnecessary. Setting + + `Φ(y) := e^{2y} P₁(y) - e^y P₂(y) - P₃(y)`, + `P₁ = y³-10y²+36y-36`, `P₂ = y⁴+16y²-72`, `P₃ = y³+10y²+36y+36`, + +one has the algebraic identity `Φ(2h) = 16 e^{2h} G(h)`, so `G ≥ 0` iff `Φ ≥ 0` on `[0,∞)`. +And `Φ` is *closed* under differentiation in the family + + `Sf u v w y = e^{2y} u(y) - e^y v(y) - w(y)`, `u` cubic, `v` quartic, `w` cubic, + +under `u ↦ 2u + u'`, `v ↦ v + v'`, `w ↦ w'`. Eight steps of that recurrence reach + + `Φ⁽⁸⁾(y) = 256 e^{2y} (y³+2y²-2y+10) - e^y (y⁴+32y³+352y²+1600y+2504)`, + +and `Φ⁽ʲ⁾(0) = 0` for `j ≤ 7`. So it is enough to prove `Φ⁽⁸⁾ ≥ 0` and integrate eight times. +For `Φ⁽⁸⁾`, divide by `e^y` and use just three terms of the exponential series: what is left is + + `56 + 448 * y + 928 * y ^ 2 + 480 * y ^ 3 + 511 * y ^ 4 + 128 * y ^ 5`, + +every coefficient of which is positive. No certificate, no series manipulation — one `ring` +identity and eight applications of "vanishes at `0` and has nonnegative derivative". + +## Main statements + +* `Sendov.sinh_sq_le`: `(h²+9)(h cosh h - sinh h)² ≤ h⁴ sinh²h`; +* `Sendov.log_sinh_div_le`: the displayed inequality; +* `Sendov.sinh_le_mul_exp`: the form actually used, `sinh h ≤ h exp (√(h²+9) - 3)`. +-/ + +@[expose] public section + +namespace Sendov + +open Real Set Filter + +/-- `f` vanishes at `0` and has nonnegative derivative on `[0,∞)`, hence is nonnegative there. -/ +private lemma nonneg_of_deriv {f g : ℝ → ℝ} (hd : ∀ z, HasDerivAt f (g z) z) + (h0 : f 0 = 0) (hg : ∀ z, 0 ≤ z → 0 ≤ g z) {y : ℝ} (hy : 0 ≤ y) : 0 ≤ f y := by + have hmono : MonotoneOn f (Ici 0) := by + refine monotoneOn_of_deriv_nonneg (convex_Ici 0) + (fun z _ => (hd z).continuousAt.continuousWithinAt) + (fun z hz => (hd z).differentiableAt.differentiableWithinAt) (fun z hz => ?_) + rw [(hd z).deriv] + rw [interior_Ici] at hz + exact hg z (le_of_lt hz) + simpa [h0] using hmono (mem_Ici.2 le_rfl) (mem_Ici.2 hy) hy + +/-- `1 + y + y²/2 ≤ exp y` for `y ≥ 0`: three terms of the exponential series. -/ +private lemma quad_le_exp {y : ℝ} (hy : 0 ≤ y) : 1 + y + y ^ 2 / 2 ≤ exp y := by + suffices 0 ≤ exp y - 1 - y - y ^ 2 / 2 by linarith + refine nonneg_of_deriv (f := fun t => exp t - 1 - t - t ^ 2 / 2) + (g := fun t => exp t - 1 - t) (fun t => ?_) (by norm_num) (fun t ht => ?_) hy + · exact ((((hasDerivAt_exp t).sub_const 1).sub (hasDerivAt_id' t)).sub + ((hasDerivAt_pow 2 t).div_const 2)).congr_deriv (by norm_num) + · linarith [add_one_le_exp t] + +/-- The family closed under differentiation: `e^{2y} u(y) - e^y v(y) - w(y)` with `u`, `w` +cubic and `v` quartic. -/ +private noncomputable def Sf (u₃ u₂ u₁ u₀ v₄ v₃ v₂ v₁ v₀ w₃ w₂ w₁ w₀ y : ℝ) : ℝ := + exp (2 * y) * (u₃ * y ^ 3 + u₂ * y ^ 2 + u₁ * y + u₀) + - exp y * (v₄ * y ^ 4 + v₃ * y ^ 3 + v₂ * y ^ 2 + v₁ * y + v₀) + - (w₃ * y ^ 3 + w₂ * y ^ 2 + w₁ * y + w₀) + +private lemma hasDerivAt_Sf (u₃ u₂ u₁ u₀ v₄ v₃ v₂ v₁ v₀ w₃ w₂ w₁ w₀ y : ℝ) : + HasDerivAt (fun t : ℝ => Sf u₃ u₂ u₁ u₀ v₄ v₃ v₂ v₁ v₀ w₃ w₂ w₁ w₀ t) + (Sf (2 * u₃) (2 * u₂ + 3 * u₃) (2 * u₁ + 2 * u₂) (2 * u₀ + u₁) + v₄ (v₃ + 4 * v₄) (v₂ + 3 * v₃) (v₁ + 2 * v₂) (v₀ + v₁) + 0 (3 * w₃) (2 * w₂) w₁ y) y := by + simp only [Sf] + have he2 : HasDerivAt (fun t : ℝ => exp (2 * t)) (exp (2 * y) * 2) y := + ((hasDerivAt_id' y).const_mul (2 : ℝ)).exp.congr_deriv (by ring) + have he1 : HasDerivAt (fun t : ℝ => exp t) (exp y) y := hasDerivAt_exp y + have hu : HasDerivAt (fun t : ℝ => u₃ * t ^ 3 + u₂ * t ^ 2 + u₁ * t + u₀) + (3 * u₃ * y ^ 2 + 2 * u₂ * y + u₁) y := by + have h := ((((hasDerivAt_pow 3 y).const_mul u₃).add + ((hasDerivAt_pow 2 y).const_mul u₂)).add ((hasDerivAt_id' y).const_mul u₁)).add_const u₀ + refine h.congr_deriv ?_ + norm_num + ring + have hv : HasDerivAt (fun t : ℝ => v₄ * t ^ 4 + v₃ * t ^ 3 + v₂ * t ^ 2 + v₁ * t + v₀) + (4 * v₄ * y ^ 3 + 3 * v₃ * y ^ 2 + 2 * v₂ * y + v₁) y := by + have h := (((((hasDerivAt_pow 4 y).const_mul v₄).add + ((hasDerivAt_pow 3 y).const_mul v₃)).add + ((hasDerivAt_pow 2 y).const_mul v₂)).add ((hasDerivAt_id' y).const_mul v₁)).add_const v₀ + refine h.congr_deriv ?_ + norm_num + ring + have hw : HasDerivAt (fun t : ℝ => w₃ * t ^ 3 + w₂ * t ^ 2 + w₁ * t + w₀) + (3 * w₃ * y ^ 2 + 2 * w₂ * y + w₁) y := by + have h := ((((hasDerivAt_pow 3 y).const_mul w₃).add + ((hasDerivAt_pow 2 y).const_mul w₂)).add ((hasDerivAt_id' y).const_mul w₁)).add_const w₀ + refine h.congr_deriv ?_ + norm_num + ring + exact (((he2.mul hu).sub (he1.mul hv)).sub hw).congr_deriv (by ring) + +/-- The base of the induction, `Φ⁽⁸⁾ ≥ 0`. Three terms of the exponential series leave a +polynomial with every coefficient positive. -/ +private lemma step8 (y : ℝ) (hy : 0 ≤ y) : + 0 ≤ Sf 256 512 (-512) 2560 1 32 352 1600 2504 0 0 0 0 y := by + have : (1 + y + y ^ 2 / 2) * (256 * y ^ 3 + 512 * y ^ 2 - 512 * y + 2560) + ≤ exp y * (256 * y ^ 3 + 512 * y ^ 2 - 512 * y + 2560) := by + grw [quad_le_exp hy] + nlinarith [sq_nonneg (y - 1), pow_nonneg hy 3, sq_nonneg y] + have : (0 : ℝ) ≤ 56 + 448 * y + 928 * y ^ 2 + 480 * y ^ 3 + 511 * y ^ 4 + 128 * y ^ 5 := by + nlinarith [pow_nonneg hy 5, pow_nonneg hy 4, pow_nonneg hy 3, sq_nonneg y, hy] + have h3 : (0 : ℝ) ≤ exp y * (256 * y ^ 3 + 512 * y ^ 2 - 512 * y + 2560) + - (2504 + 1600 * y + 352 * y ^ 2 + 32 * y ^ 3 + 1 * y ^ 4) := by nlinarith + calc + _ ≤ _ := mul_nonneg (exp_pos y).le h3 + _ = _ := by + simp only [Sf, two_mul, exp_add] + ring + +private lemma step7 (y : ℝ) (hy : 0 ≤ y) : + 0 ≤ Sf 128 64 (-320) 1440 1 28 268 1064 1440 0 0 0 0 y := by + refine nonneg_of_deriv (g := Sf 256 512 (-512) 2560 1 32 352 1600 2504 0 0 0 0) + (fun z => ?_) ?_ step8 hy + · exact (hasDerivAt_Sf 128 64 (-320) 1440 1 28 268 1064 1440 0 0 0 0 z).congr_deriv + (by grind [Sf]) + · simp only [Sf] + norm_num +private lemma step6 (y : ℝ) (hy : 0 ≤ y) : + 0 ≤ Sf 64 (-64) (-96) 768 1 24 196 672 768 0 0 0 0 y := by + refine nonneg_of_deriv (g := Sf 128 64 (-320) 1440 1 28 268 1064 1440 0 0 0 0) + (fun z => ?_) ?_ step7 hy + · exact (hasDerivAt_Sf 64 (-64) (-96) 768 1 24 196 672 768 0 0 0 0 z).congr_deriv (by grind [Sf]) + · simp only [Sf] + norm_num +private lemma step5 (y : ℝ) (hy : 0 ≤ y) : + 0 ≤ Sf 32 (-80) 32 368 1 20 136 400 368 0 0 0 0 y := by + refine nonneg_of_deriv (g := Sf 64 (-64) (-96) 768 1 24 196 672 768 0 0 0 0) + (fun z => ?_) ?_ step6 hy + · exact (hasDerivAt_Sf 32 (-80) 32 368 1 20 136 400 368 0 0 0 0 z).congr_deriv (by grind [Sf]) + · simp only [Sf] + norm_num +private lemma step4 (y : ℝ) (hy : 0 ≤ y) : + 0 ≤ Sf 16 (-64) 80 144 1 16 88 224 144 0 0 0 0 y := by + refine nonneg_of_deriv (g := Sf 32 (-80) 32 368 1 20 136 400 368 0 0 0 0) + (fun z => ?_) ?_ step5 hy + · exact (hasDerivAt_Sf 16 (-64) 80 144 1 16 88 224 144 0 0 0 0 z).congr_deriv (by grind [Sf]) + · simp only [Sf] + norm_num +private lemma step3 (y : ℝ) (hy : 0 ≤ y) : + 0 ≤ Sf 8 (-44) 84 30 1 12 52 120 24 0 0 0 6 y := by + refine nonneg_of_deriv (g := Sf 16 (-64) 80 144 1 16 88 224 144 0 0 0 0) + (fun z => ?_) ?_ step4 hy + · exact (hasDerivAt_Sf 8 (-44) 84 30 1 12 52 120 24 0 0 0 6 z).congr_deriv (by grind [Sf]) + · simp only [Sf] + norm_num +private lemma step2 (y : ℝ) (hy : 0 ≤ y) : + 0 ≤ Sf 4 (-28) 70 (-20) 1 8 28 64 (-40) 0 0 6 20 y := by + refine nonneg_of_deriv (g := Sf 8 (-44) 84 30 1 12 52 120 24 0 0 0 6) + (fun z => ?_) ?_ step3 hy + · exact (hasDerivAt_Sf 4 (-28) 70 (-20) 1 8 28 64 (-40) 0 0 6 20 z).congr_deriv (by grind [Sf]) + · simp only [Sf] + norm_num +private lemma step1 (y : ℝ) (hy : 0 ≤ y) : + 0 ≤ Sf 2 (-17) 52 (-36) 1 4 16 32 (-72) 0 3 20 36 y := by + refine nonneg_of_deriv (g := Sf 4 (-28) 70 (-20) 1 8 28 64 (-40) 0 0 6 20) + (fun z => ?_) ?_ step2 hy + · exact (hasDerivAt_Sf 2 (-17) 52 (-36) 1 4 16 32 (-72) 0 3 20 36 z).congr_deriv (by grind [Sf]) + · simp only [Sf] + norm_num +private lemma step0 (y : ℝ) (hy : 0 ≤ y) : + 0 ≤ Sf 1 (-10) 36 (-36) 1 0 16 0 (-72) 1 10 36 36 y := by + refine nonneg_of_deriv (g := Sf 2 (-17) 52 (-36) 1 4 16 32 (-72) 0 3 20 36) + (fun z => ?_) ?_ step1 hy + · exact (hasDerivAt_Sf 1 (-10) 36 (-36) 1 0 16 0 (-72) 1 10 36 36 z).congr_deriv (by grind [Sf]) + · simp only [Sf] + norm_num + +/-- The algebraic bridge: `Φ(2h) = 16 e^{2h} G(h)`. -/ +private lemma Sf_eq (h : ℝ) : + Sf 1 (-10) 36 (-36) 1 0 16 0 (-72) 1 10 36 36 (2 * h) + = 16 * exp h ^ 2 * (h ^ 4 * sinh h ^ 2 - (h ^ 2 + 9) * (h * cosh h - sinh h) ^ 2) := by + have : exp h ≠ 0 := (exp_pos h).ne' + have e4 : exp (2 * (2 * h)) = exp h ^ 4 := by simp [←exp_nat_mul]; ring + have e2 : exp (2 * h) = exp h ^ 2 := by simp [←exp_nat_mul] + simp only [Sf, sinh_eq, cosh_eq, e4, e2, exp_neg] + field_simp + ring + +/-- **The key inequality.** Equivalent to `coth h - 1/h ≤ h/√(h²+9)`. -/ +theorem sinh_sq_le {h : ℝ} (hh : 0 ≤ h) : + (h ^ 2 + 9) * (h * cosh h - sinh h) ^ 2 ≤ h ^ 4 * sinh h ^ 2 := by + have h0 := step0 (2 * h) (by linarith) + rw [Sf_eq] at h0 + have : (0 : ℝ) < 16 * exp h ^ 2 := by positivity + nlinarith + +/-- `sinh h ≤ h cosh h` for `h ≥ 0`; equivalently `h cosh h - sinh h ≥ 0`, which is what makes +the square root below legitimate. -/ +private lemma sinh_le_mul_cosh {h : ℝ} (hh : 0 ≤ h) : sinh h ≤ h * cosh h := by + have : 0 ≤ h * cosh h - sinh h := by + refine nonneg_of_deriv (f := fun t => t * cosh t - sinh t) (g := fun t => t * sinh t) + (fun t => ?_) (by simp) (fun t ht => mul_nonneg ht (sinh_nonneg_iff.2 ht)) hh + exact (((hasDerivAt_id' t).mul (hasDerivAt_cosh t)).sub (hasDerivAt_sinh t)).congr_deriv + (by ring) + linarith + +/-- `√(h²+9) (h cosh h - sinh h) ≤ h² sinh h`: the square root of `Sendov.sinh_sq_le`, which is +the derivative inequality `coth h - 1/h ≤ h/√(h²+9)` cleared of denominators. -/ +theorem sqrt_mul_sub_le {h : ℝ} (hh : 0 ≤ h) : + sqrt (h ^ 2 + 9) * (h * cosh h - sinh h) ≤ h ^ 2 * sinh h := by + have : (0 : ℝ) ≤ h ^ 2 * sinh h := mul_nonneg (sq_nonneg h) (sinh_nonneg_iff.2 hh) + have : (0 : ℝ) ≤ sqrt (h ^ 2 + 9) * (h * cosh h - sinh h) := + mul_nonneg (sqrt_nonneg _) (by linarith [sinh_le_mul_cosh hh]) + have : (sqrt (h ^ 2 + 9) * (h * cosh h - sinh h)) ^ 2 ≤ (h ^ 2 * sinh h) ^ 2 := by + convert sinh_sq_le hh + · rw [mul_pow, sq_sqrt (by positivity)] + · ring + nlinarith + +/-- **The sharp bound.** This is `(lsh)` of the blog post. -/ +theorem log_sinh_div_le {h : ℝ} (hh : 0 < h) : + log (sinh h / h) ≤ sqrt (h ^ 2 + 9) - 3 := by + set ψ : ℝ → ℝ := fun z => sqrt (z ^ 2 + 9) - 3 - (log (sinh z) - log z) with hψdef + -- `ψ` has nonnegative derivative on `(0,∞)` + have hderiv : ∀ z : ℝ, 0 < z → + HasDerivAt ψ (z / sqrt (z ^ 2 + 9) - (cosh z / sinh z - 1 / z)) z := by + intro z hz + have hsinh : sinh z ≠ 0 := ne_of_gt (sinh_pos_iff.2 hz) + apply HasDerivAt.sub + · have h := (((hasDerivAt_pow 2 z).add_const 9).sqrt (ne_of_gt (by positivity))).sub_const 3 + refine h.congr_deriv ?_ + field_simp + ring + · exact (((hasDerivAt_sinh z).log hsinh).sub + ((hasDerivAt_id' z).log (ne_of_gt hz))).congr_deriv (by field_simp) + have hmono : MonotoneOn ψ (Ioi 0) := by + refine monotoneOn_of_deriv_nonneg (convex_Ioi 0) + (fun z hz => (hderiv z hz).continuousAt.continuousWithinAt) + (fun z hz => (hderiv z (by rwa [interior_Ioi] at hz)).differentiableAt.differentiableWithinAt) + (fun z hz => ?_) + rw [interior_Ioi, mem_Ioi] at hz + rw [(hderiv z hz).deriv, sub_nonneg, div_sub_div _ _ (ne_of_gt (sinh_pos_iff.2 hz)) + (ne_of_gt hz), div_le_div_iff₀ (by positivity) (by positivity)] + nlinarith [sqrt_mul_sub_le (le_of_lt hz)] + -- `ψ → 0` as `z → 0⁺` + have hslope : Tendsto (fun z => sinh z / z) (nhdsWithin 0 {(0 : ℝ)}ᶜ) (nhds 1) := by + simpa [slope_fun_def, div_eq_inv_mul, hasDerivAt_iff_tendsto_slope] using hasDerivAt_sinh 0 + have hlog : Tendsto ψ (nhdsWithin 0 (Ioi 0)) (nhds 0) := by + have hsub : nhdsWithin (0 : ℝ) (Ioi 0) ≤ nhdsWithin 0 {(0 : ℝ)}ᶜ := + nhdsWithin_mono _ (fun z hz => ne_of_gt hz) + have h1 : Tendsto (fun z => log (sinh z / z)) (nhdsWithin 0 (Ioi 0)) (nhds 0) := by + simpa [Function.comp_def] using (continuousAt_log one_ne_zero).tendsto.comp + (hslope.mono_left hsub) + have h2 : Tendsto (fun z : ℝ => sqrt (z ^ 2 + 9) - 3) + (nhdsWithin 0 (Ioi 0)) (nhds 0) := by + have h9 : sqrt (9 : ℝ) = 3 := by + rw [show (9 : ℝ) = 3 ^ 2 by norm_num, sqrt_sq (by norm_num : (0:ℝ) ≤ 3)] + have hc : ContinuousAt (fun z => sqrt (z ^ 2 + 9) - 3) 0 := by fun_prop + simpa [ContinuousWithinAt, h9] using hc.continuousWithinAt (s := Ioi (0 : ℝ)) + have heq : ∀ᶠ z : ℝ in nhdsWithin 0 (Ioi 0), + ψ z = (sqrt (z ^ 2 + 9) - 3) - log (sinh z / z) := by + filter_upwards [self_mem_nhdsWithin] with z hz + rw [hψdef, log_div (ne_of_gt (sinh_pos_iff.2 hz)) (ne_of_gt hz)] + simpa [tendsto_congr' heq] using h2.sub h1 + -- combine + have hev : ∀ᶠ z : ℝ in nhdsWithin 0 (Ioi 0), ψ z ≤ ψ h := by + have hmem : Ioo (0 : ℝ) h ∈ nhdsWithin (0 : ℝ) (Ioi 0) := + mem_nhdsGT_iff_exists_Ioo_subset.2 (Exists.intro h (And.intro (mem_Ioi.2 hh) subset_rfl)) + filter_upwards [hmem] with z hz + exact hmono (mem_Ioi.2 hz.1) (mem_Ioi.2 hh) (le_of_lt hz.2) + have h0 : (0 : ℝ) ≤ ψ h := le_of_tendsto hlog hev + have : (0 : ℝ) < sinh h / h := div_pos (sinh_pos_iff.2 hh) hh + rw [hψdef] at h0 + rw [log_div (ne_of_gt (sinh_pos_iff.2 hh)) (ne_of_gt hh)] + linarith + +/-- The form in which the estimate is used: `sinh h ≤ h exp (√(h²+9) - 3)`. -/ +theorem sinh_le_mul_exp {h : ℝ} (hh : 0 ≤ h) : + sinh h ≤ h * exp (sqrt (h ^ 2 + 9) - 3) := by + rcases eq_or_lt_of_le hh with rfl | hpos + · simp + · have hd : (0 : ℝ) < sinh h / h := div_pos (sinh_pos_iff.2 hpos) hpos + grw [← (log_le_iff_le_exp hd).1 (log_sinh_div_le hpos)] + field_simp + simp + +end Sendov diff --git a/LeanPool/Sendov/Conjecture.lean b/LeanPool/Sendov/Conjecture.lean new file mode 100644 index 0000000000..987eb57813 --- /dev/null +++ b/LeanPool/Sendov/Conjecture.lean @@ -0,0 +1,173 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Interior +public import LeanPool.Sendov.Boundary + +/-! +# Sendov's conjecture and the Phelps–Rodriguez conjecture + +> Let `n ≥ 2` and let `p` be a degree `n` polynomial with all zeroes in the closed unit disk. +> Then for every zero `a` of `p` there is a critical point `ζ` of `p` with `‖ζ - a‖ ≤ 1` +> (Sendov), and in fact with `‖ζ - a‖ < 1` unless `‖a‖ = 1` and `p` is a scalar multiple of +> `zⁿ - aⁿ` (Phelps–Rodriguez). + +Everything mathematical is already done: this file only removes the normalization `a ∈ [0,1)` +by rotating the variable. Writing `a = ω r` with `‖ω‖ = 1` and `r = ‖a‖`, the polynomial +`p(ωz)` has the same degree, still has all its zeroes in the closed unit disk, and vanishes at +the *real* point `r`. Its critical points are the `ω⁻¹ζ`, and `‖ω⁻¹ζ - r‖ = ‖ζ - a‖`, so the +conclusion transports back unchanged. + +Three cases, by the position of `a`: + +* `a = 0`: `Sendov.sendov_center`; +* `0 < ‖a‖ < 1`: `Sendov.sendov_interior_real` after rotating; +* `‖a‖ = 1`: `Sendov.rubinstein_one` after rotating, whose extremal polynomial `c(zⁿ - 1)` + rotates back to `c ω⁻ⁿ (zⁿ - aⁿ)`. + +## Main statements + +* `Sendov.phelps_rodriguez`: the Phelps–Rodriguez conjecture; +* `Sendov.sendov`: Sendov's conjecture. +-/ + +@[expose] public section + +namespace Sendov + +open Polynomial + +/-! ### Rotating the variable -/ + +/-- `p(ωz)`. -/ +noncomputable def rotate (ω : ℂ) (p : ℂ[X]) : ℂ[X] := p.comp (C ω * X) + +@[simp] lemma eval_rotate (ω : ℂ) (p : ℂ[X]) (x : ℂ) : + (rotate ω p).eval x = p.eval (ω * x) := by + simp [rotate, eval_comp] + +lemma natDegree_rotate {ω : ℂ} (hω : ω ≠ 0) (p : ℂ[X]) : + (rotate ω p).natDegree = p.natDegree := by + rw [rotate, natDegree_comp, natDegree_C_mul hω, natDegree_X, mul_one] + +lemma derivative_rotate (ω : ℂ) (p : ℂ[X]) : + derivative (rotate ω p) = C ω * rotate ω (derivative p) := by + simp only [rotate, derivative_comp, derivative_mul, derivative_C, derivative_X, zero_mul, + mul_one, zero_add] + +lemma eval_derivative_rotate (ω : ℂ) (p : ℂ[X]) (x : ℂ) : + (derivative (rotate ω p)).eval x = ω * (derivative p).eval (ω * x) := by + rw [derivative_rotate, eval_mul, eval_C, eval_rotate] + +/-- Rotating is undone by rotating back. -/ +lemma rotate_rotate_inv {ω : ℂ} (hω : ω ≠ 0) (p : ℂ[X]) : rotate ω⁻¹ (rotate ω p) = p := by + have h : (C ω * X : ℂ[X]).comp (C ω⁻¹ * X) = X := by + rw [mul_comp, C_comp, X_comp, ← mul_assoc, ← C_mul, mul_inv_cancel₀ hω, C_1, one_mul] + rw [rotate, rotate, comp_assoc, h, comp_X] + +lemma roots_rotate {ω : ℂ} (hω : ‖ω‖ = 1) {p : ℂ[X]} (hp : p ≠ 0) + (hroots : ∀ w ∈ p.roots, ‖w‖ ≤ 1) : ∀ w ∈ (rotate ω p).roots, ‖w‖ ≤ 1 := by + intro w hw + have hev : p.eval (ω * w) = 0 := by + have := (mem_roots'.1 hw).2 + rwa [IsRoot, eval_rotate] at this + have hmem : ω * w ∈ p.roots := mem_roots'.2 ⟨hp, hev⟩ + have := hroots _ hmem + rwa [norm_mul, hω, one_mul] at this + +/-! ### The Phelps–Rodriguez conjecture -/ + +/-- **The Phelps–Rodriguez conjecture.** Every zero `a` of a degree `n ≥ 2` polynomial with all +zeroes in the closed unit disk has a critical point strictly within distance `1`, unless `a` is +on the unit circle and `p` is a scalar multiple of `zⁿ - aⁿ`. -/ +theorem phelps_rodriguez {n : ℕ} (hn : 2 ≤ n) {p : ℂ[X]} (hdeg : p.natDegree = n) + (hroots : ∀ w ∈ p.roots, ‖w‖ ≤ 1) {a : ℂ} (hpa : p.eval a = 0) : + (∃ ζ : ℂ, (derivative p).eval ζ = 0 ∧ ‖ζ - a‖ < 1) + ∨ (‖a‖ = 1 ∧ ∃ c : ℂ, c ≠ 0 ∧ p = C c * (X ^ n - C (a ^ n))) := by + have hp0 : p ≠ 0 := by + intro h + rw [h, natDegree_zero] at hdeg + omega + rcases eq_or_ne a 0 with rfl | ha0 + · obtain ⟨ζ, hζ, hlt⟩ := sendov_center hn hdeg hroots hpa + exact Or.inl ⟨ζ, hζ, by simpa using hlt⟩ + -- the rotation `a = ω r` + have hr0 : 0 < ‖a‖ := norm_pos_iff.2 ha0 + have hr1 : ‖a‖ ≤ 1 := hroots a (mem_roots'.2 ⟨hp0, hpa⟩) + have hrC : ((‖a‖ : ℝ) : ℂ) ≠ 0 := by + simpa using ne_of_gt hr0 + obtain ⟨ω, hωdef⟩ : ∃ w : ℂ, w = a / ((‖a‖ : ℝ) : ℂ) := ⟨_, rfl⟩ + have hωne : ω ≠ 0 := by + rw [hωdef] + exact div_ne_zero ha0 hrC + have hωnorm : ‖ω‖ = 1 := by + rw [hωdef, norm_div, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (le_of_lt hr0), + div_self (ne_of_gt hr0)] + have hωr : ω * ((‖a‖ : ℝ) : ℂ) = a := by + rw [hωdef, div_mul_cancel₀ _ hrC] + -- the rotated polynomial + have hdeg' : (rotate ω p).natDegree = n := by rw [natDegree_rotate hωne, hdeg] + have hroots' := roots_rotate hωnorm hp0 hroots + have hpr : (rotate ω p).eval ((‖a‖ : ℝ) : ℂ) = 0 := by rw [eval_rotate, hωr, hpa] + -- transporting a strict witness back + have htransport : ∀ ζ : ℂ, (derivative (rotate ω p)).eval ζ = 0 → + ‖ζ - ((‖a‖ : ℝ) : ℂ)‖ < 1 → ∃ ξ : ℂ, (derivative p).eval ξ = 0 ∧ ‖ξ - a‖ < 1 := by + intro ζ hζ hlt + refine ⟨ω * ζ, ?_, ?_⟩ + · rw [eval_derivative_rotate] at hζ + exact (mul_eq_zero.1 hζ).resolve_left hωne + · have : ω * ζ - a = ω * (ζ - ((‖a‖ : ℝ) : ℂ)) := by rw [mul_sub, hωr] + rw [this, norm_mul, hωnorm, one_mul] + exact hlt + rcases lt_or_eq_of_le hr1 with hlt1 | heq1 + · -- the interior case + obtain ⟨ζ, hζ, hd⟩ := + sendov_interior_real hn hdeg' hroots' (le_of_lt hr0) hlt1 hpr + exact Or.inl (htransport ζ hζ hd) + · -- the boundary case: `a = ω` + have hone : ((‖a‖ : ℝ) : ℂ) = 1 := by rw [heq1]; norm_num + have haω : a = ω := by rw [← hωr, hone, mul_one] + have hpr1 : (rotate ω p).eval 1 = 0 := by rwa [hone] at hpr + rcases rubinstein_one hn hdeg' hroots' hpr1 with ⟨ζ, hζ, hd⟩ | hext + · exact Or.inl (htransport ζ hζ (by rw [hone]; exact hd)) + -- the extremal case, rotated back + obtain ⟨c, hcdef⟩ : ∃ c : ℂ, c = (rotate ω p).leadingCoeff := ⟨_, rfl⟩ + have hcne : c ≠ 0 := by + rw [hcdef] + refine leadingCoeff_ne_zero.2 ?_ + intro h + rw [h, natDegree_zero] at hdeg' + omega + refine Or.inr ⟨heq1, c * ω⁻¹ ^ n, + mul_ne_zero hcne (pow_ne_zero _ (inv_ne_zero hωne)), ?_⟩ + have hext' : rotate ω p = C c * (X ^ n - 1) := by rw [hcdef]; exact hext + have hcomp : rotate ω⁻¹ (C c * (X ^ n - 1)) = C c * (C (ω⁻¹ ^ n) * X ^ n - 1) := by + simp only [rotate, mul_comp, sub_comp, pow_comp, C_comp, X_comp, one_comp, mul_pow, + ← C_pow] + have h1 : (C (ω⁻¹ ^ n) * C (ω ^ n) : ℂ[X]) = 1 := by + rw [← C_mul, ← mul_pow, inv_mul_cancel₀ hωne, one_pow, C_1] + have hgoal : rotate ω⁻¹ (rotate ω p) = C (c * ω⁻¹ ^ n) * (X ^ n - C (a ^ n)) := by + rw [hext', hcomp, haω, C_mul] + linear_combination (C c) * h1 + exact (rotate_rotate_inv hωne p).symm.trans hgoal + +/-! ### Sendov's conjecture -/ + +/-- **Sendov's conjecture.** Every zero of a degree `n ≥ 2` polynomial with all zeroes in the +closed unit disk has a critical point within distance `1`. -/ +theorem sendov {n : ℕ} (hn : 2 ≤ n) {p : ℂ[X]} (hdeg : p.natDegree = n) + (hroots : ∀ w ∈ p.roots, ‖w‖ ≤ 1) {a : ℂ} (hpa : p.eval a = 0) : + ∃ ζ : ℂ, (derivative p).eval ζ = 0 ∧ ‖ζ - a‖ ≤ 1 := by + rcases phelps_rodriguez hn hdeg hroots hpa with ⟨ζ, hζ, hlt⟩ | ⟨hnorm, c, hc, hext⟩ + · exact ⟨ζ, hζ, le_of_lt hlt⟩ + -- the extremal polynomial `c(zⁿ - aⁿ)` has its only critical point at the origin, at + -- distance exactly `‖a‖ = 1` + refine ⟨0, ?_, by simpa using le_of_eq hnorm⟩ + rw [hext, derivative_C_mul, derivative_sub, derivative_X_pow, derivative_C] + simp [zero_pow (by omega : n - 1 ≠ 0)] + +end Sendov diff --git a/LeanPool/Sendov/Counterexample/Factor.lean b/LeanPool/Sendov/Counterexample/Factor.lean new file mode 100644 index 0000000000..c87406a381 --- /dev/null +++ b/LeanPool/Sendov/Counterexample/Factor.lean @@ -0,0 +1,137 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import Mathlib.Analysis.Complex.Polynomial.Basic +public import Mathlib.Algebra.Polynomial.Derivative +public import Mathlib.Analysis.Complex.Basic + +/-! +# The two factorizations + +A polynomial `p` of degree `n` over `ℂ` splits, so it factors over its roots, and so does `p'`. +The blog post writes these as + + `p(z) = (z-a) ∏ⱼ (z - zⱼ)`, `p'(z) = n ∏ⱼ (z - a + 1/qⱼ)`, + +where `a` is the distinguished root, the `zⱼ` are the others, and the critical points are +written as `a - 1/qⱼ` — possible exactly because each lies at distance at least `1` from `a`, +which puts each `qⱼ` in the closed unit disk. + +Everything here is deliberately **hypothesis-light**. Nothing is assumed about `a` beyond its +being a root: not that it is real, not that `|a| < 1`, not that `a ≠ 0`. The boundary case +`|a| = 1` of Rubinstein's theorem needs these same two factorizations, and would not be able +to use them if `|a| < 1` were baked in here. The stronger hypotheses enter one layer up. + +Roots are kept as **multisets** throughout, which is how Mathlib produces them and what allows +repeated roots without comment. + +A note on the proofs: the root multisets are extracted with `obtain ⟨z, hz⟩ : ∃ z, … := ⟨_, rfl⟩` +rather than named with `set`. Rewriting `p = C p.leadingCoeff * (p.roots.map …).prod` into a +goal that still mentions `p.roots` otherwise loops, and `set` leaves a local definition that +rewriting unfolds again. An opaque local is what is wanted. + +## Main statements + +* `Sendov.exists_root_multiset`: the factorization of `p` over `a` and the other roots; +* `Sendov.exists_crit_multiset`: the factorization of `p'` over the reciprocal coordinates `q`. +-/ + +@[expose] public section + +namespace Sendov + +open Polynomial + +/-- The factorization of `p` over its roots, with the distinguished root `a` split off. -/ +theorem exists_root_multiset {n : ℕ} (hn : 1 ≤ n) {p : ℂ[X]} (hdeg : p.natDegree = n) + (hroots : ∀ w ∈ p.roots, ‖w‖ ≤ 1) {a : ℂ} (hpa : p.eval a = 0) : + ∃ z : Multiset ℂ, z.card = n - 1 ∧ (∀ w ∈ z, ‖w‖ ≤ 1) ∧ + p = C p.leadingCoeff * ((X - C a) * (z.map (fun w => X - C w)).prod) := by + have hp0 : p ≠ 0 := by + intro h + rw [h, natDegree_zero] at hdeg + omega + have hsplit : p.Splits := IsAlgClosed.splits p + have hcard : p.roots.card = n := by + rw [← hdeg] + exact hsplit.natDegree_eq_card_roots.symm + have hmem : a ∈ p.roots := by + rw [mem_roots hp0] + exact hpa + obtain ⟨z, hz⟩ : ∃ z : Multiset ℂ, p.roots = a ::ₘ z := + ⟨p.roots.erase a, (Multiset.cons_erase hmem).symm⟩ + have hfac := hsplit.eq_prod_roots + rw [hz] at hfac hcard + refine ⟨z, ?_, ?_, ?_⟩ + · simp only [Multiset.card_cons] at hcard + omega + · intro w hw + exact hroots w (by rw [hz]; exact Multiset.mem_cons_of_mem hw) + · rwa [Multiset.map_cons, Multiset.prod_cons] at hfac + +/-- The factorization of `p'`. Each critical point `w` lies at distance at least `1` from `a`, +so `(a - w)⁻¹` lies in the closed unit disk and `w = a - ((a-w)⁻¹)⁻¹`. -/ +theorem exists_crit_multiset {n : ℕ} (hn : 2 ≤ n) {p : ℂ[X]} (hdeg : p.natDegree = n) {a : ℂ} + (hcrit : ∀ w : ℂ, (derivative p).eval w = 0 → 1 ≤ ‖w - a‖) : + ∃ q : Multiset ℂ, q.card = n - 1 ∧ (∀ v ∈ q, ‖v‖ ≤ 1) ∧ (∀ v ∈ q, v ≠ 0) ∧ + derivative p = C ((n : ℂ) * p.leadingCoeff) + * (q.map (fun v => X - C (a - v⁻¹))).prod := by + have hp0 : p ≠ 0 := by + intro h + rw [h, natDegree_zero] at hdeg + omega + have hdd : (derivative p).natDegree = n - 1 := by + rw [natDegree_derivative p, hdeg] + have hd0 : derivative p ≠ 0 := by + intro h + rw [h, natDegree_zero] at hdd + omega + -- Mathlib already knows the leading coefficient of a derivative + have hlc : (derivative p).leadingCoeff = (n : ℂ) * p.leadingCoeff := by + rw [leadingCoeff_derivative, hdeg, mul_comm] + have hsplit : (derivative p).Splits := IsAlgClosed.splits _ + have hcard : (derivative p).roots.card = n - 1 := by + rw [← hdd] + exact hsplit.natDegree_eq_card_roots.symm + have hfac := hsplit.eq_prod_roots + -- make the root multiset opaque before rewriting anything into `hfac` + obtain ⟨W, hW⟩ : ∃ W : Multiset ℂ, (derivative p).roots = W := ⟨_, rfl⟩ + rw [hW] at hfac hcard + have hcrit' : ∀ w ∈ W, 1 ≤ ‖w - a‖ := by + intro w hw + exact hcrit w (isRoot_of_mem_roots (by rw [hW]; exact hw)) + have hne : ∀ w ∈ W, a - w ≠ 0 := by + intro w hw h + have h1 := hcrit' w hw + rw [sub_eq_zero] at h + rw [← h, sub_self, norm_zero] at h1 + linarith + obtain ⟨q, hq⟩ : ∃ q : Multiset ℂ, q = W.map (fun w => (a - w)⁻¹) := ⟨_, rfl⟩ + have hback : q.map (fun v => a - v⁻¹) = W := by + rw [hq, Multiset.map_map] + have hid : ∀ w ∈ W, ((fun v => a - v⁻¹) ∘ (fun w => (a - w)⁻¹)) w = w := by + intro w hw + simp only [Function.comp_apply, inv_inv] + ring + rw [Multiset.map_congr rfl hid, Multiset.map_id'] + refine ⟨q, ?_, ?_, ?_, ?_⟩ + · rw [hq, Multiset.card_map, hcard] + · intro v hv + rw [hq] at hv + obtain ⟨w, hw, rfl⟩ := Multiset.mem_map.1 hv + rw [norm_inv, inv_le_one_iff₀] + right + rw [norm_sub_rev] + exact hcrit' w hw + · intro v hv + rw [hq] at hv + obtain ⟨w, hw, rfl⟩ := Multiset.mem_map.1 hv + exact inv_ne_zero (hne w hw) + · rw [← hback, hlc] at hfac + rwa [Multiset.map_map] at hfac + +end Sendov diff --git a/LeanPool/Sendov/Counterexample/Identities.lean b/LeanPool/Sendov/Counterexample/Identities.lean new file mode 100644 index 0000000000..a3ce553ddb --- /dev/null +++ b/LeanPool/Sendov/Counterexample/Identities.lean @@ -0,0 +1,447 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Counterexample.Factor +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus + +/-! +# The centroid and second origin identities + +Two of the four identities of the blog post's Lemma 1 come from comparing the two +factorizations of `Sendov.Counterexample.Factor` coefficient by coefficient, or by evaluating +them at a point. Neither needs any integration. + +* the **centroid identity**, from the coefficient of `X^{n-2}` in `p'`, equivalently from + `p.coeff (n-1)` and `p'.coeff (n-2)`; +* the **second origin identity**, from `p'(0)`. + +Everything is stated **division-free**. The blog post writes the second origin identity as + + `(-1)^{n-1} (∏ zⱼ) (1 + a ∑ⱼ 1/zⱼ) = (n / ∏ qⱼ) F(1)`, + +with a convention that singularities are removed when some `zⱼ` vanishes. Multiplying out, +`(∏ zⱼ)(∑ⱼ 1/zⱼ)` is `∑ⱼ ∏_{k≠j} z_k`, which is defined whether or not any `zⱼ` is zero, and +`∏ qⱼ` clears the other denominator. So the convention becomes unnecessary rather than being +formalized: no junk value of `0⁻¹` is ever evaluated. + +## Main statements + +* `Sendov.sumEraseProd`: `∑ⱼ ∏_{k≠j} sₖ`, the division-free form of `(∏ s)(∑ 1/sⱼ)`; +* `Sendov.centroid_identity`; +* `Sendov.second_origin_identity`. +-/ + +@[expose] public section + +namespace Sendov + +open Polynomial Multiset + +open scoped Classical in +/-- `∑ⱼ ∏_{k≠j} sₖ`. This is `(∏ s) · (∑ⱼ 1/sⱼ)` with the denominators cleared, and unlike +that expression it is well defined when some `sⱼ` vanishes. -/ +noncomputable def sumEraseProd (s : Multiset ℂ) : ℂ := + (s.map (fun j => (s.erase j).prod)).sum + +variable {n : ℕ} {a c : ℂ} {z q : Multiset ℂ} {p : ℂ[X]} + +/-! ### Two rewritings of the factorizations -/ + +/-- The factorization of `p`, with `a` put back into the multiset. -/ +lemma prod_cons_eq (a : ℂ) (z : Multiset ℂ) : + (X - C a) * (z.map (fun w => X - C w)).prod + = ((a ::ₘ z).map (fun w => X - C w)).prod := by + rw [Multiset.map_cons, Multiset.prod_cons] + +/-! ### The centroid identity -/ + +/-- **The centroid identity.** `(n-1)(a + ∑ zⱼ) = n ∑ⱼ (a - 1/qⱼ)`: the centroid of the +zeroes equals the centroid of the critical points. -/ +theorem centroid_identity (hn : 2 ≤ n) {p : ℂ[X]} (hc0 : c ≠ 0) + (hzcard : z.card = n - 1) (hqcard : q.card = n - 1) + (hpz : p = C c * ((X - C a) * (z.map (fun w => X - C w)).prod)) + (hpq : derivative p + = C ((n : ℂ) * c) * ((q.map (fun v => a - v⁻¹)).map (fun w => X - C w)).prod) : + ((n : ℂ) - 1) * (a + z.sum) = (n : ℂ) * (q.map (fun v => a - v⁻¹)).sum := by + have hcard1 : (a ::ₘ z).card = n := by + simp only [Multiset.card_cons, hzcard] + omega + have hcard2 : (q.map (fun v => a - v⁻¹)).card = n - 1 := by + rw [Multiset.card_map, hqcard] + -- the coefficient of `X^{n-1}` in `p` + have hp1 : p.coeff (n - 1) = c * (-(a + z.sum)) := by + rw [hpz, prod_cons_eq, coeff_C_mul] + congr 1 + have := multiset_prod_X_sub_C_coeff_card_pred (a ::ₘ z) (by rw [hcard1]; omega) + rw [hcard1] at this + rw [this, Multiset.sum_cons] + -- the coefficient of `X^{n-2}` in `p'` + have hp2 : (derivative p).coeff (n - 2) + = (n : ℂ) * c * (-((q.map (fun v => a - v⁻¹)).sum)) := by + rw [hpq, coeff_C_mul] + congr 1 + have := multiset_prod_X_sub_C_coeff_card_pred (q.map (fun v => a - v⁻¹)) + (by rw [hcard2]; omega) + rw [hcard2] at this + have hn2 : n - 1 - 1 = n - 2 := by omega + rwa [hn2] at this + -- and `p'.coeff (n-2) = (n-1) p.coeff (n-1)` + have hlink : (derivative p).coeff (n - 2) = p.coeff (n - 1) * ((n : ℂ) - 1) := by + have hsucc : n - 2 + 1 = n - 1 := by omega + have h1 : ((n - 2 : ℕ) : ℂ) + 1 = (n : ℂ) - 1 := by + have h2 : (2 : ℕ) ≤ n := hn + push_cast [Nat.cast_sub h2] + ring + rw [coeff_derivative, hsucc, h1] + rw [hp1, hp2] at hlink + refine mul_left_cancel₀ hc0 ?_ + linear_combination hlink + +/-! ### The second origin identity -/ + +@[simp] lemma sumEraseProd_zero : sumEraseProd 0 = 0 := by simp [sumEraseProd] + +open scoped Classical in +/-- Splitting off one element, exactly as `Multiset.esymm` does at the top index. -/ +lemma sumEraseProd_cons (v : ℂ) (t : Multiset ℂ) : + sumEraseProd (v ::ₘ t) = t.prod + v * sumEraseProd t := by + simp only [sumEraseProd, Multiset.map_cons, Multiset.sum_cons, Multiset.erase_cons_head] + congr 1 + rw [← Multiset.sum_map_mul_left] + refine congrArg Multiset.sum (Multiset.map_congr rfl ?_) + intro j hj + rw [Multiset.erase_cons_tail_of_mem hj, Multiset.prod_cons] + +/-- Negating a multiset before taking the product. -/ +lemma prod_map_neg (s : Multiset ℂ) : + (s.map (fun w => -w)).prod = (-1) ^ (Multiset.card s) * s.prod := by + induction s using Multiset.induction_on with + | empty => simp + | cons a t ih => + simp only [Multiset.map_cons, Multiset.prod_cons, Multiset.card_cons, ih] + ring + +/-- `∏ⱼ (X - zⱼ)` at the origin. -/ +lemma eval_prod_zero (z : Multiset ℂ) : + ((z.map (fun w => X - C w)).prod).eval 0 = (-1) ^ (Multiset.card z) * z.prod := by + rw [eval_multiset_prod, Multiset.map_map] + rw [show (z.map ((fun r : ℂ[X] => r.eval 0) ∘ (fun w => X - C w))).prod + = (z.map (fun w => -w)).prod from + congrArg Multiset.prod (Multiset.map_congr rfl fun w _ => by simp)] + exact prod_map_neg z + +/-- The derivative of `∏ⱼ (X - zⱼ)` at the origin. Proved by induction rather than through +`Polynomial.derivative_prod`, which would need the evaluation of a multiset sum. -/ +lemma eval_deriv_prod_zero : ∀ (z : Multiset ℂ), + (derivative (z.map (fun w => X - C w)).prod).eval 0 + = -((-1) ^ (Multiset.card z) * sumEraseProd z) := by + intro z + induction z using Multiset.induction_on with + | empty => simp + | cons v t ih => + simp only [Multiset.map_cons, Multiset.prod_cons, derivative_mul, derivative_sub, + derivative_X, derivative_C, sub_zero, one_mul, eval_add, eval_mul, eval_sub, eval_X, + eval_C, zero_sub, Multiset.card_cons] + rw [ih, eval_prod_zero, sumEraseProd_cons] + ring + +/-- `∏ⱼ (1/vⱼ - a) · ∏ⱼ vⱼ = ∏ⱼ (1 - a vⱼ)`: clearing the denominators of the `q`-side. -/ +lemma prod_inv_sub_mul : ∀ (q : Multiset ℂ), (∀ v ∈ q, v ≠ 0) → + (q.map (fun v => v⁻¹ - a)).prod * q.prod = (q.map (fun v => 1 - a * v)).prod := by + intro q + induction q using Multiset.induction_on with + | empty => simp + | cons v t ih => + intro hq + have hv : v ≠ 0 := hq v (Multiset.mem_cons_self v t) + have ht : ∀ w ∈ t, w ≠ 0 := fun w hw => hq w (Multiset.mem_cons_of_mem hw) + simp only [Multiset.map_cons, Multiset.prod_cons] + rw [← ih ht] + field_simp + +open scoped Classical in +/-- **The second origin identity**, division-free. The blog post's form +`(-1)^{n-1}(∏ zⱼ)(1 + a ∑ 1/zⱼ) = (n/∏ qⱼ) F(1)` after clearing both denominators. -/ +theorem second_origin_identity {p : ℂ[X]} (hc0 : c ≠ 0) + (hzcard : z.card = n - 1) (hq0 : ∀ v ∈ q, v ≠ 0) + (hpz : p = C c * ((X - C a) * (z.map (fun w => X - C w)).prod)) + (hpq : derivative p + = C ((n : ℂ) * c) * ((q.map (fun v => a - v⁻¹)).map (fun w => X - C w)).prod) : + (n : ℂ) * (q.map (fun v => 1 - a * v)).prod + = (-1) ^ (n - 1) * q.prod * (z.prod + a * sumEraseProd z) := by + -- `p'(0)` from the `q`-side + have hev1 : (derivative p).eval 0 = (n : ℂ) * c * (q.map (fun v => v⁻¹ - a)).prod := by + rw [hpq] + simp only [eval_mul, eval_C, eval_multiset_prod, Multiset.map_map] + congr 1 + refine congrArg Multiset.prod (Multiset.map_congr rfl ?_) + intro v _ + simp + -- `p'(0)` from the `z`-side + have hev2 : (derivative p).eval 0 + = c * ((-1) ^ (n - 1) * (z.prod + a * sumEraseProd z)) := by + rw [hpz, derivative_C_mul, derivative_mul, derivative_sub, derivative_X, derivative_C] + simp only [eval_mul, eval_C, eval_add, eval_sub, eval_X, sub_zero, zero_sub, one_mul] + rw [eval_deriv_prod_zero, eval_prod_zero, hzcard] + ring + -- combine and clear the denominators + have hcancel : (n : ℂ) * (q.map (fun v => v⁻¹ - a)).prod + = (-1) ^ (n - 1) * (z.prod + a * sumEraseProd z) := by + refine mul_left_cancel₀ hc0 ?_ + linear_combination hev1.symm.trans hev2 + calc (n : ℂ) * (q.map (fun v => 1 - a * v)).prod + = (n : ℂ) * ((q.map (fun v => v⁻¹ - a)).prod * q.prod) := by + rw [prod_inv_sub_mul q hq0] + _ = ((n : ℂ) * (q.map (fun v => v⁻¹ - a)).prod) * q.prod := by ring + _ = ((-1) ^ (n - 1) * (z.prod + a * sumEraseProd z)) * q.prod := by rw [hcancel] + _ = (-1) ^ (n - 1) * q.prod * (z.prod + a * sumEraseProd z) := by ring + +/-! ### The integral representation -/ + +open MeasureTheory in +/-- The integrand of the representation below is continuous. -/ +lemma continuous_deriv_seg (p : ℂ[X]) (a w : ℂ) : + Continuous fun t : ℝ => (derivative p).eval (a + (t : ℂ) * (w - a)) := by + fun_prop + +open MeasureTheory in +/-- **The integral representation.** `p(w) = (w-a) ∫₀¹ p'(a + t(w-a)) dt` when `a` is a root +of `p`. This is the fundamental theorem of calculus along the segment from `a` to `w`, +parametrized by a real variable; it replaces the blog post's `p(z) = (z-a)∫₀¹ n ∏ⱼ (t(z-a) + +1/qⱼ) dt`, which is the same statement with `p'` already factored. -/ +lemma eval_eq_integral {p : ℂ[X]} {a : ℂ} (hpa : p.eval a = 0) (w : ℂ) : + p.eval w = (w - a) * ∫ t in (0 : ℝ)..1, (derivative p).eval (a + (t : ℂ) * (w - a)) := by + have hderiv : ∀ t : ℝ, HasDerivAt (fun s : ℝ => p.eval (a + (s : ℂ) * (w - a))) + ((w - a) * (derivative p).eval (a + (t : ℂ) * (w - a))) t := by + intro t + have h1 : HasDerivAt (fun s : ℝ => a + (s : ℂ) * (w - a)) (w - a) t := by + have h0 : HasDerivAt (fun s : ℝ => (s : ℂ)) 1 t := Complex.ofRealCLM.hasDerivAt + simpa using (h0.mul_const (w - a)).const_add a + have h2 : HasDerivAt (fun u : ℂ => p.eval u) + ((derivative p).eval (a + (t : ℂ) * (w - a))) (a + (t : ℂ) * (w - a)) := + p.hasDerivAt _ + have h3 := h2.scomp t h1 + simp only [Function.comp_def] at h3 + exact h3 + have hint : IntervalIntegrable + (fun t : ℝ => (w - a) * (derivative p).eval (a + (t : ℂ) * (w - a))) volume 0 1 := + ((continuous_deriv_seg p a w).const_smul (w - a)).intervalIntegrable _ _ + have hFTC := intervalIntegral.integral_eq_sub_of_hasDerivAt + (fun t _ => hderiv t) hint + simp only [Complex.ofReal_one, Complex.ofReal_zero, zero_mul, add_zero, one_mul] at hFTC + rw [show a + (w - a) = w from by ring, hpa, sub_zero] at hFTC + rw [← hFTC, intervalIntegral.integral_const_mul] + +/-! ### The first origin identity -/ + +open MeasureTheory in +/-- **The first origin identity**, division-free. The blog post's +`(-1)^{n-1} ∏ zⱼ = (n / ∏ qⱼ) ∫₀¹ F(t) dt` with the denominator cleared, where +`F(t) = ∏ⱼ (1 - a t qⱼ)`. -/ +theorem first_origin_identity {p : ℂ[X]} (hc0 : c ≠ 0) (ha0 : a ≠ 0) + (hzcard : z.card = n - 1) (hq0 : ∀ v ∈ q, v ≠ 0) (hpa : p.eval a = 0) + (hpz : p = C c * ((X - C a) * (z.map (fun w => X - C w)).prod)) + (hpq : derivative p + = C ((n : ℂ) * c) * ((q.map (fun v => a - v⁻¹)).map (fun w => X - C w)).prod) : + (n : ℂ) * ∫ t in (0 : ℝ)..1, (q.map (fun v => 1 - a * (t : ℂ) * v)).prod + = (-1) ^ (n - 1) * q.prod * z.prod := by + -- `p(0)` through the integral representation + have hint : p.eval 0 + = -a * ∫ t in (0 : ℝ)..1, + (n : ℂ) * c * (q.map (fun v => v⁻¹ - (t : ℂ) * a)).prod := by + rw [eval_eq_integral hpa 0] + congr 1 + · ring + refine intervalIntegral.integral_congr ?_ + intro t _ + rw [hpq] + simp only [eval_mul, eval_C, eval_multiset_prod, Multiset.map_map] + congr 1 + refine congrArg Multiset.prod (Multiset.map_congr rfl ?_) + intro v _ + simp only [Function.comp_apply, eval_sub, eval_X, eval_C] + ring + -- `p(0)` from the `z`-side + have hev : p.eval 0 = c * (-a) * ((-1) ^ (n - 1) * z.prod) := by + rw [hpz] + simp only [eval_mul, eval_C, eval_sub, eval_X, zero_sub] + rw [eval_prod_zero, hzcard] + ring + -- cancel `-a c` and clear the remaining denominator + rw [intervalIntegral.integral_const_mul] at hint + have hcancel : (n : ℂ) * ∫ t in (0 : ℝ)..1, (q.map (fun v => v⁻¹ - (t : ℂ) * a)).prod + = (-1) ^ (n - 1) * z.prod := by + have hne : -a * c ≠ 0 := by simp [ha0, hc0] + refine mul_left_cancel₀ hne ?_ + linear_combination hint.symm.trans hev + calc (n : ℂ) * ∫ t in (0 : ℝ)..1, (q.map (fun v => 1 - a * (t : ℂ) * v)).prod + = (n : ℂ) * ∫ t in (0 : ℝ)..1, + (q.map (fun v => v⁻¹ - (t : ℂ) * a)).prod * q.prod := by + congr 1 + refine intervalIntegral.integral_congr ?_ + intro t _ + simp only [] + rw [prod_inv_sub_mul q hq0] + refine congrArg Multiset.prod (Multiset.map_congr rfl ?_) + intro v _ + ring + _ = ((n : ℂ) * ∫ t in (0 : ℝ)..1, (q.map (fun v => v⁻¹ - (t : ℂ) * a)).prod) * q.prod := by + rw [intervalIntegral.integral_mul_const] + ring + _ = ((-1) ^ (n - 1) * z.prod) * q.prod := by rw [hcancel] + _ = (-1) ^ (n - 1) * q.prod * z.prod := by ring + +/-! ### The polar identity -/ + +/-- Pulling a constant out of a product over a multiset. -/ +lemma prod_map_mul_const (b : ℂ) (s : Multiset ℂ) (f : ℂ → ℂ) : + (s.map (fun v => b * f v)).prod = b ^ (Multiset.card s) * (s.map f).prod := by + induction s using Multiset.induction_on with + | empty => simp + | cons v t ih => + simp only [Multiset.map_cons, Multiset.prod_cons, Multiset.card_cons, ih] + ring + +/-- `∏ⱼ (1/vⱼ) · ∏ⱼ vⱼ = 1`. -/ +lemma prod_inv_mul : ∀ (q : Multiset ℂ), (∀ v ∈ q, v ≠ 0) → + (q.map (fun v => v⁻¹)).prod * q.prod = 1 := by + intro q + induction q using Multiset.induction_on with + | empty => simp + | cons v t ih => + intro hq + have hv : v ≠ 0 := hq v (Multiset.mem_cons_self v t) + have ht : ∀ w ∈ t, w ≠ 0 := fun w hw => hq w (Multiset.mem_cons_of_mem hw) + simp only [Multiset.map_cons, Multiset.prod_cons] + rw [← ih ht] + field_simp + +/-- **`p'(a)` two ways.** `(∏ⱼ qⱼ) ∏ⱼ (a - zⱼ) = n`. This is what makes the polar identity +usable without dividing: it is the denominator of the blog post's +`∏ⱼ (1-azⱼ)/(a-zⱼ)`, expressed as a product. -/ +theorem prod_sub_mul_prod (hc0 : c ≠ 0) (hq0 : ∀ v ∈ q, v ≠ 0) + (hpz : p = C c * ((X - C a) * (z.map (fun w => X - C w)).prod)) + (hpq : derivative p + = C ((n : ℂ) * c) * ((q.map (fun v => a - v⁻¹)).map (fun w => X - C w)).prod) : + q.prod * (z.map (fun w => a - w)).prod = (n : ℂ) := by + have hev1 : (derivative p).eval a = (n : ℂ) * c * (q.map (fun v => v⁻¹)).prod := by + rw [hpq] + simp only [eval_mul, eval_C, eval_multiset_prod, Multiset.map_map] + congr 1 + refine congrArg Multiset.prod (Multiset.map_congr rfl ?_) + intro v _ + simp only [Function.comp_apply, eval_sub, eval_X, eval_C] + ring + have hev2 : (derivative p).eval a = c * (z.map (fun w => a - w)).prod := by + rw [hpz, derivative_C_mul, derivative_mul, derivative_sub, derivative_X, derivative_C] + simp only [eval_mul, eval_C, eval_add, eval_sub, eval_X, sub_zero, sub_self, zero_mul, + add_zero, one_mul, eval_multiset_prod, Multiset.map_map] + congr 1 + refine congrArg Multiset.prod (Multiset.map_congr rfl ?_) + intro w _ + simp + have hcancel : (z.map (fun w => a - w)).prod = (n : ℂ) * (q.map (fun v => v⁻¹)).prod := by + refine mul_left_cancel₀ hc0 ?_ + linear_combination hev2.symm.trans hev1 + calc q.prod * (z.map (fun w => a - w)).prod + = q.prod * ((n : ℂ) * (q.map (fun v => v⁻¹)).prod) := by rw [hcancel] + _ = (n : ℂ) * ((q.map (fun v => v⁻¹)).prod * q.prod) := by ring + _ = (n : ℂ) := by rw [prod_inv_mul q hq0]; ring + +open MeasureTheory in +/-- **The polar identity**, division-free. The blog post's +`∏ⱼ (1-azⱼ)/(a-zⱼ) = ∫₀¹ ∏ⱼ (t(1-a²)qⱼ + a) dt` with the denominator cleared using +`Sendov.prod_sub_mul_prod`. -/ +theorem polar_identity (hc0 : c ≠ 0) (ha0 : a ≠ 0) (ha2 : a ^ 2 ≠ 1) + (hzcard : z.card = n - 1) (hqcard : q.card = n - 1) (hq0 : ∀ v ∈ q, v ≠ 0) + (hpa : p.eval a = 0) + (hpz : p = C c * ((X - C a) * (z.map (fun w => X - C w)).prod)) + (hpq : derivative p + = C ((n : ℂ) * c) * ((q.map (fun v => a - v⁻¹)).map (fun w => X - C w)).prod) : + q.prod * (z.map (fun w => 1 - a * w)).prod + = (n : ℂ) * ∫ t in (0 : ℝ)..1, + (q.map (fun v => a + (t : ℂ) * (1 - a ^ 2) * v)).prod := by + have hinv : a⁻¹ - a ≠ 0 := by + intro h + rw [sub_eq_zero] at h + apply ha2 + field_simp at h + linear_combination -h + -- `p(1/a)` through the integral representation + have hint : p.eval a⁻¹ + = (a⁻¹ - a) * ((n : ℂ) * c * ∫ t in (0 : ℝ)..1, + (q.map (fun v => (t : ℂ) * (a⁻¹ - a) + v⁻¹)).prod) := by + rw [eval_eq_integral hpa a⁻¹] + congr 1 + have hcong : (∫ t in (0 : ℝ)..1, (derivative p).eval (a + (t : ℂ) * (a⁻¹ - a))) + = ∫ t in (0 : ℝ)..1, + (n : ℂ) * c * (q.map (fun v => (t : ℂ) * (a⁻¹ - a) + v⁻¹)).prod := by + refine intervalIntegral.integral_congr ?_ + intro t _ + simp only [] + rw [hpq] + simp only [eval_mul, eval_C, eval_multiset_prod, Multiset.map_map] + congr 1 + refine congrArg Multiset.prod (Multiset.map_congr rfl ?_) + intro v _ + simp only [Function.comp_apply, eval_sub, eval_X, eval_C] + ring + rw [hcong, intervalIntegral.integral_const_mul] + -- `p(1/a)` from the `z`-side + have hev : p.eval a⁻¹ = c * ((a⁻¹ - a) * (z.map (fun w => a⁻¹ - w)).prod) := by + rw [hpz] + simp only [eval_mul, eval_C, eval_sub, eval_X, eval_multiset_prod, Multiset.map_map] + congr 2 + refine congrArg Multiset.prod (Multiset.map_congr rfl ?_) + intro w _ + simp + -- cancel `c (1/a - a)` + have hcancel : (z.map (fun w => a⁻¹ - w)).prod + = (n : ℂ) * ∫ t in (0 : ℝ)..1, (q.map (fun v => (t : ℂ) * (a⁻¹ - a) + v⁻¹)).prod := by + have hne : c * (a⁻¹ - a) ≠ 0 := mul_ne_zero hc0 hinv + refine mul_left_cancel₀ hne ?_ + linear_combination hev.symm.trans hint + -- restore the two products + have hLHS : (z.map (fun w => 1 - a * w)).prod + = a ^ (n - 1) * (z.map (fun w => a⁻¹ - w)).prod := by + rw [← hzcard, ← prod_map_mul_const a z (fun w => a⁻¹ - w)] + refine congrArg Multiset.prod (Multiset.map_congr rfl ?_) + intro w _ + field_simp + have hRHS : ∀ t : ℝ, (q.map (fun v => a + (t : ℂ) * (1 - a ^ 2) * v)).prod + = a ^ (n - 1) * q.prod * (q.map (fun v => (t : ℂ) * (a⁻¹ - a) + v⁻¹)).prod := by + intro t + have h1 : (q.map (fun v => a + (t : ℂ) * (1 - a ^ 2) * v)).prod + = (q.map (fun v => a * (v * ((t : ℂ) * (a⁻¹ - a) + v⁻¹)))).prod := by + refine congrArg Multiset.prod (Multiset.map_congr rfl ?_) + intro v hv + have hv0 : v ≠ 0 := hq0 v hv + field_simp + ring + rw [h1, prod_map_mul_const a q (fun v => v * ((t : ℂ) * (a⁻¹ - a) + v⁻¹)), + Multiset.prod_map_mul, hqcard] + have : (q.map (fun v => v)).prod = q.prod := by rw [Multiset.map_id'] + rw [this] + ring + rw [hLHS] + calc q.prod * (a ^ (n - 1) * (z.map (fun w => a⁻¹ - w)).prod) + = a ^ (n - 1) * q.prod + * ((n : ℂ) * ∫ t in (0 : ℝ)..1, + (q.map (fun v => (t : ℂ) * (a⁻¹ - a) + v⁻¹)).prod) := by + rw [hcancel]; ring + _ = (n : ℂ) * ∫ t in (0 : ℝ)..1, + a ^ (n - 1) * q.prod * (q.map (fun v => (t : ℂ) * (a⁻¹ - a) + v⁻¹)).prod := by + rw [intervalIntegral.integral_const_mul]; ring + _ = (n : ℂ) * ∫ t in (0 : ℝ)..1, + (q.map (fun v => a + (t : ℂ) * (1 - a ^ 2) * v)).prod := by + congr 1 + refine intervalIntegral.integral_congr ?_ + intro t _ + simp only [] + rw [hRHS t] + +end Sendov diff --git a/LeanPool/Sendov/Defs.lean b/LeanPool/Sendov/Defs.lean new file mode 100644 index 0000000000..1b9f1b53ae --- /dev/null +++ b/LeanPool/Sendov/Defs.lean @@ -0,0 +1,120 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic + +/-! +# Definitions for the finite-range numerical claim + +This file fixes the notation of the numerical claim `stat`, the one step of the proof that is +discharged by computation rather than by argument. It contains definitions only; no statement +is made here. + +`stat` cannot be stated in this file, because every other file in the development imports it +for the definitions below, and putting the claim at the bottom of the import graph would +prevent it from being proved. It is stated and proved in `Sendov.FiniteRange.Cover`, so +auditing it means reading this file for the definitions and that one for the claim built from +them. + +For where `stat` enters the proof as a whole, see `Sendov.Reduction.Main` and the repository +README; for the finite-range component on its own, see `docs/finite-range.md`. + +## Background + +In the blog post one argues by contradiction from a degree `n` polynomial with all zeroes +in the unit disk, a zero `0 ≤ a < 1`, and all critical points at distance `≥ 1` from `a`. +Writing `α := (n-1)(1-a²)/2` and `β(1) := 1 - 2ax + a²` (where `x` is the real part of the +mean of the reciprocal critical-point data), the post derives: + +* `0 < β(1) < α/(3+α)` (the simplified polar inequality); +* `α ≤ 17` and an inequality `(1le)`, valid for `n ≥ 5`; +* the elimination of every degree `n ≥ 98` by an asymptotic argument. + +Monotonicity in `β(1)` lets one replace `β(1)` by `α/(3+α)` in `(1le)`, which replaces +`a x` by `c` and `β(t)` by `Q t` below. The resulting inequality is equation `stat` of the +post, namely `1 ≤ R n α`. The upper bound `c ≤ a x` moreover forces the feasibility +constraint `c ^ 2 ≤ A`, which is what keeps `α` away from its formal upper limit `(n-1)/2`. + +What is left open is that `stat` is infeasible on the remaining range + +`5 ≤ n ≤ 97`, `0 ≤ α ≤ 17`, `c ^ 2 ≤ A`, + +which is exactly `Sendov.finite_range` below. + +## Main statements + +* `Sendov.M`, `Sendov.A`, `Sendov.c`, `Sendov.Q`, `Sendov.R`: the quantities of `stat`. + +The claim assembled from them lives in `Sendov.FiniteRange.Cover`: + +* `Sendov.finite_range`: on the range above, `R n α < 1`; +* `Sendov.finite_range_le_100`: the same for `5 ≤ n ≤ 100`, which is what is actually + proved — the finite certification was pushed past `97` to meet the large-degree argument; +* `Sendov.finite_range_contradiction`: consequently the post's equation `stat`, + `1 ≤ R n α`, is contradictory on that range. This is the form in which the claim is + applied. + +## Implementation notes + +* `α = 0` is allowed, although the blog post has `α > 0` (an earlier inequality there was + divided by `α`). This makes the statement slightly stronger and is harmless: the bound + extends continuously to `α = 0` and stays below `1` there. +* No upper bound on `α` in terms of `n` is assumed: `hfeas` already forces `0 ≤ A n α`, + hence `α ≤ (n-1)/2`. +* The exponent `((n:ℝ) - 4) / 2` is a half-integer for odd `n`, so `Q n α t ^ _` is + `Real.rpow`. Under `hfeas` one has `0 ≤ Q n α t` for `0 ≤ t ≤ 1`, so no junk values of + `rpow` at negative bases arise; the integrand is continuous, so no integrability + hypothesis is needed either. + +## Numerical diagnostics + +These are *not* inputs to the proof, and must not be used as hypotheses; they are recorded +only to indicate the size of the margin. Numerically, `R n α` attains a maximum of about +`0.8529` over the feasible range, at `n = 53`, `α = 17` — which remains inside the range +below, so shortening it does not make the claim easier. For comparison, `R 5 0 ≈ 0.6458` +and `R 97 17 ≈ 0.2921`. The feasibility constraint is binding at low degree: it caps +`α ≲ 1.68` when `n = 5` and `α ≲ 2.19` when `n = 6`, and only ceases to cut into +`[0, 17]` from `n = 36` onwards. + +## References + +* T. Tao, *A digestion of the proof of Sendov's conjecture*, blog post, 2026. +-/ + +@[expose] public section + +namespace Sendov + +/-- `M n = n - 1`. All of the quantities below are naturally expressed in terms of it. -/ +noncomputable def M (n : ℕ) : ℝ := (n : ℝ) - 1 + +/-- `A n α = a ^ 2 = 1 - 2α/(n-1)`, from the definition `α = (n-1)(1-a²)/2` of `α`. +The blog post's `a ^ 4` is therefore `A n α ^ 2`. -/ +noncomputable def A (n : ℕ) (α : ℝ) : ℝ := 1 - 2 * α / M n + +/-- `c n α = 1 - α/(n-1) - α/(2(3+α))`: the value taken by `a * x` after the substitution +of `α/(3+α)` for `β(1)`. This is `c(α)` in the blog post. -/ +noncomputable def c (n : ℕ) (α : ℝ) : ℝ := 1 - α / M n - α / (2 * (3 + α)) + +/-- `Q n α t = 1 - 2 c t + A t ^ 2`: the quadratic replacing `β(t) = 1 - 2 a x t + a² t²` +after the substitution of `α/(3+α)` for `β(1)`. Note `Q n α 1 = α/(3+α)`. -/ +noncomputable def Q (n : ℕ) (α : ℝ) (t : ℝ) : ℝ := 1 - 2 * c n α * t + A n α * t ^ 2 + +/-- `R n α` is the right-hand side of equation `stat` of the blog post: +`1/6 + 1/(4(3+α)) + 1/(2(n-1)) + 1/(4(n-1)(3+α)) + + a⁴ n (n-1) (n-2)/(4(3+α)) * ∫ t in 0..1, t³ (1 - 2c(α)t + a²t²) ^ ((n-4)/2)`. -/ +noncomputable def R (n : ℕ) (α : ℝ) : ℝ := + 1 / 6 + 1 / (4 * (3 + α)) + 1 / (2 * M n) + 1 / (4 * M n * (3 + α)) + + A n α ^ 2 * n * M n * ((n : ℝ) - 2) / (4 * (3 + α)) * + ∫ t in (0 : ℝ)..1, t ^ 3 * Q n α t ^ (((n : ℝ) - 4) / 2) + +/-! The claim itself is stated and proved in `Sendov.FiniteRange.Cover` +(`Sendov.finite_range`, `Sendov.finite_range_contradiction`). It cannot live here: this file +sits at the bottom of the import graph, since every other file needs these definitions. -/ + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Batch.lean b/LeanPool/Sendov/FiniteRange/Batch.lean new file mode 100644 index 0000000000..395ea374a7 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Batch.lean @@ -0,0 +1,196 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Common.Rpow + +/-! +# Batching adjacent degrees + +Every term of `Sendov.R` is monotone in `n`, and the directions cooperate: the elementary +part decreases, the prefactor increases, and the moment decreases. So for a whole range of +degrees `n₀ ≤ n ≤ n₁` one bound suffices, + + `R n α ≤ base n₀ α + pref n₁ α * I n₀ α`, + +needing one moment and one certificate for the batch rather than one per degree. + +The key identity is + + `Q (n+1) α t = Q n α t - (2α / (n(n-1))) * t * (1-t)`, + +so `Q` decreases with `n` on `[0,1]`; combined with `Q ≤ 1` and the exponent `(n-4)/2` +increasing, the moment decreases too. + +This pays most where it costs most. Batch sizes track the slack in `R n α`, which is +smallest near its maximum at `n = 53` and grows away from it, so the expensive high degrees +batch into the largest groups: measured, `n ∈ [62,97]` costs 12.5× less batched, against 2.8× +in the tight middle. Note also that the certificate's degree is set by `n₀`, the *smallest* +member, so a batch is cheaper than any single degree it covers except the first. + +## Main statements + +* `Sendov.Q_succ_sub`: the identity above; +* `Sendov.Q_anti`: `Q` decreases with `n` on `[0,1]`; +* `Sendov.A_mono`: `A` increases with `n`. +-/ + +@[expose] public section + +namespace Sendov + +variable {α t : ℝ} + +lemma M_mono {m n : ℕ} (h : m ≤ n) : M m ≤ M n := by + simp only [M] + have : (m : ℝ) ≤ (n : ℝ) := by exact_mod_cast h + linarith + +/-- `A` increases with `n`: raising the degree moves `a²` towards `1`. -/ +lemma A_mono {m n : ℕ} (hm : 2 ≤ m) (h : m ≤ n) (hα : 0 ≤ α) : A m α ≤ A n α := by + have hMm : 0 < M m := M_pos hm + have hMn : 0 < M n := lt_of_lt_of_le hMm (M_mono h) + simp only [A] + have : 2 * α / M n ≤ 2 * α / M m := + div_le_div_of_nonneg_left (by linarith) hMm (M_mono h) + linarith + +/-- **The degree step.** Raising `n` by one lowers `Q` by a multiple of `t(1-t)`. -/ +lemma Q_succ_sub (n : ℕ) (hn : 2 ≤ n) (hα : 0 ≤ α) (t : ℝ) : + Q (n + 1) α t = Q n α t - (2 * α / ((n : ℝ) * ((n : ℝ) - 1))) * t * (1 - t) := by + have h1 : ((n : ℝ) - 1) ≠ 0 := by + have := M_pos hn; simp only [M] at this; linarith + have h2 : (n : ℝ) ≠ 0 := by + have : (2 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + linarith + have hM1 : M (n + 1) = (n : ℝ) := by simp only [M]; push_cast; ring + have hMn : M n = (n : ℝ) - 1 := by simp only [M] + simp only [Q, c, A, hM1, hMn] + field_simp + ring + +/-- `Q` decreases with `n` on `[0,1]`. -/ +lemma Q_anti {m n : ℕ} (hm : 2 ≤ m) (h : m ≤ n) (hα : 0 ≤ α) + (ht0 : 0 ≤ t) (ht1 : t ≤ 1) : Q n α t ≤ Q m α t := by + induction n with + | zero => omega + | succ n ih => + rcases Nat.lt_or_ge m (n + 1) with hlt | hge + · have hmn : m ≤ n := by omega + have hn2 : 2 ≤ n := le_trans hm hmn + have hstep : Q (n + 1) α t ≤ Q n α t := by + rw [Q_succ_sub n hn2 hα t] + have hnn : (0 : ℝ) ≤ 2 * α / ((n : ℝ) * ((n : ℝ) - 1)) := by + have h1 : (0 : ℝ) < (n : ℝ) - 1 := by + have := M_pos hn2; simp only [M] at this; linarith + have h2 : (0 : ℝ) < (n : ℝ) := by linarith + positivity + nlinarith [mul_nonneg (mul_nonneg hnn ht0) (by linarith : (0 : ℝ) ≤ 1 - t)] + exact le_trans hstep (ih hmn) + · have : m = n + 1 := by omega + subst this + exact le_rfl + +/-! ### The batch bound -/ + +open MeasureTheory + +/-- `x ^ y ≤ x ^ z` for `0 ≤ x ≤ 1` and `0 < z ≤ y`, allowing `x = 0`. -/ +lemma rpow_le_rpow_exponent_ge' {x y z : ℝ} (hx0 : 0 ≤ x) (hx1 : x ≤ 1) (hz : 0 < z) + (hzy : z ≤ y) : x ^ y ≤ x ^ z := by + rcases eq_or_lt_of_le hx0 with h | h + · rw [← h, Real.zero_rpow (by linarith), Real.zero_rpow (by linarith)] + · exact Real.rpow_le_rpow_of_exponent_ge h hx1 hzy + +/-- The moment decreases with the degree: `Q` falls and the exponent rises. -/ +theorem integral_anti {m n : ℕ} (hm : 5 ≤ m) (h : m ≤ n) (hα : 0 ≤ α) + (hcm : 0 ≤ c m α) (hfn : c n α ^ 2 ≤ A n α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q n α t ^ (((n : ℝ) - 4) / 2)) + ≤ ∫ t in (0 : ℝ)..1, t ^ 3 * Q m α t ^ (((m : ℝ) - 4) / 2) := by + have hm2 : 2 ≤ m := by omega + have hn2 : 2 ≤ n := by omega + have hmR : (5 : ℝ) ≤ (m : ℝ) := by exact_mod_cast hm + have hmnR : (m : ℝ) ≤ (n : ℝ) := by exact_mod_cast h + have hem : (0 : ℝ) < ((m : ℝ) - 4) / 2 := by linarith + have hen : (0 : ℝ) ≤ ((n : ℝ) - 4) / 2 := by linarith + refine intervalIntegral.integral_mono_on (by norm_num) + ((continuous_integrand n α hen).intervalIntegrable _ _) + ((continuous_integrand m α hem.le).intervalIntegrable _ _) ?_ + intro t ht + obtain ⟨ht0, ht1⟩ := ht + refine mul_le_mul_of_nonneg_left ?_ (pow_nonneg ht0 3) + have hQn : 0 ≤ Q n α t := Q_nonneg hfn t + have hmono : Q n α t ≤ Q m α t := Q_anti hm2 h hα ht0 ht1 + -- nonnegativity at `m` comes free from monotonicity, so feasibility at `m` is not needed + have hQm0 : 0 ≤ Q m α t := le_trans hQn hmono + have hQm1 : Q m α t ≤ 1 := Q_le_one hm2 hα hcm ht0 ht1 + have hstep1 : Q n α t ^ (((n : ℝ) - 4) / 2) ≤ Q m α t ^ (((n : ℝ) - 4) / 2) := + Real.rpow_le_rpow hQn hmono hen + have hstep2 : Q m α t ^ (((n : ℝ) - 4) / 2) ≤ Q m α t ^ (((m : ℝ) - 4) / 2) := + rpow_le_rpow_exponent_ge' hQm0 hQm1 hem (by linarith) + linarith + +/-- **The batch bound.** One evaluation covers every degree in `[n₀, n₁]`: the elementary +part and the moment at `n₀`, the prefactor at `n₁`. + +Only `0 ≤ c n₀ α` is required at `n₀`, not feasibility. That matters: feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`, and for `n₀ < 36` it +does not follow from `α ≤ 17` either. Nonnegativity of `Q` at `n₀` instead comes free from +`Q_anti`, since `Q n₀ ≥ Q n ≥ 0`. -/ +theorem R_le_batch {n₀ n n₁ : ℕ} (h0 : 5 ≤ n₀) (h1 : n₀ ≤ n) (h2 : n ≤ n₁) (hα : 0 ≤ α) + (hc0 : 0 ≤ c n₀ α) (hfn : c n α ^ 2 ≤ A n α) : + R n α ≤ 1 / 6 + 1 / (4 * (3 + α)) + 1 / (2 * M n₀) + 1 / (4 * M n₀ * (3 + α)) + + A n₁ α ^ 2 * n₁ * M n₁ * ((n₁ : ℝ) - 2) / (4 * (3 + α)) + * ∫ t in (0 : ℝ)..1, t ^ 3 * Q n₀ α t ^ (((n₀ : ℝ) - 4) / 2) := by + have hn2 : 2 ≤ n := by omega + have h02 : 2 ≤ n₀ := by omega + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + have hM0 : 0 < M n₀ := M_pos h02 + have hMn : 0 < M n := M_pos hn2 + have hMn1 : 0 < M n₁ := lt_of_lt_of_le hMn (M_mono h2) + -- the elementary part decreases + have hbase : 1 / (2 * M n) + 1 / (4 * M n * (3 + α)) + ≤ 1 / (2 * M n₀) + 1 / (4 * M n₀ * (3 + α)) := by + have hMM : M n₀ ≤ M n := M_mono h1 + have e1 : 1 / (2 * M n) ≤ 1 / (2 * M n₀) := by + apply one_div_le_one_div_of_le (by linarith); linarith + have e2 : 1 / (4 * M n * (3 + α)) ≤ 1 / (4 * M n₀ * (3 + α)) := by + apply one_div_le_one_div_of_le (by positivity); nlinarith + linarith + -- the prefactor increases + have hAn : 0 ≤ A n α := A_nonneg hfn + have hApre : A n α ≤ A n₁ α := A_mono hn2 h2 hα + have hnn1 : (n : ℝ) ≤ (n₁ : ℝ) := by exact_mod_cast h2 + have hn2R : (2 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn2 + have hn12 : (2 : ℝ) ≤ (n₁ : ℝ) := le_trans hn2R hnn1 + have hA2 : A n α ^ 2 ≤ A n₁ α ^ 2 := by nlinarith [hAn, hApre] + have hnn : (0 : ℝ) ≤ (n : ℝ) := by positivity + have hMle : M n ≤ M n₁ := M_mono h2 + have hA1nn : (0 : ℝ) ≤ A n₁ α ^ 2 := sq_nonneg _ + have e1 : A n α ^ 2 * n ≤ A n₁ α ^ 2 * n₁ := mul_le_mul hA2 hnn1 hnn hA1nn + have e2 : A n α ^ 2 * n * M n ≤ A n₁ α ^ 2 * n₁ * M n₁ := + mul_le_mul e1 hMle hMn.le (by positivity) + have e3 : A n α ^ 2 * n * M n * ((n : ℝ) - 2) ≤ A n₁ α ^ 2 * n₁ * M n₁ * ((n₁ : ℝ) - 2) := + mul_le_mul e2 (by linarith) (by linarith) (by positivity) + have hc : (0 : ℝ) < 4 * (3 + α) := by positivity + have hpref : A n α ^ 2 * n * M n * ((n : ℝ) - 2) / (4 * (3 + α)) + ≤ A n₁ α ^ 2 * n₁ * M n₁ * ((n₁ : ℝ) - 2) / (4 * (3 + α)) := by + rw [div_le_div_iff_of_pos_right hc] + exact e3 + -- the moment decreases + have hI := integral_anti (m := n₀) (n := n) h0 h1 hα hc0 hfn + have hInn : 0 ≤ ∫ t in (0 : ℝ)..1, t ^ 3 * Q n α t ^ (((n : ℝ) - 4) / 2) := by + apply intervalIntegral.integral_nonneg (by norm_num) + intro u hu + exact mul_nonneg (pow_nonneg hu.1 3) (Real.rpow_nonneg (Q_nonneg hfn u) _) + have hprefnn : 0 ≤ A n₁ α ^ 2 * n₁ * M n₁ * ((n₁ : ℝ) - 2) / (4 * (3 + α)) := by + have h4 : (0 : ℝ) ≤ (n₁ : ℝ) - 2 := by linarith + have h5 : (0 : ℝ) ≤ M n₁ := hMn1.le + positivity + rw [R] + nlinarith [hbase, hpref, hI, hInn, hprefnn] + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Certificate.lean b/LeanPool/Sendov/FiniteRange/Certificate.lean new file mode 100644 index 0000000000..0864c5fd4f --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Certificate.lean @@ -0,0 +1,229 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Batch +public import LeanPool.Sendov.FiniteRange.PackBridge + +/-! +# Kernel-checked Bernstein certificates + +Each batch file `Sendov.FiniteRange.Degree_` proves `R n α < 1` for `n₀ ≤ n ≤ n₁` by +bounding `R n α` through `Sendov.R_le_batch` by a rational function of `α`, and certifying that +the numerator of `1 - bound` is positive on the batch's `α`-range. Upstream, each certificate +was an explicit polynomial identity closed by `ring` under a raised heartbeat budget, and the +rational bound was cleared by `field_simp` in every batch. Here the same data are checked by +the kernel instead: + +* `Sendov.bern p q d b` expands `∑ⱼ bⱼ Xʲ (p - q X)^(d-j)` into a coefficient list, so the + statement "`p ^ d • P` has Bernstein coefficients `b` on `[0, p/q]`" is a decidable equality + of lists, and `Sendov.pev_pos_of_bern` turns positive coefficients into positivity of `P`; +* `Sendov.batchP n₀ n₁ k L Nmom` computes the numerator polynomial directly from the batch + parameters and the moment numerator, and `Sendov.batch_lt_one` proves once, for symbolic + `n₀`, `n₁`, `k`, that positivity of this polynomial gives the batch bound `< 1`. + +Numerals beyond 90 digits cannot sit on one line; `Sendov.big` assembles them from decimal +chunks. +-/ + +@[expose] public section + +namespace Sendov + +/-- A large natural number assembled from little-endian chunks of at most 90 decimal +digits, as an integer. -/ +def big (chunks : List ℕ) : ℤ := (npev chunks (10 ^ 90) : ℤ) + +/-! ### Polynomial arithmetic on coefficient lists -/ + +/-- Scalar multiple of a dense integer polynomial. -/ +def pscale (c : ℤ) (p : List ℤ) : List ℤ := p.map (fun a => c * a) + +lemma pev_pscale (c : ℤ) (p : List ℤ) (x : ℝ) : pev (pscale c p) x = (c : ℝ) * pev p x := + pev_map_mul c p x + +/-- Difference of dense integer polynomials. -/ +def psub (p q : List ℤ) : List ℤ := padd p (pscale (-1) q) + +lemma pev_psub (p q : List ℤ) (x : ℝ) : pev (psub p q) x = pev p x - pev q x := by + rw [psub, pev_padd, pev_pscale] + push_cast + ring + +/-- Power of a dense integer polynomial. -/ +def ppow (p : List ℤ) : ℕ → List ℤ + | 0 => [1] + | k + 1 => pmul p (ppow p k) + +lemma pev_ppow (p : List ℤ) (k : ℕ) (x : ℝ) : pev (ppow p k) x = pev p x ^ k := by + induction k with + | zero => simp [ppow] + | succ k ih => rw [ppow, pev_pmul, ih, pow_succ, mul_comm] + +lemma pev_lin (p q : ℤ) (x : ℝ) : pev [p, -q] x = p - q * x := by + simp [pev] + ring + +lemma pev_three_add (x : ℝ) : pev [3, 1] x = 3 + x := by simp [pev] + +lemma pev_X (x : ℝ) : pev [0, 1] x = x := by simp [pev] + +/-! ### Bernstein expansion -/ + +/-- `bern p q d b` is `∑ⱼ bⱼ Xʲ (p - q X)^(d-j)` as a coefficient list, the entries of `b` +being listed from `j = 0`. -/ +def bern (p q : ℤ) : ℕ → List ℤ → List ℤ + | _, [] => [] + | d, a :: rest => padd (pscale a (ppow [p, -q] d)) (0 :: bern p q (d - 1) rest) + +lemma pev_bern_cons (p q : ℤ) (d : ℕ) (a : ℤ) (rest : List ℤ) (x : ℝ) : + pev (bern p q d (a :: rest)) x + = a * (p - q * x) ^ d + x * pev (bern p q (d - 1) rest) x := by + rw [bern, pev_padd, pev_pscale, pev_ppow, pev_lin, pev_cons] + push_cast + ring + +lemma bern_nonneg {p q : ℤ} {x : ℝ} (hx : 0 ≤ x) (hxp : (q : ℝ) * x ≤ p) : + ∀ (d : ℕ) (b : List ℤ), (∀ a ∈ b, 0 ≤ a) → 0 ≤ pev (bern p q d b) x := by + intro d b + induction b generalizing d with + | nil => intro _; simp [bern] + | cons a rest ih => + intro hb + rw [pev_bern_cons] + have ha : (0 : ℝ) ≤ a := by exact_mod_cast hb a (List.mem_cons_self ..) + have hrest := ih (d - 1) (fun c hc => hb c (List.mem_cons_of_mem a hc)) + have hlin : (0 : ℝ) ≤ p - q * x := by linarith + exact add_nonneg (mul_nonneg ha (pow_nonneg hlin d)) (mul_nonneg hx hrest) + +lemma bern_pos {p q : ℤ} (hp : 0 < p) {x : ℝ} (hx : 0 ≤ x) (hxp : (q : ℝ) * x ≤ p) : + ∀ (d : ℕ) (b : List ℤ), b.length = d + 1 → (∀ a ∈ b, 0 < a) → + 0 < pev (bern p q d b) x := by + intro d b + induction b generalizing d with + | nil => intro h; simp at h + | cons a rest ih => + intro hlen hb + have ha : (0 : ℝ) < a := by exact_mod_cast hb a (List.mem_cons_self ..) + have hlin : (0 : ℝ) ≤ p - q * x := by linarith + have hpR : (0 : ℝ) < p := by exact_mod_cast hp + rcases rest with _ | ⟨c, rest⟩ + · obtain rfl : d = 0 := by simpa using hlen + rw [pev_bern_cons] + simpa [bern] using ha + · obtain ⟨d', rfl⟩ : ∃ d', d = d' + 1 := ⟨d - 1, by simp at hlen; omega⟩ + rw [pev_bern_cons, Nat.add_sub_cancel] + have hrest := ih d' (by simpa using hlen) (fun e he => hb e (List.mem_cons_of_mem a he)) + rcases lt_or_eq_of_le hxp with hlt | heq + · have h1 : (0 : ℝ) < a * (p - q * x) ^ (d' + 1) := + mul_pos ha (pow_pos (by linarith) _) + have h2 : (0 : ℝ) ≤ x * pev (bern p q d' (c :: rest)) x := mul_nonneg hx hrest.le + linarith + · have hxpos : 0 < x := by + rcases hx.lt_or_eq with h | h + · exact h + · rw [← h, mul_zero] at heq + linarith + have h1 : (0 : ℝ) ≤ a * (p - q * x) ^ (d' + 1) := + mul_nonneg ha.le (pow_nonneg hlin _) + have h2 : (0 : ℝ) < x * pev (bern p q d' (c :: rest)) x := mul_pos hxpos hrest + linarith + +/-- Positivity from a Bernstein certificate: if `bern p q d B = pscale (p ^ d) P` and every +entry of `B` is positive, then `P` is positive on `[0, p/q]`. All closed hypotheses are +decidable and are discharged by the kernel in the batch files. -/ +theorem pev_pos_of_bern (P B : List ℤ) (p q : ℤ) (d : ℕ) (hp : 0 < p) (_hq : 0 < q) + (hlen : B.length = d + 1) (hpos : ∀ a ∈ B, 0 < a) + (hcert : bern p q d B = pscale (p ^ d) P) + {x : ℝ} (hx : 0 ≤ x) (hxp : (q : ℝ) * x ≤ p) : 0 < pev P x := by + have h := bern_pos hp hx hxp d B hlen hpos + rw [hcert, pev_pscale] at h + have hpd : (0 : ℝ) < ((p ^ d : ℤ) : ℝ) := by exact_mod_cast pow_pos hp d + rcases lt_or_ge 0 (pev P x) with hpos | hneg + · exact hpos + · exfalso + have := mul_nonpos_of_nonneg_of_nonpos hpd.le hneg + linarith + +/-! ### The batch bound as a rational function -/ + +/-- The denominator of the batch bound of `Sendov.R_le_batch`, after the moment +substitution, as a polynomial in `α`: with `m₀ = n₀ - 1` and `m₁ = n₁ - 1`, +`12 m₀ m₁² L (2m₀)^k (3+α)^(k+1)`. -/ +def batchD (n₀ n₁ k : ℕ) (L : ℤ) : List ℤ := + pscale (12 * ((n₀ : ℤ) - 1) * ((n₁ : ℤ) - 1) ^ 2 * L * (2 * ((n₀ : ℤ) - 1)) ^ k) + (ppow [3, 1] (k + 1)) + +/-- The numerator of the batch bound over the denominator `Sendov.batchD`. -/ +def batchN (n₀ n₁ k : ℕ) (L : ℤ) (Nmom : List ℤ) : List ℤ := + padd (pscale (2 * ((n₀ : ℤ) - 1) * ((n₁ : ℤ) - 1) ^ 2 * (L * (2 * ((n₀ : ℤ) - 1)) ^ k)) + (ppow [3, 1] (k + 1))) + (padd (pscale (3 * ((n₀ : ℤ) - 1) * ((n₁ : ℤ) - 1) ^ 2 * (L * (2 * ((n₀ : ℤ) - 1)) ^ k)) + (ppow [3, 1] k)) + (padd (pscale (6 * ((n₁ : ℤ) - 1) ^ 2 * (L * (2 * ((n₀ : ℤ) - 1)) ^ k)) + (ppow [3, 1] (k + 1))) + (padd (pscale (3 * ((n₁ : ℤ) - 1) ^ 2 * (L * (2 * ((n₀ : ℤ) - 1)) ^ k)) + (ppow [3, 1] k)) + (pscale (3 * ((n₀ : ℤ) - 1) * n₁ * ((n₁ : ℤ) - 1) * ((n₁ : ℤ) - 2)) + (pmul (ppow [((n₁ : ℤ) - 1), -2] 2) Nmom))))) + +/-- The numerator of `1 - bound`: the polynomial that each batch certifies positive. -/ +def batchP (n₀ n₁ k : ℕ) (L : ℤ) (Nmom : List ℤ) : List ℤ := + psub (batchD n₀ n₁ k L) (batchN n₀ n₁ k L Nmom) + +lemma two_alpha_le_of_le {n n₁ : ℕ} {α : ℝ} (hn : 2 ≤ n) (h1 : n ≤ n₁) + (hfeas : c n α ^ 2 ≤ A n α) : 2 * α ≤ (n₁ : ℝ) - 1 := by + have h := alpha_le_half_M hn hfeas + have hcast : (n : ℝ) ≤ n₁ := by exact_mod_cast h1 + simp only [M] at h + linarith + +/-- **The batch bound is below `1`** once its numerator `Sendov.batchP` is positive. The +hypothesis `hint` is the packed moment identity of the batch (`Sendov.integral_moment_packed`), +and the conclusion is exactly the right-hand side of `Sendov.R_le_batch`. -/ +theorem batch_lt_one {n₀ n₁ k : ℕ} (hn₀ : 5 ≤ n₀) (hk : n₀ = 2 * k + 4) (h01 : n₀ ≤ n₁) + (L : ℤ) (hL : 0 < L) (Nmom : List ℤ) {α : ℝ} (hα : 0 ≤ α) + (hint : (∫ t in (0 : ℝ)..1, t ^ 3 * Q n₀ α t ^ k) + = pev Nmom α / ((L : ℝ) * (2 * M n₀ * (3 + α)) ^ k)) + (hP : 0 < pev (batchP n₀ n₁ k L Nmom) α) : + 1 / 6 + 1 / (4 * (3 + α)) + 1 / (2 * M n₀) + 1 / (4 * M n₀ * (3 + α)) + + A n₁ α ^ 2 * n₁ * M n₁ * ((n₁ : ℝ) - 2) / (4 * (3 + α)) + * ∫ t in (0 : ℝ)..1, t ^ 3 * Q n₀ α t ^ (((n₀ : ℝ) - 4) / 2) < 1 := by + have hexp : ((n₀ : ℝ) - 4) / 2 = ((k : ℕ) : ℝ) := by + subst hk + push_cast + ring + simp only [hexp, Real.rpow_natCast] + rw [hint] + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + have hm₀ : (0 : ℝ) < (n₀ : ℝ) - 1 := by + have : (5 : ℝ) ≤ n₀ := by exact_mod_cast hn₀ + linarith + have hm₁ : (0 : ℝ) < (n₁ : ℝ) - 1 := by + have : (n₀ : ℝ) ≤ n₁ := by exact_mod_cast h01 + linarith + have hLR : (0 : ℝ) < L := by exact_mod_cast hL + have hD : (0 : ℝ) < pev (batchD n₀ n₁ k L) α := by + rw [batchD, pev_pscale, pev_ppow, pev_three_add] + push_cast + positivity + have hS : 1 / 6 + 1 / (4 * (3 + α)) + 1 / (2 * M n₀) + 1 / (4 * M n₀ * (3 + α)) + + A n₁ α ^ 2 * n₁ * M n₁ * ((n₁ : ℝ) - 2) / (4 * (3 + α)) + * (pev Nmom α / ((L : ℝ) * (2 * M n₀ * (3 + α)) ^ k)) + = pev (batchN n₀ n₁ k L Nmom) α / pev (batchD n₀ n₁ k L) α := by + rw [eq_div_iff hD.ne'] + simp only [batchN, batchD, pev_padd, pev_pscale, pev_pmul, pev_ppow, pev_three_add, + pev_lin, A, M] + push_cast + simp only [mul_pow] + field_simp + ring + rw [hS, div_lt_one hD] + have hsub := pev_psub (batchD n₀ n₁ k L) (batchN n₀ n₁ k L Nmom) α + rw [batchP] at hP + linarith + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Cover.lean b/LeanPool/Sendov/FiniteRange/Cover.lean new file mode 100644 index 0000000000..41e303bf67 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Cover.lean @@ -0,0 +1,184 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Degree5 +public import LeanPool.Sendov.FiniteRange.Degree7 +public import LeanPool.Sendov.FiniteRange.Degree6To6 +public import LeanPool.Sendov.FiniteRange.Degree8To9 +public import LeanPool.Sendov.FiniteRange.Degree10To11 +public import LeanPool.Sendov.FiniteRange.Degree12To13 +public import LeanPool.Sendov.FiniteRange.Degree14To15 +public import LeanPool.Sendov.FiniteRange.Degree16To18 +public import LeanPool.Sendov.FiniteRange.Degree18To20 +public import LeanPool.Sendov.FiniteRange.Degree20To22 +public import LeanPool.Sendov.FiniteRange.Degree22To24 +public import LeanPool.Sendov.FiniteRange.Degree24To26 +public import LeanPool.Sendov.FiniteRange.Degree26To27 +public import LeanPool.Sendov.FiniteRange.Degree28To29 +public import LeanPool.Sendov.FiniteRange.Degree30To31 +public import LeanPool.Sendov.FiniteRange.Degree32To33 +public import LeanPool.Sendov.FiniteRange.Degree34To35 +public import LeanPool.Sendov.FiniteRange.Degree36To37 +public import LeanPool.Sendov.FiniteRange.Degree38To39 +public import LeanPool.Sendov.FiniteRange.Degree40To41 +public import LeanPool.Sendov.FiniteRange.Degree42To43 +public import LeanPool.Sendov.FiniteRange.Degree44To45 +public import LeanPool.Sendov.FiniteRange.Degree46To47 +public import LeanPool.Sendov.FiniteRange.Degree48To49 +public import LeanPool.Sendov.FiniteRange.Degree50To51 +public import LeanPool.Sendov.FiniteRange.Degree52To53 +public import LeanPool.Sendov.FiniteRange.Degree54To55 +public import LeanPool.Sendov.FiniteRange.Degree56To58 +public import LeanPool.Sendov.FiniteRange.Degree58To60 +public import LeanPool.Sendov.FiniteRange.Degree60To63 +public import LeanPool.Sendov.FiniteRange.Degree64To69 +public import LeanPool.Sendov.FiniteRange.Degree70To79 +public import LeanPool.Sendov.FiniteRange.Degree80To100 + +/-! +# The finite range `5 ≤ n ≤ 100` + +This file does nothing but assemble the individual degree files and the degree *batches* into +a single statement. Its only content is the case split, so it is also where the claim "every +degree in the range is covered" gets checked: the branches below are generated from the batch +plan, and the file would not compile if a degree were skipped. + +Degrees `5` and `7` are handled one at a time (`Sendov.finite_range_five`, +`Sendov.finite_range_seven`); every other degree is covered by a batch `B n₀ n₁`, whose proof +is a single Bernstein certificate valid simultaneously for all `n₀ ≤ n ≤ n₁`. +-/ + +@[expose] public section + +namespace Sendov + +variable {α : ℝ} + +/-- **The finite range.** Every degree from `5` to `100` inclusive. -/ +theorem finite_range_le_100 {n : ℕ} (h0 : 5 ≤ n) (h1 : n ≤ 100) + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + -- degrees 5..5 + rcases Nat.lt_or_ge n 6 with h | h + · obtain rfl : n = 5 := by omega + exact finite_range_five hα hfeas + -- degrees 6..6 + rcases Nat.lt_or_ge n 7 with h | h + · exact Batch6To6.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 7..7 + rcases Nat.lt_or_ge n 8 with h | h + · obtain rfl : n = 7 := by omega + exact finite_range_seven hα hfeas + -- degrees 8..9 + rcases Nat.lt_or_ge n 10 with h | h + · exact Batch8To9.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 10..11 + rcases Nat.lt_or_ge n 12 with h | h + · exact Batch10To11.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 12..13 + rcases Nat.lt_or_ge n 14 with h | h + · exact Batch12To13.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 14..15 + rcases Nat.lt_or_ge n 16 with h | h + · exact Batch14To15.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 16..18 + rcases Nat.lt_or_ge n 19 with h | h + · exact Batch16To18.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 19..20 + rcases Nat.lt_or_ge n 21 with h | h + · exact Batch18To20.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 21..22 + rcases Nat.lt_or_ge n 23 with h | h + · exact Batch20To22.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 23..24 + rcases Nat.lt_or_ge n 25 with h | h + · exact Batch22To24.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 25..26 + rcases Nat.lt_or_ge n 27 with h | h + · exact Batch24To26.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 27..27 + rcases Nat.lt_or_ge n 28 with h | h + · exact Batch26To27.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 28..29 + rcases Nat.lt_or_ge n 30 with h | h + · exact Batch28To29.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 30..31 + rcases Nat.lt_or_ge n 32 with h | h + · exact Batch30To31.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 32..33 + rcases Nat.lt_or_ge n 34 with h | h + · exact Batch32To33.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 34..35 + rcases Nat.lt_or_ge n 36 with h | h + · exact Batch34To35.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 36..37 + rcases Nat.lt_or_ge n 38 with h | h + · exact Batch36To37.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 38..39 + rcases Nat.lt_or_ge n 40 with h | h + · exact Batch38To39.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 40..41 + rcases Nat.lt_or_ge n 42 with h | h + · exact Batch40To41.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 42..43 + rcases Nat.lt_or_ge n 44 with h | h + · exact Batch42To43.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 44..45 + rcases Nat.lt_or_ge n 46 with h | h + · exact Batch44To45.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 46..47 + rcases Nat.lt_or_ge n 48 with h | h + · exact Batch46To47.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 48..49 + rcases Nat.lt_or_ge n 50 with h | h + · exact Batch48To49.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 50..51 + rcases Nat.lt_or_ge n 52 with h | h + · exact Batch50To51.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 52..53 + rcases Nat.lt_or_ge n 54 with h | h + · exact Batch52To53.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 54..55 + rcases Nat.lt_or_ge n 56 with h | h + · exact Batch54To55.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 56..58 + rcases Nat.lt_or_ge n 59 with h | h + · exact Batch56To58.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 59..60 + rcases Nat.lt_or_ge n 61 with h | h + · exact Batch58To60.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 61..63 + rcases Nat.lt_or_ge n 64 with h | h + · exact Batch60To63.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 64..69 + rcases Nat.lt_or_ge n 70 with h | h + · exact Batch64To69.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 70..79 + rcases Nat.lt_or_ge n 80 with h | h + · exact Batch70To79.finite_range (by omega) (by omega) hα hα' hfeas + -- degrees 80..100 + exact Batch80To100.finite_range (by omega) (by omega) hα hα' hfeas + +/-- **The finite-range claim.** The right-hand side of equation `stat` of the blog post is +strictly less than `1` on the range of degrees and of `α` left open there, that is, on +`5 ≤ n ≤ 97`, `0 ≤ α ≤ 17`, subject to the feasibility constraint `c ^ 2 ≤ A`. + +This is the original challenge statement. It is a special case of `finite_range_le_100`, +which covers three more degrees: the finite certification was pushed from `97` to `100` so +that it meets the large-degree argument of `Sendov.LargeDegree` with room to spare. -/ +theorem finite_range (n : ℕ) (α : ℝ) (hn : 5 ≤ n) (hn' : n ≤ 97) + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : + R n α < 1 := + finite_range_le_100 hn (by omega) hα hα' hfeas + +/-- Equation `stat` of the blog post is infeasible on the range +`5 ≤ n ≤ 97`, `0 ≤ α ≤ 17`, `c ^ 2 ≤ A`. This is the form in which the claim is used. -/ +theorem finite_range_contradiction (n : ℕ) (α : ℝ) (hn : 5 ≤ n) (hn' : n ≤ 97) + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) (hstat : 1 ≤ R n α) : + False := + absurd hstat (not_le.2 (finite_range n α hn hn' hα hα' hfeas)) + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree10To11.lean b/LeanPool/Sendov/FiniteRange/Degree10To11.lean new file mode 100644 index 0000000000..384096e731 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree10To11.lean @@ -0,0 +1,122 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 10 to 11 + +`Sendov.R_le_batch` bounds every `R n α` for `10 ≤ n ≤ 11` by the elementary part and +moment at `n₀ = 10` together with the prefactor at `n₁ = 11`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 8, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 10 11 3 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 5]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch10To11 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 2520 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 82590802561 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 81496854475499965300896802417388157646295122586173254149900368313668004057389423899346929, + 484002949944962611058313401] + +/-- The moment numerator at `n₀ = 10`, `k = 3`. -/ +def Nmomc : List ℤ := [ + 472392, + 1312200, + 1971216, + 3407184, + 294192, + 12096, + 192] + +/-- Bernstein coefficients of `5 ^ 8 * batchP 10 11 3 Lc Nmomc` on `[0, 5]`. -/ +def Bc : List ℤ := [ + 7546462200000, + 106071372072000, + 590024221488000, + 1022404934016000, + 1176704065080000, + 2736859476600000, + 4242813219072000, + 2642855620608000, + 483084435456000] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 10 α = (54 + 3 * α - 2 * α ^ 2) / (18 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 5) : 0 ≤ c 10 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 10) (gg1 10) (gg2 10) 3)) α := + pev_wsum_eq_of_packed (gg0 10) (gg1 10) (gg2 10) 3 10 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 10) (gg1 10) (gg2 10) 3 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 10) (gg1 10) (gg2 10) 3 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 10) (gg1 10) (gg2 10) 3 (by simp) (by simp) (by simp) 3)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 10 α t ^ 3) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 10 * (3 + α)) ^ 3) := + integral_moment_packed 10 3 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 10 11 3 Lc Nmomc` is positive on `[0, 5]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 5) : + 0 < pev (batchP 10 11 3 Lc Nmomc) α := + pev_pos_of_bern _ Bc 5 1 8 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `10 ≤ n ≤ 11`.** -/ +theorem finite_range {n : ℕ} (h0 : 10 ≤ n) (h1 : n ≤ 11) {α : ℝ} + (hα : 0 ≤ α) (_hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (11 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 10) (n := n) (n₁ := 11) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch10To11 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree12To13.lean b/LeanPool/Sendov/FiniteRange/Degree12To13.lean new file mode 100644 index 0000000000..91df0c964a --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree12To13.lean @@ -0,0 +1,127 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 12 to 13 + +`Sendov.R_le_batch` bounds every `R n α` for `12 ≤ n ≤ 13` by the elementary part and +moment at `n₀ = 12` together with the prefactor at `n₁ = 13`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 10, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 12 13 4 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 6]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch12To13 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 27720 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 538941732215041 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 435248501929604780211870392204795696401964180489810388769719091757577450834981070202288673, + 180756234778163021074014036716599319294695000296491713270664825204672831809746575409998007, + 6292050050870377734039] + +/-- The moment numerator at `n₀ = 12`, `k = 4`. -/ +def Nmomc : List ℤ := [ + 265646304, + 754389504, + 1044603648, + 1046977536, + 1399732528, + 127959680, + 6424320, + 167936, + 1792] + +/-- Bernstein coefficients of `6 ^ 10 * batchP 12 13 4 Lc Nmomc` on `[0, 6]`. -/ +def Bc : List ℤ := [ + 18738341756209152, + 369304821659271168, + 3125326175066456064, + 14491775837857038336, + 31455696526840295424, + 37998275937620410368, + 48183437605113372672, + 77289206430873305088, + 78482217686052685824, + 36662921411251322880, + 5521524308923392000] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 12 α = (66 + 5 * α - 2 * α ^ 2) / (22 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 6) : 0 ≤ c 12 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 12) (gg1 12) (gg2 12) 4)) α := + pev_wsum_eq_of_packed (gg0 12) (gg1 12) (gg2 12) 4 13 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 12) (gg1 12) (gg2 12) 4 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 12) (gg1 12) (gg2 12) 4 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 12) (gg1 12) (gg2 12) 3 (by simp) (by simp) (by simp) 4)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 12 α t ^ 4) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 12 * (3 + α)) ^ 4) := + integral_moment_packed 12 4 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 12 13 4 Lc Nmomc` is positive on `[0, 6]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 6) : + 0 < pev (batchP 12 13 4 Lc Nmomc) α := + pev_pos_of_bern _ Bc 6 1 10 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `12 ≤ n ≤ 13`.** -/ +theorem finite_range {n : ℕ} (h0 : 12 ≤ n) (h1 : n ≤ 13) {α : ℝ} + (hα : 0 ≤ α) (_hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (13 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 12) (n := n) (n₁ := 13) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch12To13 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree14To15.lean b/LeanPool/Sendov/FiniteRange/Degree14To15.lean new file mode 100644 index 0000000000..87826680f2 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree14To15.lean @@ -0,0 +1,132 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 14 to 15 + +`Sendov.R_le_batch` bounds every `R n α` for `14 ≤ n ≤ 15` by the elementary part and +moment at `n₀ = 14` together with the prefactor at `n₁ = 15`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 12, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 14 15 5 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 7]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch14To15 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 360360 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 5273811281588129281 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 429958677566179709215175220574978194512241977108241372511737172688952893630525928871748289, + 922353242397074581977699087266735169689253384888787652968648421800644465440084079049341105, + 598665938104246888891334041344492138378350247489747112270657502763060533670335383336131627, + 5240604256749137818001775409217258559398270] + +/-- The moment numerator at `n₀ = 14`, `k = 5`. -/ +def Nmomc : List ℤ := [ + 259845693120, + 782498283840, + 1107091851840, + 1019339156160, + 768295987680, + 853275774240, + 79511527040, + 4444832000, + 147210240, + 2670080, + 20480] + +/-- Bernstein coefficients of `7 ^ 12 * batchP 14 15 5 Lc Nmomc` on `[0, 7]`. -/ +def Bc : List ℤ := [ + 61872013896219072000, + 1601111771139196592640, + 18348690049666014205440, + 122077017846530971660800, + 513984158663421307680000, + 1240891390239189007737600, + 1755549123135331098032640, + 1823904907838616177469440, + 2204671461859361932819200, + 2696117661949998062649600, + 2073025154680504440998400, + 781703845979696640000000, + 100534751205977088000000] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 14 α = (78 + 7 * α - 2 * α ^ 2) / (26 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 7) : 0 ≤ c 14 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 14) (gg1 14) (gg2 14) 5)) α := + pev_wsum_eq_of_packed (gg0 14) (gg1 14) (gg2 14) 5 16 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 14) (gg1 14) (gg2 14) 5 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 14) (gg1 14) (gg2 14) 5 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 14) (gg1 14) (gg2 14) 3 (by simp) (by simp) (by simp) 5)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 14 α t ^ 5) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 14 * (3 + α)) ^ 5) := + integral_moment_packed 14 5 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 14 15 5 Lc Nmomc` is positive on `[0, 7]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 7) : + 0 < pev (batchP 14 15 5 Lc Nmomc) α := + pev_pos_of_bern _ Bc 7 1 12 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `14 ≤ n ≤ 15`.** -/ +theorem finite_range {n : ℕ} (h0 : 14 ≤ n) (h1 : n ≤ 15) {α : ℝ} + (hα : 0 ≤ α) (_hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (15 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 14) (n := n) (n₁ := 15) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch14To15 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree16To18.lean b/LeanPool/Sendov/FiniteRange/Degree16To18.lean new file mode 100644 index 0000000000..00fa7ccd2f --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree16To18.lean @@ -0,0 +1,137 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 16 to 18 + +`Sendov.R_le_batch` bounds every `R n α` for `16 ≤ n ≤ 18` by the elementary part and +moment at `n₀ = 16` together with the prefactor at `n₁ = 18`, so one moment and one +certificate serve all 3 degrees. The certificate has degree 14, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 16 18 6 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17/2]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch16To18 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 720720 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 9632409706279062743041 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 296506721823714704265478805643382244491222183969521021663658026171379394048234274188519553, + 443987808875231567434632560187716182055857676129052451323844518845444325992588835078239595, + 696513917860869931635574183554403391853205017812541311293282390174744915537500427122031507, + 522316333712207898845459456442843781680661940474008113586613026045908148093916427474204047, + 65604308031184443540574573963916799164579355278379645304399696021576697292] + +/-- The moment numerator at `n₀ = 16`, `k = 6`. -/ +def Nmomc : List ℤ := [ + 52612659000000, + 170273696400000, + 255339685800000, + 239918448960000, + 165235950648000, + 99966121176960, + 96500543870016, + 8976458195712, + 533837640960, + 20291420160, + 478172160, + 6377472, + 36864] + +/-- Bernstein coefficients of `17 ^ 14 * batchP 16 18 6 Lc Nmomc` on `[0, 17/2]`. -/ +def Bc : List ℤ := [ + 39156066523015200000000, + 2641641618483619776000000, + 80142049025184478176000000, + 1441455253501674159129600000, + 17017744404780580029384960000, + 136431349549730546005655654400, + 657065025194121333870974023680, + 1682820450813931739016273838080, + 1699536938347827625063230259200, + 118574708059996149423896985600, + 7124570482963915778896148889600, + 34212593538358663648763758510080, + 57300273733894618414333616455680, + 40732039985748952362762240000000, + 9253051318351755817943040000000] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 16 α = (90 + 9 * α - 2 * α ^ 2) / (30 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17 / 2) : 0 ≤ c 16 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 16) (gg1 16) (gg2 16) 6)) α := + pev_wsum_eq_of_packed (gg0 16) (gg1 16) (gg2 16) 6 19 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 16) (gg1 16) (gg2 16) 6 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 16) (gg1 16) (gg2 16) 6 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 16) (gg1 16) (gg2 16) 3 (by simp) (by simp) (by simp) 6)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 16 α t ^ 6) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 16 * (3 + α)) ^ 6) := + integral_moment_packed 16 6 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 16 18 6 Lc Nmomc` is positive on `[0, 17/2]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (2 : ℝ) * α ≤ 17) : + 0 < pev (batchP 16 18 6 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 2 14 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `16 ≤ n ≤ 18`.** -/ +theorem finite_range {n : ℕ} (h0 : 16 ≤ n) (h1 : n ≤ 18) {α : ℝ} + (hα : 0 ≤ α) (_hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (18 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 16) (n := n) (n₁ := 18) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch16To18 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree18To20.lean b/LeanPool/Sendov/FiniteRange/Degree18To20.lean new file mode 100644 index 0000000000..aad36844ea --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree18To20.lean @@ -0,0 +1,143 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 18 to 20 + +`Sendov.R_le_batch` bounds every `R n α` for `18 ≤ n ≤ 20` by the elementary part and +moment at `n₀ = 18` together with the prefactor at `n₁ = 20`, so one moment and one +certificate serve all 3 degrees. The certificate has degree 16, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 18 20 7 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 19/2]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch18To20 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 12252240 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 175927662917225332359966721 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 843409734000578209410972334682764700002022390759745948434344742136442797552789219566126849, + 44974961647775374731862145935889517758974312266434672837815042172397866699143848730300875, + 437302655829353348979444821042370136731772238800566165427866451094788337835108013894151378, + 24743903798686289485089015224938759859379750541156419506275337584501638157246946150682644, + 398207395719060972709006144830720087322332895913982687118230996245850245160708643412112175, + 274337745620624638936275643757889347744511177653609383831346364707120039183150206364616435, + 358483832023654241638315162089194303184230572320526650607] + +/-- The moment numerator at `n₀ = 18`, `k = 7`. -/ +def Nmomc : List ℤ := [ + 114983435331692928, + 401488164091808640, + 646936588267361280, + 643985937083510784, + 451960609895464320, + 248282531980689024, + 125596226938129920, + 108748744491770880, + 9970165621984512, + 614458050662400, + 25497772633088, + 704123822080, + 12428021760, + 127074304, + 573440] + +/-- Bernstein coefficients of `19 ^ 16 * batchP 18 20 7 Lc Nmomc` on `[0, 19/2]`. -/ +def Bc : List ℤ := [ + 208054831541205956325258240, + 17203895035486325389359037440, + 648259378137605309710414510080, + 14727421937681318437365642670080, + 224807707092248142434225291473920, + 2428302335918630270836617401472000, + 18909033566618236937208885048637440, + 98689416749826346246382499446231040, + 318407071045869598941683739959408640, + 563590537444333145187721274669015040, + 393167385526584554994491269896683520, + 267122351854705486268472576234946560, + 2865369297613449669676832070399098880, + 8869798097737413085373790738984468480, + 11837421152583511697993707192988467200, + 7172429002044214028440320000000000000, + 1449057687130325720448000000000000000] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 18 α = (102 + 11 * α - 2 * α ^ 2) / (34 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 19 / 2) : 0 ≤ c 18 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 18) (gg1 18) (gg2 18) 7)) α := + pev_wsum_eq_of_packed (gg0 18) (gg1 18) (gg2 18) 7 22 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 18) (gg1 18) (gg2 18) 7 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 18) (gg1 18) (gg2 18) 7 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 18) (gg1 18) (gg2 18) 3 (by simp) (by simp) (by simp) 7)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 18 α t ^ 7) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 18 * (3 + α)) ^ 7) := + integral_moment_packed 18 7 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 18 20 7 Lc Nmomc` is positive on `[0, 19/2]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (2 : ℝ) * α ≤ 19) : + 0 < pev (batchP 18 20 7 Lc Nmomc) α := + pev_pos_of_bern _ Bc 19 2 16 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `18 ≤ n ≤ 20`.** -/ +theorem finite_range {n : ℕ} (h0 : 18 ≤ n) (h1 : n ≤ 20) {α : ℝ} + (hα : 0 ≤ α) (_hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (20 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 18) (n := n) (n₁ := 20) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch18To20 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree20To22.lean b/LeanPool/Sendov/FiniteRange/Degree20To22.lean new file mode 100644 index 0000000000..11050eb4c9 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree20To22.lean @@ -0,0 +1,149 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 20 to 22 + +`Sendov.R_le_batch` bounds every `R n α` for `20 ≤ n ≤ 22` by the elementary part and +moment at `n₀ = 20` together with the prefactor at `n₁ = 22`, so one moment and one +certificate serve all 3 degrees. The certificate has degree 18, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 20 22 8 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 21/2]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch20To22 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 232792560 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 4131209409209679854788987576321 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 415554409852677086782888653509986106731604823282151130888540570232939710702306888786166273, + 497970217303849145427269129679404213103006562198768221354213524467878675079767978766859201, + 423376770648009486446989819845183327368715672103880903585609634804230071151638268944708950, + 779542709253460049049834200030423394619361068308927407924992768190982659511467666364074304, + 389560191323401011583801350056642509421229073471652965690556344130689616076286735679016586, + 963919558050105735619336220634358348775620366460327078867856343356142091112197183816351904, + 369910042414392837789684225435587469649384627401365137215111142493529834089724868392831219, + 225592961214127138545037980122454589072908657663380807599570953499350023955756845650273335, + 44775284788996865642893254679922271778917421122771510633920083377417] + +/-- The moment numerator at `n₀ = 20`, `k = 8`. -/ +def Nmomc : List ℤ := [ + 342652681018715139072, + 1290458050152354091008, + 2243577184611827226624, + 2399637756691021787136, + 1783512729454695095808, + 996976999580720707584, + 454864090944105851904, + 197832256724748957696, + 157260237317474747904, + 14092143950522867712, + 885156618381127680, + 38940288112115712, + 1195127971889152, + 25104659120128, + 344544313344, + 2787377152, + 10092544] + +/-- Bernstein coefficients of `21 ^ 18 * batchP 20 22 8 Lc Nmomc` on `[0, 21/2]`. -/ +def Bc : List ℤ := [ + 1361239680374966604932786626560, + 135030682356201219145390618705920, + 6163511451857092722362120967536640, + 171594855639363412752272856968232960, + 3255957310631626716188397927312568320, + 44554558920046459491516231922710036480, + 453290997936448904603716305595259412480, + 3468251516616085189273932034626746204160, + 19073849804031571179903956653702206566400, + 71053461656939345827305421870236392325120, + 166958315995229224738578102322461012295680, + 214510890124420265157640841972968744550400, + 105082497094159080243259851604777919447040, + 187406689986046699469330950767298892267520, + 1236365563384202483001222335243224964136960, + 2904936705979936320722970854093187270574080, + 3244858794905868595707220189117172668170240, + 1717991759104484956215630011198593491271680, + 312909784907273821609979999034117413928960] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 20 α = (114 + 13 * α - 2 * α ^ 2) / (38 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 21 / 2) : 0 ≤ c 20 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 20) (gg1 20) (gg2 20) 8)) α := + pev_wsum_eq_of_packed (gg0 20) (gg1 20) (gg2 20) 8 25 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 20) (gg1 20) (gg2 20) 8 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 20) (gg1 20) (gg2 20) 8 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 20) (gg1 20) (gg2 20) 3 (by simp) (by simp) (by simp) 8)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 20 α t ^ 8) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 20 * (3 + α)) ^ 8) := + integral_moment_packed 20 8 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 20 22 8 Lc Nmomc` is positive on `[0, 21/2]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (2 : ℝ) * α ≤ 21) : + 0 < pev (batchP 20 22 8 Lc Nmomc) α := + pev_pos_of_bern _ Bc 21 2 18 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `20 ≤ n ≤ 22`.** -/ +theorem finite_range {n : ℕ} (h0 : 20 ≤ n) (h1 : n ≤ 22) {α : ℝ} + (hα : 0 ≤ α) (_hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (22 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 20) (n := n) (n₁ := 22) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch20To22 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree22To24.lean b/LeanPool/Sendov/FiniteRange/Degree22To24.lean new file mode 100644 index 0000000000..bff1ec10b9 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree22To24.lean @@ -0,0 +1,155 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 22 to 24 + +`Sendov.R_le_batch` bounds every `R n α` for `22 ≤ n ≤ 24` by the elementary part and +moment at `n₀ = 22` together with the prefactor at `n₁ = 24`, so one moment and one +certificate serve all 3 degrees. The certificate has degree 20, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 22 24 9 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 23/2]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch22To24 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 232792560 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 5774500618193131865874939367342081 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 952117888587198162177055098653469266065620379085335980107485574263048810931409342867852289, + 346820352631874830950754461420175060450633533746353185246669199140615772136375726619739932, + 312009671168290779571054910498924756815599827889354729460340914561182011034734511085509420, + 896808211158507170847555638174887653568352512765279104934288526037600114288775668310037707, + 953918608516395993601881499081882159387466173626361142174157279677614740584272959889365094, + 281973726028703612636651711022615997355506630751683900551998989656240038929214649085265235, + 536244361717247282601231552544467258823560691375175811619171316787642443135211274745052812, + 557856484812350076171944041251538965089353404668598911589180101281800066659429973404184827, + 769946235123570814826138813253665092373673643274802319253928901325155969193585802030603998, + 916403957981341978999482593278271409269805645884496135649846419759057009193613300612144616, + 52113403406617399568675768890198434300892440730552860468456457359822812] + +/-- The moment numerator at `n₀ = 22`, `k = 9`. -/ +def Nmomc : List ℤ := [ + 63683904221147656083456, + 258124956324931816114176, + 484131886524725672024064, + 558778379485145387968512, + 446247743318805044026368, + 264110065181693649515520, + 122458189294350124959744, + 47704848438469830322176, + 18201381357540629025792, + 13524983241127074966528, + 1177792095898695426048, + 74548634146090795008, + 3411779294798364672, + 112771637948841984, + 2668046408810496, + 44104655831040, + 484339875840, + 3177971712, + 9437184] + +/-- Bernstein coefficients of `23 ^ 20 * batchP 22 24 9 Lc Nmomc` on `[0, 23/2]`. -/ +def Bc : List ℤ := [ + 512436340556109636690275002662912, + 59959361694969728141148277131460608, + 3252843449711947375136824340636467200, + 108576466656212940030327227402791452672, + 2495350632810396894203913467518923227136, + 41868679629559298116282297797560924160000, + 530557324059939739725975244898725342347264, + 5178073877144904777553076109070235636957184, + 39223577019974028590785928385399991850631168, + 224034035337992794327685117154773147050278912, + 922657178054356216548323419116619544720277504, + 2604799234182272502073311559790132935970193408, + 4652550233867174709975015735175618077379264512, + 4342066551215800661342941056244216739426992128, + 1376833654324503836162135804279901244728803328, + 6049591862595819448351468963684693882875936768, + 29759214414740209787093232841795790507517935616, + 57076833722192473684106328785462591758150926336, + 55046812783674831988293428420585077993314975744, + 25927870732173758776217320138534663258311229440, + 4303071910978821827328069967365848284916613120] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 22 α = (126 + 15 * α - 2 * α ^ 2) / (42 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 23 / 2) : 0 ≤ c 22 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 22) (gg1 22) (gg2 22) 9)) α := + pev_wsum_eq_of_packed (gg0 22) (gg1 22) (gg2 22) 9 28 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 22) (gg1 22) (gg2 22) 9 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 22) (gg1 22) (gg2 22) 9 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 22) (gg1 22) (gg2 22) 3 (by simp) (by simp) (by simp) 9)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 22 α t ^ 9) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 22 * (3 + α)) ^ 9) := + integral_moment_packed 22 9 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 22 24 9 Lc Nmomc` is positive on `[0, 23/2]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (2 : ℝ) * α ≤ 23) : + 0 < pev (batchP 22 24 9 Lc Nmomc) α := + pev_pos_of_bern _ Bc 23 2 20 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `22 ≤ n ≤ 24`.** -/ +theorem finite_range {n : ℕ} (h0 : 22 ≤ n) (h1 : n ≤ 24) {α : ℝ} + (hα : 0 ≤ α) (_hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (24 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 22) (n := n) (n₁ := 24) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch22To24 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree24To26.lean b/LeanPool/Sendov/FiniteRange/Degree24To26.lean new file mode 100644 index 0000000000..6c7998a8cc --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree24To26.lean @@ -0,0 +1,162 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 24 to 26 + +`Sendov.R_le_batch` bounds every `R n α` for `24 ≤ n ≤ 26` by the elementary part and +moment at `n₀ = 24` together with the prefactor at `n₁ = 26`, so one moment and one +certificate serve all 3 degrees. The certificate has degree 22, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 24 26 10 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 25/2]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch24To26 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 5354228880 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 207169535963896720099395591492729077761 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 939262352917434034648884345143679115225022717302218543379275426810982214714060272108111873, + 777684405725058238089451929907092518333933640346101136344586892938040988765007336451882866, + 349830619658553076247959754553527964871466306663576806629616777965871520562804437537173211, + 576964681682338544951425176804035838668391516955724735694385595874871472656729746521144495, + 154456776919966756556228106088192297412170853978188023830339107067702315857956086036800427, + 441722254000912895245767176245015981661120146759421315921372443124954613543593343478799715, + 618301030883431417607618760856488445808986867630990003426706499628118824185435630199646483, + 363984727012208457255987446595584067643160838527137552770639009495325056672536563117416826, + 417711376775999926154464728822005557520196678362635217152684345650132590498266302261095946, + 138510475391263611402561988747434102004049942580845088682763442977894869192016597214433416, + 992419947663757588380429163324563529912415106411403011745947325590554409286979300143878596, + 926057162085274681727759515125318949719302456675519000372761221361307915031805467809964014, + 969978190017817116896159063010086182170935195315287986342487638387429295465163650234862127, + 24758917493327576141462812677830183371567017132] + +/-- The moment numerator at `n₀ = 24`, `k = 10`. -/ +def Nmomc : List ℤ := [ + 315542595400376414343137280, + 1372405704784856075197992960, + 2771005826010710543999477760, + 3451094280477455969590272000, + 2974802471342849022363187200, + 1892050373140518166434754560, + 928743180964782053711800320, + 367295306457255483092705280, + 124654360837959477878768640, + 42359986648106960612198400, + 29853908180042393981322240, + 2515924687236660357795840, + 159168052874477224488960, + 7480111606347618385920, + 260880569954468167680, + 6725742542668431360, + 126534063532277760, + 1689884884992000, + 15189584117760, + 82465259520, + 204472320] + +/-- Bernstein coefficients of `25 ^ 22 * batchP 24 26 10 Lc Nmomc` on `[0, 25/2]`. -/ +def Bc : List ℤ := [ + 4817152147030996435465919500800000000, + 655782502148927527231376162841600000000, + 41646935637107143639612532716331520000000, + 1638616681107312362479979453853388800000000, + 44741462734251676492463862114420211200000000, + 899985675687630043165425318396931660800000000, + 13819001147459867042500692227372552563200000000, + 165595496436717694900556392387658508226560000000, + 1569512731670794879387270982335010138860800000000, + 11831206606980075496567044544724954215027200000000, + 69609798863494105611080593669968653748537600000000, + 308998710083958162330649651969719971352268800000000, + 995490437597688874577045498755285990795130880000000, + 2208763366122944304999910681219987206484377600000000, + 3042969129793982887795785080447738671872614400000000, + 1922581657077424314703792308297129180767846400000000, + 212860736682647687566390550208064298508288000000000, + 4531487299041336178923473630855532497766973440000000, + 18017354731018933202691216610356762668050022400000000, + 29396090474017728277872617960000407537818009600000000, + 25009464606326035828239096485484400371695616000000000, + 10623032404934519993915536803114900789185740800000000, + 1620358343675974540316494325684964606628331520000000] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 24 α = (138 + 17 * α - 2 * α ^ 2) / (46 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 25 / 2) : 0 ≤ c 24 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 24) (gg1 24) (gg2 24) 10)) α := + pev_wsum_eq_of_packed (gg0 24) (gg1 24) (gg2 24) 10 31 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 24) (gg1 24) (gg2 24) 10 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 24) (gg1 24) (gg2 24) 10 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 24) (gg1 24) (gg2 24) 3 (by simp) (by simp) (by simp) 10)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 24 α t ^ 10) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 24 * (3 + α)) ^ 10) := + integral_moment_packed 24 10 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 24 26 10 Lc Nmomc` is positive on `[0, 25/2]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (2 : ℝ) * α ≤ 25) : + 0 < pev (batchP 24 26 10 Lc Nmomc) α := + pev_pos_of_bern _ Bc 25 2 22 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `24 ≤ n ≤ 26`.** -/ +theorem finite_range {n : ℕ} (h0 : 24 ≤ n) (h1 : n ≤ 26) {α : ℝ} + (hα : 0 ≤ α) (_hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (26 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 24) (n := n) (n₁ := 26) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch24To26 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree26To27.lean b/LeanPool/Sendov/FiniteRange/Degree26To27.lean new file mode 100644 index 0000000000..2cc7239c22 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree26To27.lean @@ -0,0 +1,169 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 26 to 27 + +`Sendov.R_le_batch` bounds every `R n α` for `26 ≤ n ≤ 27` by the elementary part and +moment at `n₀ = 26` together with the prefactor at `n₁ = 27`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 24, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 26 27 11 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 13]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch26To27 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 26771144400 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 1783830525058754873813927954496295998259201 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 778260972397757154046902387437813567395673071696864805128522088736582576223961868661485569, + 363725916770869697860848704958482952833508425805004937470898243688742697829762944276107615, + 116064666882493340972549121546218645558444611887271837237540852012659310936267952963001977, + 552914826848712197074012846676359735870753167933984550834912923876156995604766769165987975, + 15707284432511082017882091873937231501792437802894038023374955974821214509770321538498329, + 600670400896829921018947925643314402315832165322391344751325424403921339329436943427897029, + 902026569777020494419501512315474114759944056031563655751368519541489944629007560751816588, + 905502702984285254895257424679429717404024747860957388879014385939099599783170944462854881, + 309716289928856064417592548457359521565936815601030204593660862605647240515808652303969306, + 576534885990336144360077173687905062225767049125796030021289925520567730007414463075240289, + 365061783293733182169624688960662814475857067626280716303739779684800711427637917201246110, + 934749261204812851534059341575157575252934491445215643696886058144930715361287076189918238, + 383979303436925169405700243168630263285364965916563320840867533638639188195556282390771540, + 983278865403601836924469699299185781558512016310985120648696496903050071375094251993160525, + 339816950931912560529278042932005772751405963580738343515971252578375924231322508638209932, + 514096201907298946352897748420557318295560941193237193481474904479676507235935263934128419, + 23426572919250358783308645088] + +/-- The moment numerator at `n₀ = 26`, `k = 11`. -/ +def Nmomc : List ℤ := [ + 387230540361328125000000000000, + 1801421059826953125000000000000, + 3904034368858593750000000000000, + 5235740547776268750000000000000, + 4871336229481255875000000000000, + 3345092202866735673000000000000, + 1764975677650708972680000000000, + 739008187884024802920000000000, + 254413431645839068505760000000, + 76379200780785652242028800000, + 23390602747025993261119180800, + 15823934861267894578878025728, + 1286548783877635655383412736, + 80855955782052201389506560, + 3865275530870070676930560, + 140238044038251091722240, + 3855363400170394877952, + 79769530465684291584, + 1222691757773291520, + 13471923877969920, + 100958947246080, + 461050478592, + 968884224] + +/-- Bernstein coefficients of `13 ^ 24 * batchP 26 27 11 Lc Nmomc` on `[0, 13]`. -/ +def Bc : List ℤ := [ + 9892979088435691294921875000000000000000, + 754925764449992274369140625000000000000000, + 27027012351606211680785156250000000000000000, + 603270960139777066863913687500000000000000000, + 9411278182636378341347343753750000000000000000, + 109032621210373532622718187251260000000000000000, + 973069333020025847004426590500165800000000000000, + 6849510502704890050622252952699665400000000000000, + 38624662291986176847658095360634452986400000000000, + 176233287393664902151137836968320681381216000000000, + 653890210585043892616590829816098150083939328000000, + 1957499075808453005007953640314342662771634442240000, + 4644114096048661812531176604893372473618418350080000, + 8563400484935774711173049717893368711968952268800000, + 12071432877976296359404786675866681736660604620800000, + 12869258773989966004582189340415595916763725107200000, + 10463087924939557738270989709666328600913779804160000, + 7012406177697489102558832661043149311003215083520000, + 4772824728130378487410757642493825279747016089600000, + 3720608220649412946148819306232520372973416345600000, + 2673991701219691307620389430293422852383272806400000, + 1398939711917984778216022394350837654047533967360000, + 465064564798924941632467044065147317138949406720000, + 84656088653535208110292992000000000000000000000000, + 5947691788511158204366848000000000000000000000000] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 26 α = (150 + 19 * α - 2 * α ^ 2) / (50 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 13) : 0 ≤ c 26 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 26) (gg1 26) (gg2 26) 11)) α := + pev_wsum_eq_of_packed (gg0 26) (gg1 26) (gg2 26) 11 34 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 26) (gg1 26) (gg2 26) 11 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 26) (gg1 26) (gg2 26) 11 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 26) (gg1 26) (gg2 26) 3 (by simp) (by simp) (by simp) 11)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 26 α t ^ 11) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 26 * (3 + α)) ^ 11) := + integral_moment_packed 26 11 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 26 27 11 Lc Nmomc` is positive on `[0, 13]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 13) : + 0 < pev (batchP 26 27 11 Lc Nmomc) α := + pev_pos_of_bern _ Bc 13 1 24 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `26 ≤ n ≤ 27`.** -/ +theorem finite_range {n : ℕ} (h0 : 26 ≤ n) (h1 : n ≤ 27) {α : ℝ} + (hα : 0 ≤ α) (_hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (27 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 26) (n := n) (n₁ := 27) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch26To27 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree28To29.lean b/LeanPool/Sendov/FiniteRange/Degree28To29.lean new file mode 100644 index 0000000000..174c9a983c --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree28To29.lean @@ -0,0 +1,176 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 28 to 29 + +`Sendov.R_le_batch` bounds every `R n α` for `28 ≤ n ≤ 29` by the elementary part and +moment at `n₀ = 28` together with the prefactor at `n₁ = 29`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 26, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 28 29 12 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 14]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch28To29 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 80313433200 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 10084728626050199397228352592884540009031270401 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 886432830731426650106122260932547333498729164436021072675366328917068238860791756084355073, + 622802413819528387840853655880370774461068166429448823181619720038787996286093142524761737, + 682690494366278218548650749338978591863499386730771289846472630878189435860492510753032203, + 338464082986887216849598623733053004561779593247160872463841176510729112419938113986701194, + 504034740313878734977785955911767507785790552130207009840321800736593722504657422890658595, + 613206967830396884919924937703871446290690157079264225965029365981426264032169691913211564, + 889887994054190321537865476647308316425272598857663174691972234835274251003783521955647050, + 498605200575275885654734960432291576689066864538427755135894844801717231776395915636796412, + 200529283658651223543114794235737501871179858416176859317105941027801895549371766822601329, + 782306348936307346841740389168297423362993751698554883608436164749927770266088455499905731, + 956015703171798767685818824290550047715915996570523642245796805055406635327139682299812193, + 334669982558988545901816794000601891958968141365771110214760541028723343835487545280792997, + 16707905364501806298995153954945639239453526565922414707560982122206746995233754452064141, + 352140222250859841078376519158301915019386890649800419678437010241954576184674538963292148, + 21080258067427759724363125440262317135855285805543706087625112685588429741162242648391448, + 971478978320801040273303421279657969821098670941715573037934816303597054833246537937801006, + 772990001749378790648083730111990133362365288003227032215494657458071331399806759131827194, + 845435871198123394677969978458044607063442117861532457784033033577126980178811408061492922, + 880281547058544185485886742010966490749534934875001179036758791154093298174460044133361383, + 1715742150364513412056474547] + +/-- The moment numerator at `n₀ = 28`, `k = 12`. -/ +def Nmomc : List ℤ := [ + 320394066090341726626971528019968, + 1589072018612322895347942522224640, + 3684522205733863644552552635105280, + 5305366963409803496664296045543424, + 5316971788818368572690063365120000, + 3942149995287104135031359579160576, + 2246432710663378622439556656168960, + 1011378178659594802098718608261120, + 368720458747778191229547356971008, + 112230408493564203033749492858880, + 30163249869517511053432152293376, + 8402971408578265741863489699840, + 5512464281177584575038052249600, + 431363267663376638566268633088, + 26803056329325193714482216960, + 1294129542064434244268064768, + 48342713099187473998479360, + 1395965397073125090263040, + 31055871458551947853824, + 527438829380142366720, + 6716454118785810432, + 62110080958464000, + 394042445660160, + 1534712610816, + 2768240640] + +/-- Bernstein coefficients of `14 ^ 26 * batchP 28 29 12 Lc Nmomc` on `[0, 14]`. -/ +def Bc : List ℤ := [ + 14119168990989084278526015507145271433756672, + 1228705895545247333693766844949704537924435968, + 50378068949557291888593864684445556046469005312, + 1293828770802003301677487325733618196925657382912, + 23343251098620740705364960636871167759701703131136, + 314542283286605851563865439090851459586741369831424, + 3285538796556932829049285418854637208930803993542656, + 27258989729884919857016127236533742692117536879673344, + 182617776586143958976663782097720518609381611619221504, + 999043600510679940809291041697439765987369937243471872, + 4496052561986485736559376593406649200074823460752195584, + 16708743123898275913176607943994885858888106556497330176, + 51008388944063440634407291763066930283716169891613507584, + 126137005377663699036304388157065951861701463446948675584, + 248373740306136645356479898610651887868104371921508892672, + 383156280639505726425928551132536650093548092118534193152, + 456558318292943358687354466186949144731620473700344659968, + 416580626932975994237448271329645493591082471707474132992, + 295850377144074868276484519404658305825066190146489024512, + 181573464179979172982534444701649252988870148822218571776, + 121105583128391265154304196906130419939275303995192639488, + 92148975750233486993123834966592337304290274760890253312, + 61742412239629785386706889175220270671308969429526642688, + 29598215287203609246475382867337562528794984846257553408, + 9027350320346645490563225079887067403312602668942229504, + 1517546121206576816391677707977942611269635187251609600, + 99326181261490870496503191499070350514165186769715200] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 28 α = (162 + 21 * α - 2 * α ^ 2) / (54 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 14) : 0 ≤ c 28 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 28) (gg1 28) (gg2 28) 12)) α := + pev_wsum_eq_of_packed (gg0 28) (gg1 28) (gg2 28) 12 37 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 28) (gg1 28) (gg2 28) 12 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 28) (gg1 28) (gg2 28) 12 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 28) (gg1 28) (gg2 28) 3 (by simp) (by simp) (by simp) 12)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 28 α t ^ 12) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 28 * (3 + α)) ^ 12) := + integral_moment_packed 28 12 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 28 29 12 Lc Nmomc` is positive on `[0, 14]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 14) : + 0 < pev (batchP 28 29 12 Lc Nmomc) α := + pev_pos_of_bern _ Bc 14 1 26 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `28 ≤ n ≤ 29`.** -/ +theorem finite_range {n : ℕ} (h0 : 28 ≤ n) (h1 : n ≤ 29) {α : ℝ} + (hα : 0 ≤ α) (_hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (29 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 28) (n := n) (n₁ := 29) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch28To29 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree30To31.lean b/LeanPool/Sendov/FiniteRange/Degree30To31.lean new file mode 100644 index 0000000000..960fadced3 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree30To31.lean @@ -0,0 +1,183 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 30 to 31 + +`Sendov.R_le_batch` bounds every `R n α` for `30 ≤ n ≤ 31` by the elementary part and +moment at `n₀ = 30` together with the prefactor at `n₁ = 31`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 28, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 30 31 13 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 15]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch30To31 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 2329089562800 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 598643820467341015032219325183684189288396023398401 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 416905629561607882315156742733719599888340753360338207843043754472825653520003648019939329, + 694270926120722633432998039540761399535568163244001145334929775205095422405699020167355302, + 982780538779039416576384404586706971226291703499032900226157670093935921508252826529235585, + 461050002751776580231604037096365894537663767669371760278789433958186250470589975450787184, + 230437958212333543577424229290798547485635552088876368829646471619196521567644669785630021, + 518977895173135352813515962536850868137384003416368476179180164228767245148235772674001500, + 92739557143191621876087076700922459966486411162773503421463876089595605655264782418923898, + 266653300362261314174482280861578177711357069976776958392438372631560517772531723675067717, + 771425097188554229106539531190205096348898417164945566245392219837163113468478614638434685, + 287285931600553956494659263480356219432050775783412586901427996712930236992964977979041787, + 149402638883441047527626705973620191646383332224641150550455235226232748604765803993122480, + 871256769512333068977228715481431688179019055342979271313410440219422864945776381686208443, + 510736044613268168898656265722364583802438806454162456531327968866852321870409041859279475, + 13971493323778503638450081530649374231458959183506087119687549483886995350389384354143420, + 271697384648521582655575488102500998160898505044763821428523921248671257577457057705751189, + 415310754308034666397354044012524804747972717796100068405752989898881184832098931329040699, + 714388937533365481859210042531760661388900808376072960247609586393632095800132635917191215, + 298293411213419942943539556894629650945763482039353094667525663851613251965840663818376323, + 766155387068602362905322078199765925651080440530828893076842891569714751410916199002587856, + 803422510662555568808155547798207495587618573478298122314828773131772137494354477397719603, + 149249576928266196583897794299661174183542769842937665601101816118968928169639468359562936, + 895110483887512952258918711367260447692593169223245297215997329463391592278672937106416971, + 313850242117165526650057005049659380340602300607264734706751762579985238369003696776656025] + +/-- The moment numerator at `n₀ = 30`, `k = 13`. -/ +def Nmomc : List ℤ := [ + 2847322232222377079130299295548866560, + 15008988226404392281484543183203565568, + 37112008475173470993393263682783510528, + 57188567882381822904060946628509335552, + 61554387606037947478868681903502606336, + 49175417644995034753823426546066964480, + 30266999921668094875538981840926900224, + 14722581654107051388196649173533425664, + 5773724410165756723566084202262839296, + 1861804093815965861828856484560027648, + 507213355867117246883967915154784256, + 123214822854564441785750257598152704, + 31464019263956737516909155495370752, + 20191362054204790435940152444264448, + 1517931070679596171060122428145664, + 92893271780986750639134682054656, + 4504919947918335797971976716288, + 171916708762615946808838455296, + 5157244460346339035650719744, + 121426254799723639395581952, + 2232336341894261335130112, + 31693716069507391291392, + 340723585068751126528, + 2682523919058993152, + 14594536705622016, + 49052855042048, + 76772540416] + +/-- Bernstein coefficients of `15 ^ 28 * batchP 30 31 13 Lc Nmomc` on `[0, 15]`. -/ +def Bc : List ℤ := [ + 208041435420167764719871357072323564225331200000, + 20471966146416627555902505874440298881390182400000, + 952604837350019786174270682364549854903297146880000, + 27876777844975960282176005715326733749012994293760000, + 575597518819481574146852640957864828186558786355200000, + 8918804894284129447882826870318862609510351459532800000, + 107692389853712091423687476856825338301828558648115200000, + 1038839661027291367679715789553249070005998776763187200000, + 8143593352520405158668645741955136441188994597339136000000, + 52503206621869581366051577962737082651053438462995660800000, + 280728586381969751741831479871006803346328909688884019200000, + 1251817114111414147074097860669645937347286653346112716800000, + 4669234769395785612435834462086266406391083309015270400000000, + 14517230276847443046953504333156302263340149670596207206400000, + 37217688302676049816224486561671390121015676225253804851200000, + 77532826004313126428755670852001698038713115543866170572800000, + 129293099698167685840581029836179855047670561766340722483200000, + 170130246582278323062005355803204038006558174193436302745600000, + 174292619841215412967806561787652558437373977680630824140800000, + 138023841404752524860596262239762519940318952811163432140800000, + 86737708735388471355356792646284884607370202159697696563200000, + 49651239492548690476520742863254402890880366720660572364800000, + 32999512702211470696600167021732374017480145623660753305600000, + 24578362341500284352395340132923888531080978025925347737600000, + 15425232245131544823690843932516894977024096065845196595200000, + 6827287245814657164730141665798067757826627945060215808000000, + 1924569069129525173013669214625369185487631006562144665600000, + 300669543834530006225023211341987095117149143473774919680000, + 18425186381337746839722109154976256441999768136145960960000] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 30 α = (174 + 23 * α - 2 * α ^ 2) / (58 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 15) : 0 ≤ c 30 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 30) (gg1 30) (gg2 30) 13)) α := + pev_wsum_eq_of_packed (gg0 30) (gg1 30) (gg2 30) 13 40 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 30) (gg1 30) (gg2 30) 13 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 30) (gg1 30) (gg2 30) 13 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 30) (gg1 30) (gg2 30) 3 (by simp) (by simp) (by simp) 13)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 30 α t ^ 13) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 30 * (3 + α)) ^ 13) := + integral_moment_packed 30 13 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 30 31 13 Lc Nmomc` is positive on `[0, 15]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 15) : + 0 < pev (batchP 30 31 13 Lc Nmomc) α := + pev_pos_of_bern _ Bc 15 1 28 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `30 ≤ n ≤ 31`.** -/ +theorem finite_range {n : ℕ} (h0 : 30 ≤ n) (h1 : n ≤ 31) {α : ℝ} + (hα : 0 ≤ α) (_hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (31 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 30) (n := n) (n₁ := 31) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch30To31 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree32To33.lean b/LeanPool/Sendov/FiniteRange/Degree32To33.lean new file mode 100644 index 0000000000..471f3b1c45 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree32To33.lean @@ -0,0 +1,192 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 32 to 33 + +`Sendov.R_le_batch` bounds every `R n α` for `32 ≤ n ≤ 33` by the elementary part and +moment at `n₀ = 32` together with the prefactor at `n₁ = 33`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 30, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 32 33 14 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 16]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch32To33 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 144403552893600 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 82007696765268867835437188499033438694556468498477875201 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 371540974439073636716729113102028873968037289905998906567295840237187811061131233881260033, + 300716968634313571605954540774164164711985900302786400820269708439841076847144677128900309, + 377586748163440808010681747302727135149356302760844924674664888320450778175079125338979147, + 340305888953785910909639556456826292187991496503514793819981879281934796684729329535824953, + 100829071802658264213997139734894210030513525730309971842364034443951256713554859748286700, + 348918799509163813682634744713798260897457479460783984870242488656944413607131140476960274, + 444627637552009490541512485765373591685496170630432525527159589147842963967083621367782046, + 284298892729622111599221749066357673153354135919953456164013809016817887170940672331541966, + 582638053710307592695945621828235369990237589891637707818734892756773412987401332687404983, + 604936632256490100035670175497973228339428362927496728733499743376853095291447567203291034, + 268030420561313305156939520225962796791258104750705903550557527707344354568269402661788485, + 364869745480219715428340421221990980504109462898464382774312679761909744634091410317343370, + 49091498145880104660986133747033516758859190599324505184286520301673792584081574368025824, + 824078031021866569121210785117869737981327363841151371235907324739743037738787977357336167, + 662834736634156974205687450543293076103338904621317463584346798436938157848255901275726272, + 34211712503151831819511584532850033608138531277878135489742131248039288274399182892256288, + 578313783972484938110814425211081753583206067112104699394299846702024076354419816542431785, + 160046019378198425598975128071087464847770176811480591445476195564689914849507908314475498, + 722959330481804239405773804713721099156756569706122764543224451108137327220613878159977730, + 401946076216426944537534159434845672326042203813512991312833915414169314198352624531485106, + 703704920097158583418016785786598284461258075797350403252577973236695549255529736258235803, + 457067589570662749956705493088524454728773867121734748784360044645863093860636980281040976, + 538646288043235878135164516820372854638573929523044656845224637905260038529606113200723256, + 445581864012771746972419264195560038496724328005979307357063996450497475540051023865444074, + 328014885300459954192590836737511798781516530920110334806452717059152969522774385782544994, + 496936225973381709920634294003642375969365742269909757573221709274165665855385981378260916, + 954612293109742648973001387154451110330123156527399318768219914009427040389573419330089012, + 11220834733149688] + +/-- The moment numerator at `n₀ = 32`, `k = 14`. -/ +def Nmomc : List ℤ := [ + 59549678807292649512946334425511900528640, + 332633928694180287562160607985754646282240, + 874357221396134098503924595673384965718016, + 1437215916574767695779984225513051597307904, + 1655981085108700351581518840877610488741888, + 1421279437533682215559284491686599602700288, + 942904731021335273964534250725312620544000, + 495570450295347165112518776609036805537792, + 210065305835209750183615816849805443252224, + 72900880436411011709388360514268131000320, + 21051940200633711455379773064054625419264, + 5184384391913613967393211532420375773184, + 1147365126536241552058076182025236660224, + 270261533019050260091375677677806714880, + 170957647046487888392074218346393092096, + 12329521206256007992296411221786165248, + 740795443843781039280826784317112320, + 35922463394092100452261251973644288, + 1391964859628668587835861843050496, + 43018694711760261985695689605120, + 1059599602681625613272444043264, + 20743364411796390715896889344, + 320587066968098761875652608, + 3862833671266323583205376, + 35533610536988267511808, + 241080240660923023360, + 1137269403675525120, + 3332196957945856, + 4567966154752] + +/-- Bernstein coefficients of `16 ^ 30 * batchP 32 33 14 Lc Nmomc` on `[0, 16]`. -/ +def Bc : List ℤ := [ + 6971652866008607608652232053722802863558326610821120, + 770003865381676755213109962084414065885782738238177280, + 40344416956260856810071089833897987563631452225124958208, + 1334012022566013781539345392203262541109498419057713479680, + 31240874035678045827987843277184614914573808923576436260864, + 551293938451929672728218285728774340595253620610709176975360, + 7615147303689327217447490165682354385677400311214832527343616, + 84445955516183257949196050119646005390114354809792277034041344, + 765066959750477285428236621740820293559514103828421991282507776, + 5734031976834587526408658478469729243188522196997976267409063936, + 35871711668266098228020277627174874781577293219565267625539796992, + 188512308515318298570180733849700987143760943934290062967457185792, + 835785837782167757847482583869200457197825463042802708316063531008, + 3133645826377546029172690954803126754567047270158176215262486855680, + 9912928758009892905714375251281079560226955621764838413625125240832, + 26238378011173700049719246703325139942031709097045613835144252096512, + 57401656195787432840784864460489700845985534835280636148890604666880, + 102407488936316160559614108266830195305131286624064551274386196267008, + 147000757039452537495594014227926446725685352611820517601830395445248, + 167451935284749110838646586126932033439246317788169898719869489119232, + 149300848708411641456087335620260701496216053013681518504425826549760, + 103568793760798257719958895207378074951582599619858178383717561532416, + 58126280541921696043885818396366151283786408003534842722272245972992, + 31604511898874702742569816466558611603721783081623387422163139035136, + 21275338362003991246949536823912011826530483270505727622427134918656, + 15548220948996972916936482637495240448895934866477073335192247074816, + 9178142897801982700186489762238802650854733408674612732991536889856, + 3774462477405354189903733922038733479472404293986531684431492546560, + 989495465777071281219657873384585736247488673808239823077674844160, + 144432371599429519017173446555660196354449701734427390367078809600, + 8322623288722744252830615758691954349366644781030231756505088000] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 32 α = (186 + 25 * α - 2 * α ^ 2) / (62 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 16) : 0 ≤ c 32 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 32) (gg1 32) (gg2 32) 14)) α := + pev_wsum_eq_of_packed (gg0 32) (gg1 32) (gg2 32) 14 43 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 32) (gg1 32) (gg2 32) 14 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 32) (gg1 32) (gg2 32) 14 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 32) (gg1 32) (gg2 32) 3 (by simp) (by simp) (by simp) 14)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 32 α t ^ 14) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 32 * (3 + α)) ^ 14) := + integral_moment_packed 32 14 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 32 33 14 Lc Nmomc` is positive on `[0, 16]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 16) : + 0 < pev (batchP 32 33 14 Lc Nmomc) α := + pev_pos_of_bern _ Bc 16 1 30 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `32 ≤ n ≤ 33`.** -/ +theorem finite_range {n : ℕ} (h0 : 32 ≤ n) (h1 : n ≤ 33) {α : ℝ} + (hα : 0 ≤ α) (_hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (33 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 32) (n := n) (n₁ := 33) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch32To33 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree34To35.lean b/LeanPool/Sendov/FiniteRange/Degree34To35.lean new file mode 100644 index 0000000000..3d8e51154f --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree34To35.lean @@ -0,0 +1,199 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 34 to 35 + +`Sendov.R_le_batch` bounds every `R n α` for `34 ≤ n ≤ 35` by the elementary part and +moment at `n₀ = 34` together with the prefactor at `n₁ = 35`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 32, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 34 35 15 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch34To35 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 144403552893600 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 194532526637905659592465965962408920281731033564023672012801 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 918069203790589572787856941325683557276990120853405232822935501178427012493955943965851649, + 2309987521492323503567350846385767820695577858715200865687824244853509471588580618425271, + 282614597824096975544678028476929337221558657767373981499527228679736867775377130535832708, + 270659381166663620693027791876567204494789600172172828343698419704457774295707309720554084, + 32731741913053749301363295755668357645774878411242134048227284109685036718568706494107419, + 196308457272037765464529947029636404075768195281262027292214253663365276151318993330281425, + 868964441507122701033628638085588014323748803063924600505610037853512506488347863128965200, + 816939152064487580546727622676935536587250566313287758078580783738354754803703576184612845, + 266287125150657012851750006467027752603657263323142683192986680453383119202689344259382794, + 192138933965420131878573315245883453268155958958845255027599185851399785413747295539619507, + 324841650227525396918601832890610406496157985947347690953527356950641891321091711779456657, + 482416570619154631010464320641707618934640154870581350522370940519094736558294859785300796, + 386186628030302242647944856660376843483634791545684874432448904102613234022374983545427772, + 628317031011719903067247487161961525637311329323205508400774519283964256794210663158436183, + 969729901835578545558603769740923156150908870777714440877855603842847815106565754242192817, + 750201931682671782436936489932890759205561533205675520428586618131018662168840170863151874, + 215718150462259699660817520687804092757667853324808650843754293429497069871731359558428443, + 362562139134442240028379208453203461889030349463846868457400819801687828538107799248699284, + 55883899205603781963955740658794848063435273096987910611035361118631025097305180003829803, + 756067296427418869746935207926516243534641805753102582090823338262762492566453899805207678, + 202926607788483317007292148200754413631616766486962798637182133391069431746104385520762184, + 331265916469232605883476915927536201218852543629643894943603200359968247257251029857518539, + 638323843277715010515935594910547322578979583085468712828922406396658563332453948135511751, + 774879791505394589844357987061439667249104769468067980999644327145983513415779904704573571, + 278499886952686383921751419496990274765143435903238360763061060093460009765590938567656566, + 328397507175333566644211313357088797116971134083348699877444823194494749070478343765527400, + 975066028013480375503313023257592183883878705002878407408542286332762045424908011931522898, + 922513261811405339352375781031791705543630407853229343943519066398602864090623433076848286, + 495916387575914377965634027664758956576715212234934291724790051449830050092028166936996756, + 588299166944562243121910369185768288356779921185861091533376649140462848229659781535753264, + 2648846650177651160958460533548336251549413056081861585991214700848211963] + +/-- The moment numerator at `n₀ = 34`, `k = 15`. -/ +def Nmomc : List ℤ := [ + 21938273879001296537588129542955953306828800, + 129497710702694173605888551502777617795481600, + 360787425276121692072309632823094603962777600, + 630590017015541909221212690739699253219819520, + 775231976159843868056552434154408412302376960, + 712464083448956123930400803253774487043604480, + 507951544956070062975956553658816614620528640, + 287857419499780197357003719650576636454830080, + 131892113200428362238317773442146749881548800, + 49496137683072496421316258834388040067809280, + 15391209894332935872549267167778842980515840, + 4020501293737351539829539182699656188395520, + 902386144742639189763448900347642653736960, + 183145837686377657982191106811971256811520, + 40004227361114589492628423752103593246720, + 25112118781813135540699114875911934443520, + 1735553464890643124188225674063313305600, + 102107343563870599467891980573430251520, + 4932688966494400752295458633638215680, + 193131587346462233464895283281264640, + 6109150847331286554715980504760320, + 156038574887822299918461000744960, + 3213790671650786630087674429440, + 53161466999823964285729505280, + 700614459557013390014545920, + 7256198310569919633162240, + 57772009636424727920640, + 341301160751136768000, + 1409413346167357440, + 3631899507425280, + 4396972769280] + +/-- Bernstein coefficients of `17 ^ 32 * batchP 34 35 15 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + 3994320545633219154722768834794304161385836636569600000, + 491931848564748645462481245985114262368075628675275161600, + 28822293794927388172093494701565973168672976396671097241600, + 1068969500748945741720204195824355654926291912683037274931200, + 28172481935079005848276928100576077551031958494505634470297600, + 561481975394651284211230739673576839776935658745904837073305600, + 8793564696166484026217541381024538609006213374892890978779136000, + 111025703227331948741058456802513949851700078093170427843798630400, + 1150480906483552104454836662214858759494140796608101600364304793600, + 9911074503977403559513193545442368898087744855480809213915653734400, + 71651618932206424463075382856491796256558003546902063508319397478400, + 437699419883084269457329301944465505693286928900327241258193636556800, + 2270471044681580030234125982504706252868696501818637367663388013363200, + 10034963212534802928530601288507552419477841231891074507498950754304000, + 37862326695198478932714172208561817887460576980245900018288473420595200, + 121768828441959734062423626746431210279468861827900434068829188757913600, + 331695521691278089223194622980943430209352079082069261333573178222182400, + 757540195200196923501375426584660786632884234454034398110512732798976000, + 1433551582819343942149280743461285337586681931269052225388024154043187200, + 2220577780081341412226313462162559859167259797508663781676113488235724800, + 2779636329197523352583794947535873777279269240764235978899637923571302400, + 2771655835233599482860520345354526276185582591634234487588876750146764800, + 2168417884790570074985735188183795611040303586858662268482444166941900800, + 1324108897692161377692949502662201298758506547012623743511423025191321600, + 667586322320986041204822578026966636385722280515585960760286486252748800, + 351761994787051265099432761785893203886239585967820385252091349565440000, + 243910803374454996160321244069962620611579800697557703546146898903040000, + 175261007101317770666145493597252133788804526848622749648202935762944000, + 97670031214470125961175184930605508857952746487191428841584465543168000, + 37521260374473217947008257187693272159272700606317229130111603441664000, + 9195749186273854345354396385356017836075700996033718790961563172864000, + 1259870917565092484294384846639090073038546117905612800000000000000000, + 68521868295664734049037776997779595422810449012326400000000000000000] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 34 α = (198 + 27 * α - 2 * α ^ 2) / (66 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 34 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 34) (gg1 34) (gg2 34) 15)) α := + pev_wsum_eq_of_packed (gg0 34) (gg1 34) (gg2 34) 15 46 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 34) (gg1 34) (gg2 34) 15 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 34) (gg1 34) (gg2 34) 15 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 34) (gg1 34) (gg2 34) 3 (by simp) (by simp) (by simp) 15)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 34 α t ^ 15) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 34 * (3 + α)) ^ 15) := + integral_moment_packed 34 15 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 34 35 15 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 34 35 15 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 32 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `34 ≤ n ≤ 35`.** -/ +theorem finite_range {n : ℕ} (h0 : 34 ≤ n) (h1 : n ≤ 35) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (35 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 34) (n := n) (n₁ := 35) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch34To35 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree36To37.lean b/LeanPool/Sendov/FiniteRange/Degree36To37.lean new file mode 100644 index 0000000000..b01084ff7b --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree36To37.lean @@ -0,0 +1,207 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 36 to 37 + +`Sendov.R_le_batch` bounds every `R n α` for `36 ≤ n ≤ 37` by the elementary part and +moment at `n₀ = 36` together with the prefactor at `n₁ = 37`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 34, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 36 37 16 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch36To37 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 144403552893600 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 493101693994714012918579148426670877772048312935276219151155201 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 284716677101054841702935138951485702218186376130547934607054456828861184790152866861023233, + 140781135801897099910329244274124150082029812737907703440562151255161742870439765050251554, + 766487885655696755736020621283529028368244597506265057972866700316193864441586243995291986, + 560220605569171209499899435494843888316719731212324252427419303496836673462094673087701839, + 372555195075327426103752980181251925044732182190918830932572040630051387926630078995205193, + 544255892271555798265676421376289178530419901330641873633317485554259558051356299629679373, + 4284277828872657605338032540945870822722166672169445743776263830909278162149462709144914, + 272703726402263436549104904767030348324023948459009659370191996615157678670602643718098579, + 632480359152253844413330268106453942234469500367983251302519585910343734814898770803770626, + 682560155811389079544529394266788204875135795684781791948350394559001666110155689647533969, + 963076512060810358827879014322286871868423840434775448498004044009288872700256062322072526, + 869703234058465213021122104148224068392618972547366413880494313114797389100207868041836802, + 547591408414956805491876639438387887106505745542749299712650260529957818360714226431199043, + 47320496126273226656461772097738783909996927366088717215931090713581058328911040355299084, + 722698289229019956695598924543078679530213175583555974327613757605066582848559502907745069, + 237502051672022315196912941477386123641197771879017240021846971468536342485303136023436197, + 868369497458374981781593640836917003129628276771914818552667292301921765849354957963462357, + 438578321177476197339716421364764484874836134558039157592780601974480344459903842156517588, + 978666012094693655509033327215142678978883558005633073938034121499792289617141070699064200, + 66176116158658675948896544488519971759932946621793972129041277193693656041363621109485160, + 191699687782142650727288937565702457517005143699921778068027828320574505461684648027590399, + 46583672115490163730545302919494125960131785282055048209868918555886277884301264729842924, + 328311736340196048994572558441774369806524022077454408577775789750163206255262773557805800, + 937282285665206898885084940321990244877622276324552522436248391284780411370314721261293731, + 932178305196696217726479597813422915172221670182300283051653265175469972208681196132114932, + 423923417378963870708006151235774679266910825413616035845035705452506829226777185304365190, + 925321195563712385053605073717830696296446607478376231548789686364445124641844284127066904, + 147572997948952804610241423734102638607851298888827510195574894274094717970436648912969415, + 468305829931895919806009116999495798947968186899236177989002966034244254411023244060767266, + 881120362108669501983383999046337008525789095380814350496247041440423782321941171538937021, + 536969457885402893012868274488248435916196600104330528009544929733890527456347463839667042, + 418664176458152757037266016951316507769360869934394718846027137028838312228494653933772312, + 337636138853237547336487099785111216673670202345397045212560622535927337176098812511538057, + 192263955089829536314667728955320800559664255168291363152817345518222207478994174714115897, + 3070766870045131941162056875883773699776691624415567384379705] + +/-- The moment numerator at `n₀ = 36`, `k = 16`. -/ +def Nmomc : List ℤ := [ + 8767473114730778479826699158800000000000000000, + 54549574660377181497219757715520000000000000000, + 160634533160520688855921436031840000000000000000, + 297642598645976019916400027959488000000000000000, + 389174622455819447496292084474305600000000000000, + 381714918376930360512621254769500928000000000000, + 291493555544681062358929425792000691200000000000, + 177578984502053790228296376740994816000000000000, + 87761364494521421350052344791816058368000000000, + 35614216444286729461697066533392374169600000000, + 11981415170884785329538341041492946386944000000, + 3372288844104931747914706855086013258137600000, + 803517483798233150169870412760889770803200000, + 165504621500304920008449570956784278568960000, + 30978017450875324221782187005604526620672000, + 6302896697748460838288175679730832318136320, + 3949857253400785825299956715547060964425728, + 261383972606251920242854688089660641509376, + 15023804628961363745016842358166011248640, + 720790123472958030726578141238489251840, + 28401413040772774604418323227900641280, + 914743502647699956673137012457340928, + 24061928134819327652281243314159616, + 516624332287756628100908853493760, + 9033402261838841542644345077760, + 127978539408868520675172679680, + 1455708419765874620708683776, + 13100594342353784329469952, + 91170949349742959656960, + 473256364500750172160, + 1725112483892428800, + 3940134277873664, + 4243427688448] + +/-- Bernstein coefficients of `17 ^ 34 * batchP 36 37 16 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + 2418172917174749687578046798015973769344000000000000000000, + 316387161563555831054779389489604327610496000000000000000000, + 19752622329494478009228678170373309532205472000000000000000000, + 783183979029889758953491300200671335960602393600000000000000000, + 22144352025175982729958678004061450835268634403840000000000000000, + 475311266674059843727634774715242171420911334583398400000000000000, + 8050372537756866596278405008206627309339357454227051520000000000000, + 110417714971920183968827696778784536614802625595968307200000000000000, + 1249044552867985733248832839430464619078171281451918996275200000000000, + 11808596038494422090310309469656323900373150817610112321454080000000000, + 94225626754618059786205966745281827875047709634488888704755302400000000, + 639261407944891801045154903704745041884657724974587964446704926720000000, + 3707685781560705239471033467530724238078361871556498917931593236480000000, + 18458067931234688938677138293821111446213931035304040473635547250688000000, + 79096247091014711335511308091007142080442326952152193171341339996979200000, + 292257798685928958604554880033244685317196992223522496132372197858607104000, + 930840143444507619483603186200828384540923359871069025337496320188035891200, + 2546581686117948295762079981777370406043131511865557367261412698692046028800, + 5944898735120627914768311080331925114159284231449149313351198801474145484800, + 11741696160228704341398863538090315185520815081889766454862060043118837760000, + 19438914942466112591077090892656525126706548191278840622442934569323724800000, + 26714180023034407339376726307356278784862309239179259513727914733207552000000, + 30154826028405972737345543458667126574042227818940748392837108857896960000000, + 27624138991673067942570621224424256888070147827929404570726833764433920000000, + 20267422411183858789128276901979840515917281806764517551541693317120000000000, + 11802424800156947893565858809395472372483367074533427683795949977600000000000, + 5567254106358323734784306863170745545419637363377149932687507456000000000000, + 2406773979203834497449956035560120332980791035529418812488908800000000000000, + 1210150439116721193818016914385838077422223324282096034989588480000000000000, + 703367357433649993613982511500190163174492790670300158342144000000000000000, + 357310666005566882263853177149607399764883921595185054526720000000000000000, + 131509753875036939181452957299181815673007532784993670348800000000000000000, + 31644692642563817423960747905976325324898106380259540352000000000000000000, + 4377467450500819522456255437455871930225402409307949696000000000000000000, + 255686328323148308761958910049250827437871196490189600000000000000000000] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 36 α = (210 + 29 * α - 2 * α ^ 2) / (70 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 36 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 36) (gg1 36) (gg2 36) 16)) α := + pev_wsum_eq_of_packed (gg0 36) (gg1 36) (gg2 36) 16 49 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 36) (gg1 36) (gg2 36) 16 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 36) (gg1 36) (gg2 36) 16 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 36) (gg1 36) (gg2 36) 3 (by simp) (by simp) (by simp) 16)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 36 α t ^ 16) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 36 * (3 + α)) ^ 16) := + integral_moment_packed 36 16 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 36 37 16 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 36 37 16 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 34 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `36 ≤ n ≤ 37`.** -/ +theorem finite_range {n : ℕ} (h0 : 36 ≤ n) (h1 : n ≤ 37) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (37 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 36) (n := n) (n₁ := 37) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch36To37 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree38To39.lean b/LeanPool/Sendov/FiniteRange/Degree38To39.lean new file mode 100644 index 0000000000..a65a66fca1 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree38To39.lean @@ -0,0 +1,216 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 38 to 39 + +`Sendov.R_le_batch` bounds every `R n α` for `38 ≤ n ≤ 39` by the elementary part and +moment at `n₀ = 38` together with the prefactor at `n₁ = 39`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 36, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 38 39 17 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch38To39 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 5342931457063200 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 49215745997747131449615272463141316329123716299736310517076695449601 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 463921949838863083819862179265327309337106713767681601378176776564005252727107158432022529, + 606136100103860920114078776283548437381830712369584636079954133515267731927641951545888045, + 175467706275025650280825732298021324454717006095975258678555090857275705468359422891643345, + 135189933500882870940979194158213818420674154205885349727765934853638675763211396101252515, + 229946899088894192811396738078953245828879724625162870029945562937700749202580469193755585, + 963714550400603252623335698802130449215952050610367985365199304959251859139673113177510779, + 608440184220881754822311136984276659307454811101677371729529766787219064874060071912936083, + 513648442671561082265991673699126927265113065907630324781167971627628447061602410525905009, + 966420053358490258494286219519345093776918307331695244895444971015610266841183295421235931, + 113352597434778466104879046881983158787598667992769869135879721523350419076048530885671965, + 629893880479066403555196101512783471620486701107388264886757387892719109381388154984493854, + 660496152587494653586856152014174380147497812257022088471646515564178274956389194398320878, + 403863909133954854910498227282175830459976132111678350737147342592621652149222106810479224, + 760149944677999528498216641027988366265490638359471766694317462750491864811039753550662150, + 919707863939774714969073720660228521478441021257391125280299291199739528169696982326827252, + 471022827208661677351666329247079883989735924332525870045488169458956950438044608837395029, + 18153398868205730664853806853452980444471646137960690776615660994850153315547354386532571, + 514595244401485283638113888083339016809324144295543882848807826165692414649400892333505912, + 391224564886175224167759511769987451340402218731093215776562546942920811292202501960611463, + 268130885712120997592172700506842667243329229780273219018316317592314828050358343440356094, + 365432892755424415944448309991615968446741794267657288531514794587056848356997563802746105, + 49119106180059834896400145652784496709271069531302994951748744757550154966644412653605807, + 525239112937831531247097375327410164179234828844136852982792377844190459739544548919434692, + 888159740522483036699999663991961699167495168080802314581238279162521765902740794273605118, + 179151411643531093150894756037336392717346685336476157681467065733508534103849325975145325, + 251113204888112445290174992232050041902585646541798754959092101865849236400002593911686938, + 698704340857976025651530201637384576758240915443325619766816320954735867757517460534998448, + 836701139088455213206928518345980887094127306651616252266939466672558808468281948296565242, + 418727425017481632734570145374649217248553042363665035748443699347035987501568127267085422, + 14210032690250874420673773368230394582216399875643365001861192415861399270445142738782759, + 899761005069669367753327229707534425401144612662871019437999554086128053641796446946655461, + 506664994434170495720705934599923969186547779772952367232273217828591536954540369684345932, + 213275531932649255824126921448771067180636990258955293521842591857107506040509013227884950, + 799729688531761184501878655479397067020288868974794078021843612421016891090344813970010559, + 493582316088305246387351319278446724672182102073403455086734797831626028387608100619895446, + 324286885835907399968322505484858828121918099960442309062014490933219339451155370519833096, + 995078137985605742674214547482404468765629924717325612684547223310278455908561672561930780, + 490835485422122394470616134545499721638344725344805304810782898280554384940111096395392429, + 325368409985194010151392316814268695718263970480829783286161583148752627779437023960614078, + 89895144401887772946051248458972511851188839571487233716322659] + +/-- The moment numerator at `n₀ = 38`, `k = 17`. -/ +def Nmomc : List ℤ := [ + 139822013869614918336939834880671033373816746147840, + 914778750309943084342004680020551819493179994931200, + 2839868702487607363277754143993395365579366884966400, + 5562844808182003378345978252907766326037866710302720, + 7712565326361653932313146682798302386447784044134400, + 8047464454046491997034901124405512634852242299027456, + 6560288273992488450457724782120144764978964542259200, + 4281917696431679960885764149611537239951458513715200, + 2275588544505066198132576572444379068284962561589248, + 996409996305788317854498102919263701519887895101440, + 362634610093328265931789989590420776176541032775680, + 110481063185316320076055904713392908835207055933440, + 28382864898523387978769797385932077410980402298880, + 6212059021126932030729841687445128508020838891520, + 1181172360246583107732961965060917472876209111040, + 204879740238888175404201307548459235247781838848, + 38980119362162723496135736205787251168606945280, + 24516342606301898665025044145285032179093995520, + 1552552964492521693674391785970712516675764224, + 87011917636146147409941031266792013100482560, + 4134671294651461440822247154106531745628160, + 163405663775694571046616007663151124316160, + 5335832717231028320001749682099826196480, + 143755072405313514389080336502378987520, + 3194517839910252622317371860377927680, + 58485395134840335981595442932613120, + 879375558773867135070681547407360, + 10793198005288417341700099276800, + 107061473049406637744534323200, + 845108429044719599537356800, + 5185179795751517170958336, + 23837520940288641597440, + 77267149880599511040, + 157496828701442048, + 151870043586560] + +/-- Bernstein coefficients of `17 ^ 36 * batchP 38 39 17 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + 57073473490222468348038876071421442380673379735318100191477760, + 7905516490754810245172721159694188050155611822762094529976729600, + 523916453284074308348291622711177132705554103630301859071383306240, + 22114493982819616825917937987025857973366304003006957387772015411200, + 667726331354638667761099986163345788468210636987584284789509319557120, + 15356308219126045808293902307397995470559595362298991214474880801046528, + 279680246851345433137219059298227274839288853875633601401979497779036160, + 4141021709546905827414291994462599265090308381033190708880059863738089472, + 50779268116367043996380409962665869635413087364028857430844899579742126080, + 522761449647772476785691618908099875191211846474391473275553661091217145856, + 4564337150961525410992046038155701013547500001355519668205007531551779454976, + 34060938177738325978723783474038687359182129310768685371236685701079755653120, + 218517972816297814839647468756554690094548435100032883361709335126643279134720, + 1210595381301223343421102982917391053306714696909894095335727293085890746777600, + 5810742584945609801435058016100923333606709548630862088417525513608028361850880, + 24222583992335755383737764600951670057655082882445583508961580049445399681826816, + 87829119035596997394408824378930329470033249437202684053629204372122983800504320, + 277071750172442380768187168239675956462182597267532895616691537509836975320858624, + 759085010878852037238882304469141093779172811113704597720723335240649454565457920, + 1798569208766665017568751954972212077991367909653906495210608557524118690995372032, + 3663467826443953466414962875436175251601889436411314038897084233896137262398177280, + 6369655495113839071487996389902223200675646415190607711870533626667203663253995520, + 9382064769236910067605130910797576404084719366221804969863534557285683264405635072, + 11612414683971832062982041585089077396786883046178679079183653915269729203026657280, + 11969648106622790840614166437923301102367647653919545629955736779905908303038775296, + 10168258974790469459432122990990221861807759677915159749793858752000888946477236224, + 7034684125561687051217826904991645340843522144478423602690182615256508211291750400, + 3919865350607709675028258495284575376789410849696722722652986784487027827342835712, + 1761151958102937804585647157956364722917530293589229847233241958529241638408028160, + 671406746721326503157125515132171904139943105704210314268006602611216563941933056, + 254820187796248294353491898665144553189550769944113765137629629177674094813904896, + 111567979064560212402394409829470258498038612083889347793082244316018560624230400, + 49023351586993320899275678417569141115616410997757448209765038681229838673510400, + 17007900977118530202676062092279634556881969337584314049927420424587492458496000, + 3996028037514677023366816884058774539607985990743067973314478124017332036567040, + 551688971129915219161300018796547143470905643567676205620641492626939775549440, + 33187128742561977229965996514262495322116186228788666241415930691764564787200] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 38 α = (222 + 31 * α - 2 * α ^ 2) / (74 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 38 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 38) (gg1 38) (gg2 38) 17)) α := + pev_wsum_eq_of_packed (gg0 38) (gg1 38) (gg2 38) 17 52 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 38) (gg1 38) (gg2 38) 17 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 38) (gg1 38) (gg2 38) 17 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 38) (gg1 38) (gg2 38) 3 (by simp) (by simp) (by simp) 17)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 38 α t ^ 17) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 38 * (3 + α)) ^ 17) := + integral_moment_packed 38 17 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 38 39 17 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 38 39 17 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 36 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `38 ≤ n ≤ 39`.** -/ +theorem finite_range {n : ℕ} (h0 : 38 ≤ n) (h1 : n ≤ 39) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (39 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 38) (n := n) (n₁ := 39) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch38To39 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree40To41.lean b/LeanPool/Sendov/FiniteRange/Degree40To41.lean new file mode 100644 index 0000000000..34f5945b51 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree40To41.lean @@ -0,0 +1,225 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 40 to 41 + +`Sendov.R_le_batch` bounds every `R n α` for `40 ≤ n ≤ 41` by the elementary part and +moment at `n₀ = 40` together with the prefactor at `n₁ = 41`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 38, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 40 41 18 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch40To41 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 5342931457063200 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 140771311646190712242806590263718917259547439160455144794682105947750401 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 245495406050727267203935498638989557488455776194457391439024449092723223962813326147715073, + 39388652195042485013320823296419285461289516481150933055830822097094477167791303556241016, + 907445211208268751494223650712281844790515053649309963836390128887962979786130739822033823, + 258201092695585409266495202180510456778821663165534058691874601507960357944131814344614995, + 679566913360396253110670506432838746097286648233980904260476374512183189305330452639382525, + 25912350315985259818971685457899114900872324357507034494565560593316674063185865047244783, + 517690402791033657291520919399331234345244892725989612333544016967659891892118419075730284, + 390933140413185847608532382155838199043792103487727706152938338407482219538710580367944204, + 689422464336783352420993314486423748705007387573097074691743057441900898960271894141451634, + 826990329247978883847380600359762680469855771453450088700961559007045759730932251494825405, + 740565275284773839865227490052451896386218909875080712838273684174668519049317508337905419, + 963748473400293172015770802312770124119228357512121547406179627857565829716935327458068201, + 889656357401150877783690626390741001038227599898120681224280488511445814898203484672558550, + 952340112210104737321596121449391912371617040812545611574687978049355205910853115917099038, + 83761504740153207488637895535777011195507583427934438761586731513098849104877086986241740, + 727607680723717432256132094598072546709510891102997771822731505181452301091415211912301910, + 287901207830021778442138659592409668013150912762879047087807183724234435782299452916033036, + 526131901671093841744046840425938212799587130871512865516796015610814635432655056681495732, + 670503540513280721188860594499062104712203028858758856030897307721089734592226409250191594, + 475285762237163614755702448081989598822993655321082407467888264459277326108603420516734114, + 51767773983334810467161366965494008429875794469187198429477574845349099519178384882402547, + 453973974824735501875330358661382206973208847162146853468220913482854740797921812138981594, + 615489816665259257674757345164896461512836531425798002632137318355862601144495326301840032, + 5821503440708686415708989422075944195425598978415694308561014872937097115690064306874177, + 76130668113274108995491961857607968559540873955617604550954422122599378492550841339423402, + 896691570363939540953248244469125877571961910750894787634780309805939089543120414087700442, + 941244770494463568117354810340004378972906584886322430732700612191814816581845987388780070, + 500751650295995648423386963347275657908297301047288612455536596412219381884282082154434128, + 819163297113593882162909124511685986882768918349727421747635339578299711204379960936206768, + 736951831952448534098110874197477838419658435436687867337004279083987856474833230529038210, + 342453759657664997364255931714838026518124884778526189758949580959659972097815049725379159, + 20798705709889303129496492336870764998791133184393573822083314332128747636146674766553027, + 503121802412465891505577811413549629355779779931610287241349592356589163088671205072813733, + 17514408635178772455074856582347419302566346546169871370340077178782069486315797092509832, + 726283989982918482835229118906597437237781052209791851723402877656551024302943392933683765, + 655085373001213922541028181009685182487298956656706897640614760548871297395276361124096614, + 416278299784507963432946497077132346306804618216388745164299362050641267500561825621324509, + 469109365908219217125501117507553980707191411651431104582280961538345878439939298596006696, + 177040699279366373144069116183305273394515794448800615425419744149089066185651930646522832, + 176858342974730060324040468737261226284794317850479098716835833717190723369752612570341569, + 454431217719607555498651916101374668170226254545921061243704791226108352347243340297485384, + 122144648923097559859774047283158021315460802101020615961678820431927416557733367831326200, + 818979720333844327127310430605619495859259833440454201707569085043932794059777224971565807, + 934891273307870566538705630123603802446971117446465661672239005539372743431833595050876101, + 388162163] + +/-- The moment numerator at `n₀ = 40`, `k = 18`. -/ +def Nmomc : List ℤ := [ + 64670522157568552167457363212785477079998348651397120, + 443928785799573138321667028061391882959402583782850560, + 1449401704009714778943896128515571550690605338926776320, + 2993628004076870654281456663324496366723203568165191680, + 4388587699311400723942924805346299484514209103101296640, + 4856547691606816341849170828483193698100550515315179520, + 4212655768515911998584943885962115290633571644245803008, + 2935987889210574401124196278357659367328830690970042368, + 1672180248363954353420597144375610376638481717526003712, + 787600678062358267517895296867719732295947238853574656, + 309396544239520913003283201005975922179460484371578880, + 102014444415760722810101580339873764712955447804428288, + 28382958547450636254540337967242803929257184411516928, + 6702564147432040293980370767728666402284925020536832, + 1355605275766909686197760236148047704061630591533056, + 239161647917465627259687095258798211139582354784256, + 38606207115455805822654376004869982867986029477888, + 6891623326063709341407450655915487527123446398976, + 4370836023942146549797183903787204142175870255104, + 264783941635716435218873237386240353244054290432, + 14444944882115852309697772096837164195385442304, + 678246957742511527324639079894004142153138176, + 26807292152038156363744253329413673265922048, + 884327690732539531709078902442589601923072, + 24292433408088112933954604631358445715456, + 555510222279991670554325652274868649984, + 10569676876074237332831980634278723584, + 167022895439411249478990896924983296, + 2183242579593696970222549843574784, + 23445246643059736976498519703552, + 204633356590459468118017179648, + 1428490066333166044773875712, + 7785591010347871157354496, + 31921599633392909942784, + 92611974667972902912, + 169507996802482176, + 147197119168512] + +/-- Bernstein coefficients of `17 ^ 38 * batchP 40 41 18 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + 38261626340169677360481087198499943476904891797169455182643200000, + 5593489701252431811668601109215343269359659926269623107896475648000, + 392168864130415600978296868935330916167662406738899831315972594073600, + 17557220607487197136161206212941208226780596252965447805129295344435200, + 563812092638799963129056308627020424419481535460152578564784409437798400, + 13831072008401979800291671489953251394289160058757519647148644393340108800, + 269546167047292730324868965784802255753856820030940869601246221725545267200, + 4284996026133838611430520486117348479325941344076080767259032507531447500800, + 56620933040137713290000555470539579815694954048470935722859807787573009448960, + 630567757595590329922922282779222302700508860972729264683930837498429827973120, + 5980729943961214569501587838002679499993259762382892556836995829842856630026240, + 48698937321870389324918653549719393813463398412816253047930983632965350048399360, + 342538173214525887210188827517924086328068382015838315821176396253096382541332480, + 2091193974772554490179892639858999613241258259824950256685857811566994695043153920, + 11121589997950540867065170237485292958832837400033378786206534130693675010584739840, + 51669035142923218775652081401184504836909102383338315546937352335331095139875553280, + 210119264222695899650526153540670573257849223788123460059866633501055116950131179520, + 748977864005822068101411342200288805900449456563602777537458915359029762941622681600, + 2341296008539735146144045558368243911278532766275795238312484771984005969874580930560, + 6412967289049228948509597599906278220607913469749566520157646657291977290179485368320, + 15352414317055704521103173049141313390710729906012342977212340774180928720044965232640, + 31990446693596363391574550331345798785565980747822517829011021866211423939836258549760, + 57716963573001617212447326216724740657865203126456203424516119265629881009825602600960, + 89627595505628809133840650601758663868515321373848126741699896481103970264834260336640, + 119027550199572387394199882725560699546744133853163434410293200878860492808087960289280, + 134241811062338733612307544678323779285869997223251263662189058504439556292650739957760, + 127565589610874722022438273011751808064366101042928322438416078382519699386328458199040, + 101195857803412142882939941993329881430993434229734576785289077898530994326762118184960, + 66289544565110150764446049835011598168366779875733401165287062182723062420561146675200, + 35438261860889986630902420896993957164588191274365884000595241883102432883632819404800, + 15336795484647188992424126299167247459087027562877020378551338557719656723742143283200, + 5439184674733009786491215278080535028799956230009641797197675366722157833768822374400, + 1702635068435256689561225734687194296494473861208038246597355193839952768923556904960, + 548737675876589163969389519805107589311739571207184868034552759539825518732063539200, + 191298001674340762633990481257868836695189985760294987497052840925178437875584204800, + 59814893947315019269352875945032365149975368206865095958725441351359781567830425600, + 13524692891237251220014145775113463813953393312621116081483611524401742295230054400, + 1848494116510525607589509881217884100777998181366483658167379024834301758799872000, + 112428698941716160245322901489781512117593489735489722649759787234266938605568000] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 40 α = (234 + 33 * α - 2 * α ^ 2) / (78 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 40 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 40) (gg1 40) (gg2 40) 18)) α := + pev_wsum_eq_of_packed (gg0 40) (gg1 40) (gg2 40) 18 55 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 40) (gg1 40) (gg2 40) 18 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 40) (gg1 40) (gg2 40) 18 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 40) (gg1 40) (gg2 40) 3 (by simp) (by simp) (by simp) 18)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 40 α t ^ 18) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 40 * (3 + α)) ^ 18) := + integral_moment_packed 40 18 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 40 41 18 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 40 41 18 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 38 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `40 ≤ n ≤ 41`.** -/ +theorem finite_range {n : ℕ} (h0 : 40 ≤ n) (h1 : n ≤ 41) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (41 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 40) (n := n) (n₁ := 41) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch40To41 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree42To43.lean b/LeanPool/Sendov/FiniteRange/Degree42To43.lean new file mode 100644 index 0000000000..855c3f870d --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree42To43.lean @@ -0,0 +1,262 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 42 to 43 + +`Sendov.R_le_batch` bounds every `R n α` for `42 ≤ n ≤ 43` by the elementary part and +moment at `n₀ = 42` together with the prefactor at `n₁ = 43`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 40, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 42 43 19 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch42To43 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 219060189739591200 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 17448114526187346549066687205352958439346512716307303958331193503998646681601 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 359031320176454917834257621455813147124965598399292478744038266622504583955165292415418369, + 426274101599721164509541838531663540340483838074393110240207147084893450921538882743925972, + 171888073274316011435969810640624446826961935523764734283869311253437064242046449108661574, + 489961064478351142393171311700469341085521319261158537675662438003704477075901866472752480, + 892008948937263675974188660545720885470357362356644834579054596997538222522824373437071251, + 65679716536191223047710646697468133436733488742277952152837905503673412217964264244496615, + 535890975921502617720156237156401987887209771985138809396901826637651833543479380470557465, + 17391836291705099272826735707881090498897738542641182440819765775350574599116585109290573, + 800313011390419805338481838489443476985753505389780397010019368985723606250878351689401307, + 864290479728798868559914791548470725159631508477582482267575384327305152882608093052283088, + 488229781438352577343614418752506523502744234309746290817511752949083750826702594664818311, + 836576664404274435877281489632758321980125468783618622761032814918092040060393877262657049, + 288059252739495210188176583550555465576267348067731137647220598508516888791210912544824316, + 233526457181301714553054752325789903120557013837503726388466261621669860240394189332722229, + 960231198605783217781809689555376868500085438493126391590943636440243150238168648708861654, + 379926039330718652736351320563382816279965934107172874787257817504077876968811852840148609, + 325995982076930719861906495563536297002535680012809818401653555799475605164465039004865242, + 688921978061975127217834805179658203630110313441065775664110038173679214687229071624659415, + 235401095156570820368629893237124300232164339499723650502514472091418669119176324284332609, + 715365001041268526071491789255426042335602775917617346123307840425480646416382185828364050, + 243312689319227184177062408568970335105621048809664235459159004296203815683512794353719359, + 55645533722126558555166630567824614332323679635334686907673863501667673209156796556984157, + 70835124980841963668538514847935168584108665128970854240544883959705515712260546313419581, + 142961280100039920648395557893950412170846922576260698741612423655561092788671450123818557, + 606239138011674838756153494724622867655970507431989861612729218986449491868488671022713100, + 661033963377155910387772260833090151847324138642941703850680822880305561006291012514498019, + 465023862539840581919110568126231641579155452725980660233351615228901689537415033130868640, + 663783076472071386797828494409413214458982376709419332778349022759672105259645548898917063, + 279836613408931261278292455386917284525034119289221511174661871490889137056484290588076183, + 897335564008145432648325426862276173673334790431345745817659305500218292001346915221485610, + 346716417067685458877706902848266846769905801977357566566873879454119173817360765158863369, + 683343198156404687739836665680529599784686996842630887996230978782936883606988847223908123, + 117229804908715016246910817151285289161954363230651186873553395760883969202338822650546339, + 504653738763723788317040665524800685638205333391000363304900877437343348955029834506706182, + 371499911434518489340512375382944670808494747938400046256358477974554397639522396560056469, + 78117834672420266826014540038667420856738184280177742772874232850600833868909545470974523, + 696216790533697336854971296514265122494112335583790671128996233613735502871928060207975560, + 571202150000087337518413336716472341285468045028931534553253043152118144537704788186146495, + 166580427578667476978250024494642093344855418139187302935771789406850550002910360076251281, + 306199875313276121704691024494868446555315290996182115162230317515694265496198677373272395, + 729850087413913311579082243234707334926859459435552650295599023578986084265320372727973475, + 113326591868854437003690181972400504593137779928443399677428665512083494669391223178476697, + 265919397754168418916766069412356032024388287068807758640743628726273300248358801038448742, + 294893602087748622457538038623036680277961541785450158590880140513546980382840528596316112, + 302636684525955230132952676529232408311425066154449382631856947634071963981869845001783271, + 189127636922680927472956340696445214458372963166740672133059375556968866023925328773039250, + 472632206034851057073329819704543651604703868326481236237618726009910094192269813889902445, + 941683924013557206505670332292634477582642146466194274433383815085341767709732417404998902, + 705227770533595584449516473956737567288236057061603520976258897995523890979347135284767270, + 83675483362775555753871784702064678413959227633983273607609487632759602] + +/-- The moment numerator at `n₀ = 42`, `k = 19`. -/ +def Nmomc : List ℤ := [ + 1310158984431240513158758282541801338875827575969032437760, + 9416965620683434064147691096511725685776136198093390479360, + 32263806872014617509885508467707288834343060133876345077760, + 70094826595607656517457481632653961019951053399215151513600, + 108367046031903021112407403329833557109262406801704867594240, + 126825252108632110881947812247355043641593452199645911449600, + 116698377603063318999906233879843826076317633583420413050880, + 86561396377375976948362710707967343495351062910114014953472, + 52655364817890293660461984058821739091013807355473211424768, + 26586277040006700950968084973595369270586510417359547662336, + 11237735540512699882913048057700938629245136223601652924416, + 4000885801242719767301979742462563023777093705282994831360, + 1205207337344337963091004503399068914730701584132403625984, + 308391977823152947155340299273870278612455297741077086208, + 67347138823602776254945137974597335973121985461406924800, + 12652584947994602054811536231146317726566634249988866048, + 2080469673842755044416859176893902007793302732142542848, + 313711959064060779783708525807153147416632173372899328, + 52699111083378172800989746049789895014964245425029120, + 33846494362462825353445433245153483242913703040909312, + 1961121939466669610230791371581701264377468594159616, + 103986496444645059151769894127774963443023730442240, + 4814485189516846205268959100954170886191717548032, + 189827586896308129765626386720228656212193837056, + 6307044407114500771434812674005311646741823488, + 175992758363145188544400825055364498541510656, + 4122058758924467754177483772129741853687808, + 81024478120487769472617558208825459212288, + 1335296356524070231215193043272483209216, + 18403234097606917133480010999876550656, + 211115479132694253716575922184781824, + 2000678968776445574732491725471744, + 15486212176666329230812360212480, + 96294801242910838182484377600, + 469335683915152777059237888, + 1726942819118549355724800, + 4510712620291058565120, + 7454258377519005696, + 5859847220232192] + +/-- Bernstein coefficients of `17 ^ 40 * batchP 42 43 19 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + 1102673149437597617282477747474387576304017158497855243788849176903680, + 169663004946767663684255021823836766566625546249680293172109142067773440, + 12546617341576914981009387377472132617492778847789534038972582672790978560, + 593812881455782882874796774088979851087180381771109395287324442152350515200, + 20208179543789022273601831022330862728700562860049915703887913132794922926080, + 526718844491312874593556467856528082488510426969414396733684783933601831976960, + 10936930468594311993456249721854528482116253953808905884448312300027932227665920, + 185799365161863353993916465476912008972478164410736106382303068593712815845408768, + 2631983440640189298052641108365033520858924158633435236520770540033149838049673216, + 31530075714473487382766963652148838695787380255873119828280788881864851689748561920, + 322855828539622979113418696840259794419980261289584760384420218182063373558938075136, + 2849138545179156884802058767339322296004933645028641539483418092358682074703688892416, + 21808737336560385320951931843394431107878001025450530981592926288376394368189865132032, + 145527616702445376560560335919701445689873564602448008040423652751841235123463019036672, + 849902651268190816116952252752239133848747567548814081294244739457512485052738562949120, + 4357442772441081313602312043445969229083793496256896113143085334754174906241903400845312, + 19658515552175474634776204719178004395207326802417848738247202947274444518861920373047296, + 78177535287085681138524932166242829168664650150241749524239489459920353018268551221346304, + 274378819365765264307765528522526401053112529465723465349222781138963048950651321770311680, + 850379514276880963247534410454769697516707756249784460075647247597373284177560797532127232, + big [ + 326670526972181747748831370263389654559831608497060263700141527811816841771667785468870656, + 2], + big [ + 611363363469434690808451159797135678858616106383735832024332035888491046815958042236944384, + 5], + big [ + 896431717541004453357068067031409303221828385164417358636445794383885550794517641242345472, + 11], + big [ + 85869449895925743529324473893525843582307542903565461282418264085442491982444062432034816, + 22], + big [ + 740496817198763790919143105932143055384789824928818491661650530459305226741178526540496896, + 35], + big [ + 156128512846999921964892007061101279260833477819567548634620619186301931055251703556210688, + 50], + big [ + 697725669192907115339223463475990762461225950640601728837731747180859149856933651503120384, + 60], + big [ + 952548914559450146633292045224066273368739399640759317084014136758127914103973605042814976, + 62], + big [ + 560302929599551496898641568725764779824727195315867556049063003559990842869893219416539136, + 55], + big [ + 379430280971849496715780428071197587871042353224039886099946008574013849572066129749213184, + 41], + big [ + 746380035779788514303433649719428296788088868519130585571256844913591770686275244471091200, + 25], + big [ + 228066049138241461969325542104835470745294635531651685934523161151653326500722382290812928, + 13], + big [ + 546258866681154627241885263297732942727778885022819373840712403140497923741978499754229760, + 5], + big [ + 887053292221385647009123514144230442431606819326925458397185494593501302373119328010633216, + 1], + 531613752141675186606570869730030714358122935576765620342715465413977254668277739650285568, + 134731350699238974252557245001734105339516996291628689207995563074534844229031654261260288, + 34799567288576444424425470623593400311333285320644887480365006960967086398781353678077952, + 8975266002151911009134669455671606597094815547405255210376289613751373864928822110978048, + 1874979241295216081070911443833028882432162995415258299021105362344607901850790982057984, + 250068045503597132176916781321684853065644548720200005666937156228795247147476131512320, + 15215216026115670027975489266973658027800525970785006445118507534701346479444013875200] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 42 α = (246 + 35 * α - 2 * α ^ 2) / (82 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 42 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 42) (gg1 42) (gg2 42) 19)) α := + pev_wsum_eq_of_packed (gg0 42) (gg1 42) (gg2 42) 19 58 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 42) (gg1 42) (gg2 42) 19 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 42) (gg1 42) (gg2 42) 19 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 42) (gg1 42) (gg2 42) 3 (by simp) (by simp) (by simp) 19)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 42 α t ^ 19) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 42 * (3 + α)) ^ 19) := + integral_moment_packed 42 19 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 42 43 19 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 42 43 19 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 40 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `42 ≤ n ≤ 43`.** -/ +theorem finite_range {n : ℕ} (h0 : 42 ≤ n) (h1 : n ≤ 43) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (43 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 42) (n := n) (n₁ := 43) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch42To43 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree44To45.lean b/LeanPool/Sendov/FiniteRange/Degree44To45.lean new file mode 100644 index 0000000000..cac1d1f3c1 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree44To45.lean @@ -0,0 +1,306 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 44 to 45 + +`Sendov.R_le_batch` bounds every `R n α` for `44 ≤ n ≤ 45` by the elementary part and +moment at `n₀ = 44` together with the prefactor at `n₁ = 45`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 42, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 44 45 20 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch44To45 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 9419588158802421600 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 2390289318391773229344964722860880787962677879744753614007714635169522309608243201 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 943934617049227548946764260768025456585383457136725664753946938483780198968312375281713153, + 186456391962280286674388608212873563796732550737620062532916879534145183238007482917389258, + 764608474804831493396439836319418864697550040721497948230295228545510166818474814252292428, + 495010585932322883007417254554300355593922448264024231943800211643416550078799530290071881, + 829504998736644601329615065698798215837783821424607002173127918980344774597661297105316261, + 629259203499080580498571555345645761640215699497943087030270981327906069295273694630636551, + 871280367400730281385320673456989088335512575137436708352593764808670221033557254812105160, + 379833196557938055740296765158399471213312798686210380758768270116787968427312518623604484, + 795635254648303406100957286737618985258843367967204857167883144434484290710653246412266186, + 391396399255720423009191167518280224780914069104172536636205145891662071111940998699532675, + 666335697993018124060222373231243034277989387190433206070124603413761296229209232550760518, + 155684387407472016541797440722818180910626848792649636155867606131796134247622644166887173, + 878096560168464884620511926772116107115996326227064121970559851934564068842899144457824536, + 267821798530957178140978905900278056834459910237938598737482367806519728298697584234880584, + 950934821440489877070196065512033501068110659536549341016663414084596060571461099407140410, + 786985810054238020543617296862652319272433534690487057598889632402199341510945179551740621, + 244146755085794709807513146221332119544603982409767505647303445944301799631732136774131994, + 411933636997408649548024180156267641272723897480506576818901495435112362402704675351485498, + 990122245971224299442729343464019763643029614337906347346552175602743285493070612155180678, + 752798192546240530092807892685039118821388020757425467101916443905739933331690372519886661, + 743031179076961396548214893688970658894234416841448077011262813659086495481622538879554797, + 472714523414166476841569867760304908572680763196301205856388735747987251874883167579834032, + 323376135216489970420234507053077403807596708541994521364470109694334770171724347455251828, + 72816925530831628607012122733320447823872072969545068639235107002004277631326887120713768, + 131900560098511056584338996482515234578246962161120698041700706293764921483911605205447875, + 478743258607851785892190254018813607840683800434544079917937266525472224200137114807071888, + 735461043498889497996784100665242169542571655130325135529304282492910747254664448765578634, + 758881256822540749965465695052232626665861125097406789891411039060489171667793145292269337, + 312662580523578021475641712536576239134747589838939672573763036753925634577407112230564784, + 393143972189796671447081992885090601679277539233926222674611142541184008927294469213678488, + 907839553446552389889943215068805332928725944927154690032771236679911525392146733434541990, + 132087407959995039211160916547173368742980447520256843644238589466246764942008568922881767, + 842099731417993416500401569874928785494136662118774341146572562294486441690649097706426731, + 418458337950696796282589039860347919231405149934322640476156223778191674877104724705953914, + 534363172741322489414869372431692517679212264759888071928350089918222740600712594429020954, + 510728359822583003249491214417329717939699308938077817732405874992212713334288109196470176, + 547629012679465249609788389463129361862765381878448624589665331336829618084142591323555895, + 164730449704493703721140702320520351313206472988004843372550769793840291267134514501434620, + 345189672394590993392782481552524485608464674233387372511348197591538040448381725106601523, + 256153492705505833320860208481221894045192724135519840622363976627377862013040635835534223, + 181926231695437118048860382552035940393713971436527849475350065511764234776344355748652121, + 67610868266186639654634351148167162464396899955225516243327148154636223590155067354778487, + 655351054145195808594479689195513377026461472889985329004864519055794969567175971809816153, + 868522292318030964379752453945237759728283558892989624703003937495584136438854863844570164, + 752154807142948962149477728313805391456901334567595085660100278932583120015519380526510855, + 934223653976522706279042767471143881907354469206579399533073630980924296850252185278574283, + 199293684349277567524648477520220921828584715296102220330960909494576134948285193722212325, + 904560680858969273106338491263157760918746150380774110556684216184008613213292163612644631, + 330019090234465488878795221153370266207605233694775894431211393216679578519800857204453894, + 690854366192066275063529519272268345323341922817105130385063544543374559493222411261077522, + 943461712056633597559703724114167409126213431635766096015346242948789819587367662652984421, + 140771451116294342382466673793708859108635438330428609875568980886560074238461101558243072, + 57492570639958915405605772779446225638451195428316411240127016566173070417991945819560857, + 495278368736566354630380861590629462601808459636594988202337030778080927402857216431685323, + 923660508315378175256317055179393322378542085265338691554547328826954800991577088772860159, + 30895645272655873212373414359751171628524294919438719227704739509451568739542] + +/-- The moment numerator at `n₀ = 44`, `k = 20`. -/ +def Nmomc : List ℤ := [ + 29622588493274960680523891276232384437695166528349447546470400, + 222519750414996484603132359195264216392243238608503741140172800, + 798380205242313108181890582528029739005132395847123609636044800, + 1820415011148535260648344778204164615571003000945433329323212800, + 2960801077975295393846537091623757336918658237549860864550502400, + 3654887933248511789932687636146316733707959705842325328075161600, + 3557273587429108242774398299204237140914024030928031371912806400, + 2799582837695897009700274416812717022326249700112667176127692800, + 1812871960588012030396801043106548333437396746737968716164628480, + 977857830307047526127852369039327396031007853365578620668477440, + 443205250870840894128094342288416148664519703125073908906065920, + 169834169083268671688230548627200277771778366064549243608104960, + 55260268661757083229919972315372080001509486405949541182341120, + 15316004702314096307516564212376146433172944490142876261416960, + 3626206743427919248854701095351026405976258827647679096422400, + 736149997155658480965596650242326013585748700328282292224000, + 129053010442868743132849374964698195560873357869586369740800, + 19856115399897482909269164494099900129142592255826570772480, + 2806202259733571202666050754831208611035521451434683924480, + 444779221294561277115371630916787171084660513545356574720, + 290373838331741683646511062525894358284749391501878886400, + 16092240013454615817093701739654935534034376811568168960, + 828281688318844165802301926122973536646649712748789760, + 37743003880197022162867431691566043438830264118149120, + 1481226561516042064112028154463171645189243787018240, + 49437189357069202418611636165470743049173100134400, + 1396875810248512697947399939934547742728042577920, + 33379516628918572655208663470536230610592071680, + 674519958335488793530741980896934946186199040, + 11521864782014081488765884430443735102259200, + 166111626230642118894673459973903320350720, + 2014870590890881775527624799322101514240, + 20452651674459912251356564158582620160, + 172338614210489982924071777096171520, + 1191256141557218512833683631636480, + 6640537318726594250852699996160, + 29116621233892995084803112960, + 96685513554623817842688000, + 228557150695638549135360, + 342726482509871185920, + 245048156482437120] + +/-- Bernstein coefficients of `17 ^ 42 * batchP 44 45 20 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + 34870773441621940600957422146078522547692990358981348221593423813017600000, + 5632980824197528511477061265960053352696424343760723167655048547236891852800, + 438178910948147134393136962155737622980750779366671608516756649595366067404800, + 21859444017222635908894478907213755599126802965538088274118323356321932378112000, + 785832203617110173665363859599787989652557256083578737647391940327237853642752000, + 21687255183444858213201174884270117963426526226927839158840922600507011890151424000, + 477991254866754539090364209402947592034893045568851473893941640566819037792908083200, + 8641977511166701134633036343766018252137794143996084938221823358320621233831621427200, + 130652103514397473349672231735710342169324819391859430564071346471565062205787550515200, + 1675410245860224982816705470589931917246335293611547302214136419498617628844629793177600, + 18422521214854638403193085629833240670306647953722653900348597156577812088624017676697600, + 175172753282462167975745252192857431959437803598089344694282059272614011025106711609344000, + big [ + 449956882249290692208405870450320167441863231642255016936956882952586719349047495648870400, + 1], + big [ + 502555773215536564946005557833994807597605944571411676903755184508541388981582629018009600, + 10], + big [ + 849041987270818979470051161488502784399648394556972965275300562526644028807256494990950400, + 66], + big [ + 134717259043325369392106215739549259420747555198612183016517002228416226448874634896998400, + 375], + big [ + 781178160602345913182131760187725209213915382883167867899887642735485115900450206593843200, + 1860], + big [ + 9948213657194424458940900930765675620035427191278258645922427516808217276655355926937600, + 8175], + big [ + 32300251873631685610385008019760373693514580316766992288528085154654535386347998281728000, + 31858], + big [ + 754590578745190465262265990452501783013762796742331334600771756164652952661844659745587200, + 110242], + big [ + 417206125339417737500101496574993420605575536336962433355269640192965410606177251334553600, + 338955], + big [ + 387586070425676377760390047804812847433753224157353872612865563038992356072907561605529600, + 925952], + big [ + 414884374329177777938332374982101775624212205991141433035612523167451438748252618568499200, + 2245537], + big [ + 611659140103591678562054286751675731707646791068215268804952701082888644352268780437504000, + 4825612], + big [ + 744495659719158152338097650926619767979512677159595072312437742187948686797570412065587200, + 9164226], + big [ + 22258327265749520193077367317624046825828123998925205159743857155236475517360057142476800, + 15325919], + big [ + 97935876996582172442415731323262153066613084474478363360717565992966562990683204458905600, + 22478554], + big [ + 978479542584838899629944184047023400424445160648795476058689479610538470692393193780019200, + 28783530], + big [ + 834189407467400097216011893513555898601595825671750379539089584671737027373222346725785600, + 32016343], + big [ + 734959892392167130886156304120278799227426649302755708748639597970954816411819375276851200, + 30761219], + big [ + 183245879395217333739269362708286829775500888981793464112027113936744152219092039132774400, + 25363822], + big [ + 542224516568864277150585825681448142544101790583327151052187486000342090578704954136985600, + 17809646], + big [ + 459116365440143753353997638432414225143491907234275476332494835004576385718209026090598400, + 10550817], + big [ + 808227205141327465739447932063713212657034372499919283058338165037643828595214212136960000, + 5214971], + big [ + 567847555460160853770090841081526871150552443429868599905745536483857566985005867571609600, + 2123061], + big [ + 2748802487920565223421286843508813969716664662354373328105032621769167490129994134323200, + 702931], + big [ + 77475597859483765384600706971529608380035608592623588290379057144382422374353358710374400, + 188269], + big [ + 920567343053581381731256654031452863343667161217713466122518438451003294288355923486310400, + 41688], + big [ + 81834038217665075745389842680589293480961256638425521429308102157547908782729913486540800, + 8249], + big [ + 797393340717456232960345247351584488977220388761409340801378549489468213086705051657830400, + 1595], + big [ + 460223339814354594338100704445361906775298502116592986352322817741862445393144178540544000, + 281], + big [ + 194614785596489125637341642820289223421428206277714543371851291439877317469403506278400000, + 35], + big [ + 109902464083069004082703586435876066450776557700243536341770579847458226456974537523200000, + 2]] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 44 α = (258 + 37 * α - 2 * α ^ 2) / (86 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 44 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 44) (gg1 44) (gg2 44) 20)) α := + pev_wsum_eq_of_packed (gg0 44) (gg1 44) (gg2 44) 20 61 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 44) (gg1 44) (gg2 44) 20 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 44) (gg1 44) (gg2 44) 20 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 44) (gg1 44) (gg2 44) 3 (by simp) (by simp) (by simp) 20)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 44 α t ^ 20) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 44 * (3 + α)) ^ 20) := + integral_moment_packed 44 20 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 44 45 20 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 44 45 20 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 42 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `44 ≤ n ≤ 45`.** -/ +theorem finite_range {n : ℕ} (h0 : 44 ≤ n) (h1 : n ≤ 45) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (45 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 44) (n := n) (n₁ := 45) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch44To45 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree46To47.lean b/LeanPool/Sendov/FiniteRange/Degree46To47.lean new file mode 100644 index 0000000000..d9900f4333 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree46To47.lean @@ -0,0 +1,327 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 46 to 47 + +`Sendov.R_le_batch` bounds every `R n α` for `46 ≤ n ≤ 47` by the elementary part and +moment at `n₀ = 46` together with the prefactor at `n₁ = 47`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 44, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 46 47 21 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch46To47 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 9419588158802421600 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := + 8004502266586906910644135897387874769115493744091408742845553868496139316215205068801 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 102665115918565516421538151413897139856583124302503778358200580443993330487758622365319169, + 524115878970276448116274789738865126790045713828048628258551730355942587684705133037803723, + 211794587833696010577982746583901231847943048681831613998582205262082368440229871809427186, + 119834567349961932032841848125671831089892426475798550608623628441305470629995004957587646, + 983644872277441763986673834993201612649188028674813608820539058441064514459248771400340731, + 573158793029955587857533063263290511178769011397892121273362284167996190948873157311038236, + 179162984282139486420268356183379891779447391959867218850849961602299184305723034786145496, + 564034458835258715978497089097382816975401185825803752387885725821638992483556915519746390, + 821347208891460473654179981732469438254057318884834659468857923040611212178364640945958389, + 805888622312026416837015589531512381390212420827747298047738113302526601936620838501212043, + 20141930743174483386963509027978090694147973505662980667419115381570039982145183477206851, + 695881001036803147110823502614044778021722737592558957007249467400111085377847754054892000, + 112768576832127400253993546427669577934590319056029660535081643428404369606946155533317406, + 557621859007284353642579353039252664550708959526516680790763738012314000385479633091489000, + 601435092615946990971572326064185921331685456807606673273152374788692576108934656539468784, + 394222769320968276512022761766665816533371941971675901791558321887157246034937854471254874, + 186399688988756996494518216089029368474874597921324557523877587922186898235509429199347540, + 318061415282130117590116041654788940643281199667826428038280118245927478705527004860587901, + 385563444354109287634080195106240209610474120854573327662365331707936444573609652763553083, + 66095257738304601324874209804933878035269673519637041298595728272054433739649755131375398, + 766162989850439754558580439489490337760279744706115193741542610455825503197377540502050119, + 6173814520644156651909885772350619149698665944750034033354988057763460107600227523836807, + 948804399422296102418223817989910197209513680151915544017334713082359615710027417312265094, + 911866654823121079553603289440416961920085477306864482465308722146790577928386339617139996, + 728281410548625914676201340987369202313348743916064171924836645549187846485865116101351763, + 299050661263406746296258073420730450323475133232351565189166231893746770070199383320270746, + 552846005208546950280170908924794392776116124013154107937006858373792009853748221080990309, + 440592610529661428024690241151240995134934530902209853061716191445506214864701668398628982, + 149901531238698972751221526545439669463472803071794239403173498855703990614704431183527057, + 680916848547617963592955348091252862008547466509223819202353101352664950967609787687650135, + 805664823430168203617941230620667158680163026328067567699818773715419056639860000813531810, + 151572981856004688732759376574425230026359553555636204700353395199816148980421739038154745, + 221128703209004283352230382477882159900552789114803068080404950365687986729605625431937115, + 895892065348280289605721640101913328219645690776831025703232598902198328050430184770964330, + 281030372145836313076328326377904697008378179908369219182036839012582446327179386963504826, + 428960067973138261233966058935570561657390033384784945783390967211809741852877485039491, + 590063904416654842778506262602682401245726993853715990362627855585356197481925227154210021, + 648392655912399486014399273233418722656442245317146475774754723097236346049742676271046004, + 207923888692548103744381319630663759119104965553856094406580351939991731757788792182853743, + 697223574623022744780342379838869744721213724711341332358644859931972342846401999854465543, + 275623494742133422959338384750468375136488707785614088278171217972089961341746011011309123, + 469823128593782867455807419943732400401987591514793914139907358448155398504084379317010886, + 893057412893964740965352334533776512045882402546092252639365352181068916118209070449550391, + 66030464711919944879765187194390263545875928984372789421846040911769422185466952897690863, + 856340212109052943583242268884321532064359440414678703522700468961366306127251240478513945, + 269145682746700085169336134785947455531623586375854469477380188688723748500818294737045963, + 65190519061274357112963009806525643898991922279831796529278832717157357536035805967588074, + 281671285763895312635312050380587421080845331202565974083839222794326479376042587197446154, + 847433458866333347798233488073697401822518734874233691090959019994547778151148789336733810, + 418966934488460273987797693436564794031838854170025395566206384639112000860468935672555018, + 987053968406884846202942645707083955974994642505315223441627168023888282525289809706027968, + 389302076190719417296041056474800363750348903038709139629924020428126987923964847814304361, + 153191895164648693148205112271405441025296234039705249955352888860297004775092267730028589, + 478450960937236429400969359178410978656995135839682858635829910989060644463512829168058081, + 899293471759891145001639830787934479344730480089915983926695898479969726051321735229879948, + 866495242481410536979243220093230768430902757247556208190227641449624979722142962987687184, + 542879872883944872656953340173861780696223804312991802957362246568312402677304112721698201, + 442350004133117981481608054849250443696454336837507719530107053004293440704556970648164645, + 152049979687478211396908735665603948983037117466225557809922914848084539993232502884578153, + 173947960917927876804763546062721126436962836616950051888805571033773402864781892825745530, + 574113215496465141747925616852745584176477922345327839900057628584904415709809582964753005, + 5529675683] + +/-- The moment numerator at `n₀ = 46`, `k = 21`. -/ +def Nmomc : List ℤ := [ + 16516983512934610391847423833431135956724680000000000000000000000, + 129441227432802998187383144285951650297171896000000000000000000000, + 485426390615606421347865854625634740387325272000000000000000000000, + 1159245979117431372792765895879253123033182113600000000000000000000, + 1979083696923772431505285591326378142178320649760000000000000000000, + 2570519914867877924329496222299668259665380295494400000000000000000, + 2639310680395700360366002102933762267105131863047680000000000000000, + 2197490413574592390070691430134991356210427456744960000000000000000, + 1510083224344101530830242031762828711503088011126528000000000000000, + 867274594668937360443194811390002999193322643755468800000000000000, + 420030574453140194442567223016903158090837070101641216000000000000, + 172632333979196489833213132576491900830886816086604595200000000000, + 60475717696920747221746668747193930172399263533982310400000000000, + 18111088719422555142373705220772995717907129094427811840000000000, + 4646467063827947937672674250124412542082459797774761984000000000, + 1023201899510279784922266924400099792079542239675568619520000000, + 193978317039902504077191131698581928673777817372655878144000000, + 31859650009374932911472979205629276114643913668523458560000000, + 4603069737998020872570350023394432450261148255889721917440000, + 611555492178564781673098561172525176926667912627344113664000, + 91673601308467446828540119055766031896209770656250871152640, + 61039323590384794686343504389281543303497342978925430571008, + 3236022958130157275077503344670580556994479152594446974976, + 161503210550472247818550483481290286579109900271610757120, + 7230821721369562414545740625332404436911303243931320320, + 281889568943431886847247071419000319070698283519180800, + 9429215323885111464310549162178523629590885322194944, + 269049458770466159231070104630611451688595948044288, + 6537721830811047354460896653009845201098894213120, + 135267574787816921107916648715815907402417438720, + 2382851947168706680040504334566815017719562240, + 35709078496202658750028103112300178358403072, + 454295556348131461973960374557399847010304, + 4888251215549201568398291082857718743040, + 44226151872122850437473766372058071040, + 333566157342704621251872635580579840, + 2071741632440286111100666134921216, + 10412679585010384122770192596992, + 41293667520147699383465410560, + 124369997546451803842805760, + 267349158171025216634880, + 365411549239540973568, + 238655595878547456] + +/-- Bernstein coefficients of `17 ^ 44 * batchP 46 47 21 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + 26779949293411225946473467904383953281022458315365940800000000000000000000000, + 4531473984788643216170530876557612247583748720444676987200000000000000000000000, + 369883510907843777683268752894678683564936292439661059390400000000000000000000000, + 19398595457092752516207017132909674855493631995789938909903680000000000000000000000, + 734570320952367756816743517287074606770673975870564445808115296000000000000000000000, + 21398721596750679288407368485507389153270758997081576632667209562880000000000000000000, + 498937526605111528713204082424649935733576119384887044737778218568192000000000000000000, + 9565443113691662550793992168399343040547378682266700491528699431551488000000000000000000, + 153730433283688664084607853426099844339344111115532730007087632683951820800000000000000000, + big [ + 101204461090302555439865073782458009995012757240608644590645215164791951360000000000000000, + 2], + big [ + 695740042492948279563038412409632269189223071588785786239795706609628864102400000000000000, + 24], + big [ + 744922132347025462593475089287317073531357538536709126313778581317392267100160000000000000, + 251], + big [ + 1473186935211516684647779754417723590846207423956853323245754585552025559040000000000000, + 2241], + big [ + 637023974906674893857277835023573499613455270545037180101904489704624548323328000000000000, + 17515], + big [ + 618079088352988447568688560242634021063070938974531902021440099809338931288473600000000000, + 120726], + big [ + 160782878916867402581282113111762921944037901502329908521116217096925228874858496000000000, + 736359], + big [ + 41733640559286623113952640224174012739086462010055274730077786129111512861730406400000000, + 3985634], + big [ + 176272968680767467697759796347482412320848439866152903054335954946296290034515968000000000, + 19186064], + big [ + 946468119106928354768841762062064467793702725808833506717067574254538674592448249856000000, + 82281724], + big [ + 328945248730985407022122430195835342617555299449874751826781922023372834827580683059200000, + 314787425], + big [ + 33786604402075696013618564655786747068225506256739608740727744084344688992832091848704000, + 1075316228], + big [ + 11540859380378412936719247392788555176895022781206339771755709677738831907554227493273600, + 3281778911], + big [ + 277348667545010977046975990755885144948536249769646560445401871593170552223345133643366400, + 8949370808], + big [ + 103154536571159352154344794794811778406215602716871682183602525253989075443519106475622400, + 21796510585], + big [ + 559870538648309875263481185497821124395242653675291098194905878896120716834604553601024000, + 47356999111], + big [ + 70947390317628725515370444108398215190310145824002721977062699591205578384098092646400000, + 91610772057], + big [ + 104653702899170382779506885090670948119978395201656390124078014194334158776609800192000000, + 157373478442], + big [ + 553009188057024867619470040864367944980421118591781868065182792366128187064005427200000000, + 239299213465], + big [ + 768705270028523818339219615496158608906206650476617643377050756730830638833438556160000000, + 320899536491], + big [ + 551134469820725031431857051892478818496197885659039755342822157455984428458613145600000000, + 377937172584], + big [ + 293798089109895444476368804912761856967012423195996372872090929283900112504094720000000000, + 389125846620], + big [ + 552661002560771572812412944497396185154701676633637206326683550905081241115033600000000000, + 348426689455], + big [ + 41445411902919734960038145956519072316833207688724807200740964832202413858816000000000000, + 269682000318], + big [ + 107935455085440777619365691874524709612291680601786409878707764482353718943744000000000000, + 179138056602], + big [ + 20637019004980809802061314908416428262527048335972653916213736889465498992640000000000000, + 101238295267], + big [ + 78715724571403619814547361276932711822778139479784247527211868905684119552000000000000000, + 48164266155], + big [ + 652919681662538649625754763910003671105805565913389762180801922167260866560000000000000000, + 19044430828], + big [ + 546663200059524963307475937388544072184434730503151999560811862663463372800000000000000000, + 6166149185], + big [ + 212006450140361496079266639320782488770196869153758088237494213056864665600000000000000000, + 1610221873], + big [ + 743501737393931974361787870792551909800999674541977644962445589144216576000000000000000000, + 336216369], + big [ + 659609171882025001181803477077637858802717601260721435478863901092038400000000000000000000, + 57010746], + big [ + 470332028116684365062125805827548891568772419855220081621360676761312000000000000000000000, + 8342794], + big [ + 639648674322721694065920592120411197450722056148152321573219225060480000000000000000000000, + 1110335], + big [ + 741581482748530170239855278853941105588839952418416492804420867667840000000000000000000000, + 118339], + big [ + 967762135830522935218442147188282850816056038344330235351649835302400000000000000000000000, + 6700]] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 46 α = (270 + 39 * α - 2 * α ^ 2) / (90 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 46 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 46) (gg1 46) (gg2 46) 21)) α := + pev_wsum_eq_of_packed (gg0 46) (gg1 46) (gg2 46) 21 64 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 46) (gg1 46) (gg2 46) 21 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 46) (gg1 46) (gg2 46) 21 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 46) (gg1 46) (gg2 46) 3 (by simp) (by simp) (by simp) 21)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 46 α t ^ 21) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 46 * (3 + α)) ^ 21) := + integral_moment_packed 46 21 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 46 47 21 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 46 47 21 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 44 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `46 ≤ n ≤ 47`.** -/ +theorem finite_range {n : ℕ} (h0 : 46 ≤ n) (h1 : n ≤ 47) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (47 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 46) (n := n) (n₁ := 47) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch46To47 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree48To49.lean b/LeanPool/Sendov/FiniteRange/Degree48To49.lean new file mode 100644 index 0000000000..ce1c75f4cc --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree48To49.lean @@ -0,0 +1,351 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 48 to 49 + +`Sendov.R_le_batch` bounds every `R n α` for `48 ≤ n ≤ 49` by the elementary part and +moment at `n₀ = 48` together with the prefactor at `n₁ = 49`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 46, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 48 49 22 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch48To49 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 442720643463713815200 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := + big [ + 321115510607014153246618449084850699609261468625978019870644699379350975244444771968614401, + 1] + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 59253161141917743133909743839821865274436868691386666482483653489631016556407221515190273, + 147007829132282014165534072407835090208588687630770075650000422264246936139890415006280548, + 299824486363438727026641067600540248973320843176039807768469531936727763465396401939859648, + 918272512386411561045721810307418180301763298962980089935591548046638837290272412228701267, + 758945136762672517137864018395369406732416404101413912812493357917190331103216465974096328, + 421302378663539393608352211114085325288675978544450391246015062417333027611524548076916790, + 8302003393653293585348061931637770701987904420859143761709290240599248467392752962001607, + 105912751372701696963511404902029551201181688518409300169993872949826712645232934668027259, + 302247674697627625911302252033859891930162429487057513242357757062772182876002523495039931, + 126965596084953416995262050409337026359153795814963653116136312426199350885822202295855691, + 629625636277119714693443861822344376526462870551540527865568617620960407986561634737041100, + 632948335969661915193005510289825222115158598628177535405880966289265127591888950753062319, + 35632983606216108930796248876934343159708753693497256134791858704644948296361303736982201, + 785766789185063783310332907747236526895775536370981329549005113006171953362709621445227734, + 927088196030615260121412188449594141135578103370648466955066546491435190294171982851218155, + 55297166045611293379939546148904060896913308196760820819346047667873286319692048530173624, + 193283036461506858427137289759507117441220838899861058992683273334331744547915524867940669, + 586701728850975729064462033827030278888656993879802087091097687613635232257732688323557229, + 493932602489358405381140775179131971839313254252686957659203371784039636768401876186678156, + 616647660307453781155251326881259188245788685150501140274318649866668671994906242657896732, + 223531155843492559703106309294378112246468729146223917395276382853295579831479769022243308, + 967215772827199591841415984574032788297930625908869267751466597311144070929630073146682004, + 45826670800183366261678085015418170080490983063076556756838415455982665223859384146419423, + 176229493366956874063506831229220198550063179091449073984957676888005502853239255839534753, + 726994311784500872630169856180199999413785903428851406222762655211576595572783284739929743, + 857578738072847404122104828507698961058169046939048310090060335973710621659818879856933161, + 270484679550414371881529269752581269298862799919241088041304419061715997526937942539458741, + 953585977122673705663745846717742048309704049963956806041084156977128843086107497477779742, + 65008444426951897554522111448215129802559961641136762454338462842991134565902224127176839, + 404459456122212774496669219907894887344798939329246214727893243986551776698142094414639439, + 664617524167924886616689841934882420842319545871239590321965173300374912282421371998353712, + 995206689627525858437290180459208039348134507369325316766160370109047033206796057451961932, + 487611453288104261275651109222465138149179923220272268403908709704610971195764472766953473, + 242824765360772182628193870700560708716481066214441638574489018580899788959640608224258709, + 683733158569109008497493377529230599254307815685264385823141867061850851327039524807322645, + 492751850884608947182274368326666502399453818075731625616206426850385605773676427748390642, + 59272057304394841080057249734677371565020766266034586169866769503941394843495317985580989, + 569391863109446403273280619971156538347087014452837295356247952210151414908924507141602734, + 927532047057867609551787809834479578080434760283727442331848732225943537123605029612054575, + 423030629960750924211981573634374603275612897806607162443012992212840690754504646574008098, + 641533568620817075524646263902234375161461589895404385966033898863494172369039149090872179, + 57405108286929704086206178053652010445413414323233480774521909018528532578710592749702811, + 514693634995611516790129223263852519034983551438385184486139586299789539039554204055951146, + 326149854955635665970977405841540043768244221850012704634368281023633481063064935661783661, + 36931263128129085850597962053893356189858938862703022936624859270930661917507270878279522, + 755444771388026646106627757141976852489659878425180036225989793489694861746604484521303781, + 426274803919572276643001735649098063725033493493458487111059379738661847637723351793796913, + 346521145968464756327505267109833898097545127700122590995682224808816030281522489909114299, + 113080541689385226361148091570035718278770450902561209687482727373428546654862849608931047, + 424633460768115178185749858318240894885270806806643618752598833199713702485207098008462435, + 977449025315063715912854894177082531797267667636634597127508167383940081868689401302626379, + 701327968353560077038739446259565008852944819625159327345250570593037561197408373581159498, + 468462736106977535327060066760215757115157934910705243816716305230952301873281508306507255, + 605617327490812204319630376212633396166770545349017293167732635352784570708649502723560184, + 419763360419104146525482828641203224884156767185097400137547478563832403755865194233031572, + 320103980667908283541702217637351311137325529127047097311153546840455440804126879287904107, + 431206702338004643899947580280048994734438578107359281425685797021997544387156630680119855, + 773078072064046046826241258414031095456301365270842820098045757913773273680126262726995208, + 103942258624599495427257136511639183024590307163092959062734567247438898224913740516370, + 867926381569842910954405029138744488679677663833615984538319009926581919920459094501412237, + 347780853157114122174956975911982754169823871402610285807340571235342068680398348033942484, + 958729971956628516376604650161203828826408300942084521583336513042538940078676403461304208, + 147191959693777859241275991272035068305317422940405793131104222001014870858303975931304953, + 19365905860346933235008561389322565136686805523327189240328392529832527517397767646223857, + 422355459718500442851125658657187739281391370968917951523455487937950747979846951282297187, + 929754591508958316596056579952243135504164012984321186167959888582556810441970584552571048, + 243926695579349664359022550511742876932364944600669261863164121029854560513054675225281716, + 378306710547349654094589574054305238218556185762653904730283246678362710634222] + +/-- The moment numerator at `n₀ = 48`, `k = 22`. -/ +def Nmomc : List ℤ := [ + 457564124047019970822227354712188405308231791121126212360354807152640, + 3734924707090057456043548042999538871631929959192567417073059443507200, + 14614198929766478194987175833193291148633965504271697593953829676646400, + 36482648189792333044698548642375401552369770871600066230290014242078720, + 65240895577907678010051573002009348596495284177235401954843913145548800, + 88957833585776903498858996733746977220675103963160328228574813141073920, + 96118781201509606123477767434839070395124572038704759051559394030387200, + 84438207246021411634744928614486632717520291541555051425585503928320000, + 61397028208437085981356712620000948253111145984577536655458640341237760, + 37426926514361151114511657099696177039736952893943656801048744008089600, + 19303880746493490536932573041590007606992760385258213984138144637779968, + 8479680313979187919668661573521060226256855723677603576952885147074560, + 3186908028870543455451642809384865897020551360932953867102882333982720, + 1027848289220909689826642626565906125485920189252423047691797543256064, + 285025708197392969269463275023488308184831306530868788203192833802240, + 68041093287939119436687466841933925279811118618785352746400810532864, + 13999760555410767220136667491577020896549727175070557859333527306240, + 2488503075661704754770306144500937101565705713439326213429400698880, + 384296261565538981261663902662901943393276625751743808955389837312, + 52304156248661345067194962915842973789597531214655208307954810880, + 6550565610759161704065542795290659128943893513493918082268135424, + 930689492986868669487255012349161603366410464517152099994173440, + 633871092851156961316121729209580774924924445953143556454481920, + 32157671800045367693772325888154435065040015211368412371484672, + 1554725206173646440367641237649207490985757379657439683543040, + 68287019475671763517992417240911314112377920017105720180736, + 2639652761753108598251482609846404903035376379876626923520, + 88311239102801440489666704004892982763628532035789783040, + 2538600026942470096231441001880823968375673337369591808, + 62551258884990110667174280307090159778908568897454080, + 1320604056618580624797224676169084040426700580847616, + 23890849043111223451312002931446238037614474035200, + 370221796825348146595036953484433333919573606400, + 4908068735713555470797173653054148901766955008, + 55521374627175048036178591877550010909327360, + 533672734295056638538508000367255058644992, + 4331254771247122203560631819775393136640, + 29414786601357994525915799953499750400, + 165061949682043268546863368908046336, + 751866749658214674199369891184640, + 2709851569891021375035840397312, + 7436522532182913447215759360, + 14599515184878050711961600, + 18263159250538490494976, + 10938381477766758400] + +/-- Bernstein coefficients of `17 ^ 46 * batchP 48 49 22 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + 1007585181169341682356333128474373963339344484759900855581518642462614730687119360, + 178225139185766995393938660440002380187822733838482309041176119326895694544266854400, + 15231528491420428548919268323282790155867112698775042514838806258557443433432340234240, + 837779010926265167942626836971837765235157594349582050237117584826832940967530804019200, + 33330935525206605391699826319294479999121793494350540422156995677517394801529792149585920, + big [ + 22060235125345102509235418858576411968835445492100411039901673627753775026924116781301760, + 1], + big [ + 134896305423254720791942880703671778628673945758415145847135070591850183988153921883340800, + 25], + big [ + 327345607683893194945088404049769896963771968216937521668261176828937869610850365221109760, + 509], + big [ + 321673056972922640331231711338529089187845980120037123357981620564717042384294062011187200, + 8671], + big [ + 986563959495793601102143954739669653774388728312656830057196952857564205629724594934906880, + 125850], + big [ + 530997808523872235703425871745633434225015004657067249019784985482564200030232872189165568, + 1574570], + big [ + 978655712921609232613403045840725492972410353393764259331659758470641295015851103596052480, + 17131830], + big [ + 844255981070441256006727949339018063001537037298223881255731699662946726649786351434596352, + 163231640], + big [ + 401125473178146928006377149448489145272040026088933678396714648486859946033766210522316800, + 1369590725], + big [ + 756059988048358882428670776661099294371987025124286702381252814113756834599920142758445056, + 10165382168], + big [ + 939257057424923507703787942582375296753317216256305700745273025448780732107089582407811072, + 66987075500], + big [ + 167863604135634756380068567669794414439622017797185051671181605466114342802873291091476480, + 393077269908], + big [ + 508582985013707859602080185066753721540403785579078948585476860217505708538445861690015744, + 2058827264469], + big [ + 556058495565621235286529664887353101012539772167678800424205113300483827828834075704033280, + 9643695808648], + big [ + 237898458362539987976010307707367450506966767716633307420638926899047332776228818111168512, + 40457400651798], + big [ + 528292735632608557957360644074472280105165695105784788129313851459802101244308796943106048, + 152187733685400], + big [ + 882375866694347815785746185828902195765854386051648496074038277220861906653606302911037440, + 513747467411050], + big [ + 929945565929837255060635124862158856998913755251541181781555155971284562709746609201086464, + 1557182063821035], + big [ + 839520660443830301285546093659678194116431536087622720491265907653836049487687189276917760, + 4238709482687650], + big [ + 337099045323848169315169019332298507907867058025839904716409481033631294973879393066156032, + 10359363956766731], + big [ + 758339501230191270159569254129823714803975687908657284961122054752061244318416052844232704, + 22714845883546367], + big [ + 232816859917807577080731357281817582655053168254491959521876944291686541148162597448581120, + 44624921461490782], + big [ + 345833636426619006847152573925576789067561042958155772864591541305942722470912641254555648, + 78395032221591721], + big [ + 345952785393801279438630741320652016209320508578217605586450217675654262450687265147453440, + 122844466077862942], + big [ + 300586002314405074968535146665834330457503625326343021731037644262109820364878931122192384, + 171191616543968290], + big [ + 528881633736029338248260579221596984547130970263940530897568879196298955696772677233541120, + 211440309538900311], + big [ + 531355839637185622916921058796488859746683436207627097090787833130284681388878105369640960, + 230572212107823079], + big [ + 71039987673613209656949801900322552428527668135734975717107673976349458734255927401119744, + 221037933265240451], + big [ + 707575831514885044519737532810115123470783480030102898010125907016153647290025260645089280, + 185366021735609890], + big [ + 517282593767579555340677329335342273110547136773651922537967593284585875899600336712630272, + 135210712192758155], + big [ + 885048832461183736471215763358491302086659101478830641211357569487555988408288089928105984, + 85204142763943931], + big [ + 648930454702220120058630127206024071370551030600778880224808948265372855014964482497576960, + 46006583909503122], + big [ + 262581468163312713264526421416114036600672212734400167288784095189935449405723708099657728, + 21073580594151247], + big [ + 663383615236078058697996078413627436011899806012112065980156250833756693755907808302202880, + 8088367809268223], + big [ + 448196868166005063173586582318068459066472766259988052980666889361543542914576845367148544, + 2562228709739968], + big [ + 66551038094726782314865974349322814970554814903241220899862920819501033734882020537925632, + 657879082618248], + big [ + 847444723736967039407309593620309239384689225575576636368445677954080191530078284996935680, + 134203265093941], + big [ + 409008061849513251649659980065042949461291881797592983713981731756005534031658779737587712, + 21386811456139], + big [ + 756212816580371145993063818019004745963707210784684287250748127051678028488020488334868480, + 2661732233468], + big [ + 808356899015284663223612452319310314450822987840280428480234878142680480330012477511172096, + 266404683024], + big [ + 232307845236042432161284354174477424428457346398742741489606705314741225879541770738466816, + 21327516039], + big [ + 767014383067699857085421625000335725966129545794585754360702795674066542860850608881008640, + 1025827132]] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 48 α = (282 + 41 * α - 2 * α ^ 2) / (94 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 48 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 48) (gg1 48) (gg2 48) 22)) α := + pev_wsum_eq_of_packed (gg0 48) (gg1 48) (gg2 48) 22 67 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 48) (gg1 48) (gg2 48) 22 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 48) (gg1 48) (gg2 48) 22 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 48) (gg1 48) (gg2 48) 3 (by simp) (by simp) (by simp) 22)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 48 α t ^ 22) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 48 * (3 + α)) ^ 22) := + integral_moment_packed 48 22 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 48 49 22 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 48 49 22 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 46 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `48 ≤ n ≤ 49`.** -/ +theorem finite_range {n : ℕ} (h0 : 48 ≤ n) (h1 : n ≤ 49) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (49 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 48) (n := n) (n₁ := 49) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch48To49 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree5.lean b/LeanPool/Sendov/FiniteRange/Degree5.lean new file mode 100644 index 0000000000..c86212c21c --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree5.lean @@ -0,0 +1,119 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Moments +public import LeanPool.Sendov.FiniteRange.OddBound + +/-! +# The finite-range claim in degree five + +The lowest degree, where the exponent `(n-4)/2` is `0 + 1/2`, so `Sendov.R 5 α` involves +`√Q` itself. + +The informal plan treats this degree separately, on the ground that bound `(O)` — the +tangent line at `q = 1` — is too wasteful here, and proposes instead the chord bound +`Q(t) ≤ 1 - (1-B)t`, the resulting formula for `∫ t³ √(1-(1-B)t) dt` in half-integer powers +of `B`, and the substitution `α = 3r²/(1-r²)` needed to make that rational. + +None of this is necessary. The waste in `(O)` comes entirely from the tangent line being +taken at `q = 1`, whereas the values of `Q` that matter here are small; taking the tangent +at `q = w²` for a smaller rational `w` fixes it. With `w = 1/3`, `Sendov.integral_rpow_le` +gives `√Q ≤ 3Q/2 + 1/6` and hence + + `∫ t in 0..1, t³ √Q dt ≤ (3/2) (1/4 - 2c/5 + A/6) + 1/24`, + +which is already enough. So degree five uses exactly the same machinery as every other +odd degree, with only the parameter `w` changed, and no square roots survive. + +With `M 5 = 4`, `A 5 α = 1 - α/2` and `c 5 α = (12 - α - α²)/(4(3+α))`, the resulting upper +bound for `R 5 α` is `1 - P α / (96 (3+α)²)` with + + `P α = -9α⁴ - 123α³ + 596α² + 30α + 234`, + +which is positive up to `α = 3.912`, while feasibility gives `α ≤ 2` outright (this is the +one degree where `Sendov.alpha_le_half_M` is exactly the bound `A 5 α ≥ 0`). For +orientation: over the feasible range `α ≤ 1.678` the exact maximum of `R 5 α` is about +`0.716`, against `0.737` for this upper bound — whereas `w = 1` would give `1.063`, above +`1`, and would prove nothing. +-/ + +@[expose] public section + +namespace Sendov + +open MeasureTheory + +variable {α : ℝ} + +lemma M_five : M 5 = 4 := by norm_num [M] + +lemma A_five (α : ℝ) : A 5 α = 1 - α / 2 := by + rw [A, M] + push_cast + ring + +lemma c_five (α : ℝ) : c 5 α = 1 - α / 4 - α / (2 * (3 + α)) := by + rw [c, M] + push_cast + ring + +lemma c_five' (hα : 0 ≤ α) : c 5 α = (12 - α - α ^ 2) / (4 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c_five] + field_simp + ring + +/-- The odd-degree bound in degree five, with the tangent line taken at `q = 1/9`. -/ +lemma integral_five (hfeas : c 5 α ^ 2 ≤ A 5 α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 5 α t ^ ((((5 : ℕ) : ℝ) - 4) / 2)) + ≤ 3 / 2 * (1 / 4 - 2 * c 5 α / 5 + A 5 α / 6) + 1 / 24 := by + have hk : ((((5 : ℕ) : ℝ) - 4) / 2) = ((0 : ℕ) : ℝ) + 1 / 2 := by norm_num + refine (integral_rpow_le hfeas 0 hk (by norm_num : (0:ℝ) < 1/3)).trans (le_of_eq ?_) + have hfun : (fun t : ℝ => + t ^ 3 * (Q 5 α t ^ 0 * (Q 5 α t / (2 * (1/3)) + (1/3) / 2))) + = fun t : ℝ => (3 / 2 * 1 + 1 / 6) * t ^ 3 + (3 / 2 * (-2 * c 5 α)) * t ^ 4 + + (3 / 2 * A 5 α) * t ^ 5 + 0 * t ^ 6 + 0 * t ^ 7 := by + funext t + simp only [Q] + ring + rw [hfun, integral_poly7] + ring + +/-- The upper bound for `R 5 α` obtained from `Sendov.integral_five`. -/ +lemma R_five_le (hα : 0 ≤ α) (hfeas : c 5 α ^ 2 ≤ A 5 α) : + R 5 α ≤ 1 / 6 + 1 / (4 * (3 + α)) + 1 / 8 + 1 / (16 * (3 + α)) + + 60 * A 5 α ^ 2 / (4 * (3 + α)) + * (3 / 2 * (1 / 4 - 2 * c 5 α / 5 + A 5 α / 6) + 1 / 24) := by + have h := R_le_of_integral_le (n := 5) (by norm_num) hα (integral_five hfeas) + rw [M_five] at h + push_cast at h + exact h.trans (le_of_eq (by ring)) + +/-- **The finite-range claim in degree five.** -/ +theorem finite_range_five (hα : 0 ≤ α) (hfeas : c 5 α ^ 2 ≤ A 5 α) : R 5 α < 1 := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + have hle : α ≤ 2 := by + have h := alpha_le_half_M (n := 5) (by norm_num) hfeas + rw [M_five] at h + linarith + have hR := R_five_le hα hfeas + have hid : 1 / 6 + 1 / (4 * (3 + α)) + 1 / 8 + 1 / (16 * (3 + α)) + + 60 * A 5 α ^ 2 / (4 * (3 + α)) + * (3 / 2 * (1 / 4 - 2 * c 5 α / 5 + A 5 α / 6) + 1 / 24) + = 1 - (-9 * α ^ 4 - 123 * α ^ 3 + 596 * α ^ 2 + 30 * α + 234) / (96 * (3 + α) ^ 2) := by + rw [A_five, c_five' hα] + field_simp + ring + rw [hid] at hR + have hP : 0 < -9 * α ^ 4 - 123 * α ^ 3 + 596 * α ^ 2 + 30 * α + 234 := by + nlinarith [mul_nonneg (pow_nonneg hα 3) (sub_nonneg.2 hle), + mul_nonneg (pow_nonneg hα 2) (sub_nonneg.2 hle), sq_nonneg α, hα] + have : 0 < (-9 * α ^ 4 - 123 * α ^ 3 + 596 * α ^ 2 + 30 * α + 234) / (96 * (3 + α) ^ 2) := + div_pos hP (by positivity) + linarith + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree50To51.lean b/LeanPool/Sendov/FiniteRange/Degree50To51.lean new file mode 100644 index 0000000000..3909d84b43 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree50To51.lean @@ -0,0 +1,370 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 50 to 51 + +`Sendov.R_le_batch` bounds every `R n α` for `50 ≤ n ≤ 51` by the elementary part and +moment at `n₀ = 50` together with the prefactor at `n₁ = 51`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 48, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 50 51 23 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch50To51 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 3099044504245996706400 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := + big [ + 235006444834003773194078594346278954074399321062636764811967835770189517023966542377779201, + 33981] + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 185958699815346611664095910525304021898792398977963516654263395315095083075479920367894529, + 80510805097094345287902897876699384123590626339288496806501905574214850150429520434525815, + 385827995241988657281264996520544671414669025810823088269529925956094920556855671076330192, + 476140543060950652554230994839836823036110938929459467902823028297629075578937800771427780, + 554351912430705888770075816987818910754492935356097184153277608366723821056950737744232056, + 969678860777946203257231612802853797747022535677436977010640143221319175517905948799107318, + 431786041755599066973547701399306712092983728795844256444790103853827559641524735500266705, + 403244581470131719906782627230927565771101254964955145906357816369289278847253737149440136, + 494442705885088741826018913338574706419238150190522733139785817556957315043447859125039686, + 62668177809394801815137288443276029218801853920007550485952083905811528301335535092496433, + 283940074482734252703634779314592134215778920390626834568740088210010809080231598132059404, + 338999117507035671807610988160125018599291332206549084419398228247026078997741811014429088, + 180423391248163445326396588309286824139904845931225293445555200399529515638754154616441473, + 646367314230515862815304844758393629957466506845474662570139769260609420989970960490987304, + 181154201418905422326735860301800605239659565665671530367545694891495704450254958119200083, + 918862929773057418341020729536598749843002694330782441771528049320627642628282052189144548, + 776209315810467280971333197504881182614542187829432659490616650040815245969987894477380835, + 582534887767313402150397333237996143896578442315115449932299644009557585472128337529766221, + 370806289862962345970497478102611619826503132595620255972319153475926614967118802024465776, + 308070782209353587101893232926999755221731191526462896008251454351894335189767638630137742, + 598936912038649086268447727420688572038492357537728653394428285751663441923796348399308040, + 89173185541288425411967787191007153899715052164561438744114531112589060532554681701357717, + 686396138229631892845601385662675494074769557831878934591294482226694853985399504534232268, + 422742422709172912687920910183330522758332839051746538991302077324327479548437495269739762, + 786943508072511742731219290311399376122412098333247169973075937593024204086063579647005840, + 2324804169419582303546616360777038673256948234153986109614095056489339295595730377939781, + 906176645195875838105045051649681502930955534546185826854538640460818517229052303469886035, + 376625882481912667733130617603683817380087715448185260401251047580599892648625162702058068, + 340738166141566690208773452571470625590476245215088431047076635969261465502494368007678055, + 610204584384043697401211730586579503259533545801842338641459428899315503710665824141227131, + 188788303300256295256425115767955541280192665558813678195056103313459099093983132909942821, + 781019030898172957664052876014255120480724867526176453234442032837935277990645980149530998, + 360909182928908633727975323575995879213478682370577292360458870230219567634514678614166480, + 586576620552503036562770031088406898675850542380979113743968378276035071322275942366644558, + 556734859488473187917322118017057476024719121220234503206894698091533658106348009198812648, + 510853996885515664502661853432989566753476715289351282165720895214494232623241796821169969, + 287102844752900498274470408952013085159953749943456145312709191254056725880547528141232470, + 370392164057710978387373518369279306418660678231674871127256328196305637034822775368369918, + 833910359728975360649003035777864808653060863508101389845908721725898125201242200016521307, + 641241745288877873545218626956137837640464735786324452509957648086456857333349577704938768, + 224971015857654152078056507714708876198644226791271665436743014534924247486888142406369902, + 407374454002982319938433771454740116410475118289241537682160956382863295407138419286212696, + 855364725749356212276860855222925162841446970607089565408602841637979272180986148618882910, + 868686535349023166210311712325478945280830689047482882850108270508113637646424464087948047, + 185193389913898716854055028603990894032748692470290879136501334004641323395653594873618739, + 572231054162695386025424527215849149182117957455699370069705137466965346964462936759413287, + 650082874851282129533157693029176937932517009707988434590898059612534524918673081557302510, + 895646993508736753647319615595007421841528862576593897546069452347855875887308292260122123, + 231289797919437294773054502198375273684101185095364112779211382544410967550582247440330572, + 405664409963468543928735158185754566735184802192665702923499370156252930717837742539812564, + 306721145923620946173302571456152045827526467388536157734650562376824714961696044663042286, + 871202475803891546088496561576613951666733134063237022594227241958495037122038718286756945, + 558812187049530052964449695153265917254762355855496947219864343569504834325405735413600010, + 359826280913018812799512042627105357887407232349560946354642190967687458967112855342578886, + 614585623831587514103723885455545756613735611588177275819140856055262840902675717334517575, + 427249209415022935988159675657659886122981639849308946692463427279053171794427128350855768, + 652702076934679951051526031627827428942625859323049463635732894786877327141814111374198743, + 561000499682424600013679565615044297468739619199167256762095025847468628452356456257940271, + 521921213281742679028997484511471264300443422205855663150085302106966498093029407543430590, + 559504430390091663648466033536864496325012688770292424754739226394267356446361113054148053, + 188157648661408225714803965073820381122957527014978587795670447816632535641484090054471030, + 991300735902936968186689616534051404239531858819471872668355032153332461614936455672983376, + 379907481411517280565716700819835906466954375725416347578900819600293355752122538499829960, + 456906797451592587838152008790518470289087133957413414561439111300760073457410324649943602, + 839855378362035467143709710304453693805045324359978492146066992883229567856046608620110774, + 538413719574969790556993234795614345694436042038867984867274867507259405875052555738389539, + 911014652992209999286068672939651532418082127482015584330078321855972050879730026997598934, + 208753940262555280102215310232544724983782954970651431911244498071944878295202761855711306, + 315424534628630976485156843388343393747690293237429925839510211689519520549729606606598613, + 679079199944809340129738085664985084179707008679372819438677791270683320988761989291569783, + 316866992433551731803757296973270676463211568738244051089348879753349207273352335880574290, + 814735137880745040692205035722008323246635271221640053863138952713146894935268535296144365, + 103176502809006165439518791098891228424768085553271767778057462414147568355653807170039734, + 51672554840728288153124106729985591287222378364648642964526681870497186095228589559494224, + 1685591979928152828908493097043] + +/-- The moment numerator at `n₀ = 50`, `k = 23`. -/ +def Nmomc : List ℤ := [ + 1990043103810474308869354328134101900306088761137079698464621757252763648, + 16893555630306452730847859757576793985138082295034423351062862400382304256, + 68856340505912981086295984350475787100638337917154188403651629573105254400, + 179366953828727168837502363482442012928909994575168427696245277659590819840, + 335338356588723015051975287589305359662566111976483184503676769328892477440, + 479009750366922068421679120985197792581568271289337043463876356963422961664, + 543415314747944102155090537077836542038223688106646186960888717110996369408, + 502432545111995789135326069668884192779310641721633456894684342506267607040, + 385519381713019335335158056879092444912611260333679904580453804162416640000, + 248707685285026413906606422312961558904320114260020067547963612082596741120, + 136178701697093483844828409048519583931789480350374528086054929743994683392, + 63718636382402224133511228658977361075034815677346569514841111405537525760, + 25600333991255939634569300433386193329485859451088983072409810347088674816, + 8860191747790207461409578491950654049218910600997601608962879820895617024, + 2646766592746368503371744819443467756336699499155329557685310166644293632, + 683158961585335744394027838582383568482755116621332091026200384279412736, + 152438294595499818313911799512634249156198304528265810578484580042407936, + 29423844092645756111291993396002416529205475416685106902197040593240064, + 4921498213465860144676116101203120621287212525528703050817761313816576, + 716902924705346613942086303422402840543927614668437730802387111641088, + 92182317399528723523121917775588711373930904727940872224790733127680, + 10910290451313760940391680925934276613626784962907005712955378499584, + 1472097573396593376045933089494317704013169217746275118755656761344, + 1028211017415412488778045973378951762014092395250976701207948558336, + 49939531581715405741318983917374504472101144557250686944645480448, + 2337079554718058030903902388802085874755264412621374194689507328, + 100560152591660842181950316026487697441775995119873242863501312, + 3847943340758815853713010300697328786406792095928361362128896, + 128518747512561280491966675180970813077980219371696070590464, + 3714121210400595592135386883389147854750503042431898877952, + 92572804135474706580699094121224218989665240167839956992, + 1988487637745098830754769294189322214069733447650246656, + 36813306846329095300496855605369909365328854795681792, + 587367252521753312741292987229130225284869823397888, + 8071119470859777688132437920538942567787721129984, + 95352888174027566732346421501785341125856329728, + 965602046057029780953644899812074569267675136, + 8342700102001256125400595270287653056020480, + 61087058088592215178250349339948330516480, + 375546553825673830955163216465006428160, + 1913513847860841674259525461436530688, + 7936273364966532700583991831429120, + 26110260089898893694830970404864, + 65558773258586043048720859136, + 118009467444929236888977408, + 135618928954239503826944, + 74756024270908817408] + +/-- Bernstein coefficients of `17 ^ 48 * batchP 50 51 23 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + 5875775148995068931892351678973192510756316158718351593515599852303946004561920000000, + 1084402801702427360028252272531902791098887252490302772055404601252731894907776532480000, + 96835827207554362405164829530076610552061519853713426628675718751689827421634289257676800, + big [ + 573917785442428273771994974542334103942767537966930636878390232017459040650515244384256000, + 5], + big [ + 445850779819852600039921758923084884965915023508148567616155783461595551246253127892992000, + 232], + big [ + 73938133530155732033237040481310630287914983949141323363818263633645136904119757307904000, + 7484], + big [ + 832762642332663594232248677545972344622492407642889942242867554415340474793908770963456000, + 193602], + big [ + 844821744205871243750321649893352464583211940574797038463161315562213116599098505428992000, + 4134608], + big [ + 782387115960528542426173881874889823441471125004840619124530792640501224574008883675136000, + 74336445], + big [ + 929490149056571337064036746612016756882820057861853203009912792891399183442820529651712000, + 1141766379], + big [ + 617567864237336514395029286175557688297753355538523409789228970970235809352464270884864000, + 15151762378], + big [ + 302699147848488072581615714020156836246910786697590869646217668497950480344582744702976000, + 175272990109], + big [ + 158820134425677848887995766916957194216649463334412807538626179203593473749147954708480000, + 1779964021854], + big [ + 227988364957558139879224423912069277538535330876552188082405674383345045716631798205644800, + 15960136286498], + big [ + 349990311969367161644408169987358066576316108646025117659979932981894348444726254475673600, + 126943753910123], + big [ + 790076043184924856308109684828534313214250931231967452179516369168195169171551093470003200, + 899052045617757], + big [ + 155320997386318897960904769751254283691817822851121549333510272096548542420243591253196800, + 5687289423628058], + big [ + 307136022456070841142006267251224659850338826836522317533272195509567963923987699230310400, + 32216093908898233], + big [ + 93358759888068996082312801113343256799935927304122402321374172296394455103195489448755200, + 163749607627160405], + big [ + 748899366416650721042020730536078866644065476208556247840755801666684287746338067998310400, + 748074666843552749], + big [ + 530079250450361082822872701176520525405937493792306308005553428645825634612569405443276800, + 3075630427394755921], + big [ + 767668655475211211195345591244168021795006211030042647209338660482503639535340376765235200, + 11391590960597416618], + big [ + 683889710076433122236577112812029502843939494722115542049650507059514210652662245674188800, + 38037858702665915208], + big [ + 722588401354067448143217980665002283703054932616822070425540517687510656021821915974860800, + 114561948706525682840], + big [ + 115441774422695054583010632640916810815296833656700605090093856151837484991502419073433600, + 311281170377197475996], + big [ + 301126332013793654463094572821557010360051497610042314473450480203126502086450231849779200, + 762976051431065251524], + big [ + 421875559029777424973396117835461022584325872714516066752566597517569026700523648896204800, + 1686172783754801234704], + big [ + 960285793589876929734595370150631899410028831766568950585793601382559490371934466395340800, + 3356715850864492247857], + big [ + 866630520088701728877109094207028078940311493894700985497357576319130079994491812026777600, + 6010655715900608210538], + big [ + 235589372824694326374402284178180057259755815966214229505095037171984896209012523217715200, + 9662392497049347845272], + big [ + 439265243301238531879247952103448021055338319817315060184820034978157388423789539649126400, + 13911244017985195334714], + big [ + 625842300388170232085990608749549358791766343326307616398887243573157078205930673904025600, + 17887428705008492638791], + big [ + 211469153643385921785661664759234892340644169221767690691884664941991043308644703666176000, + 20475784568538948593032], + big [ + 424610155201919039392459851496598137241329701519969725846939278874787814137045599230361600, + 20790926403956939014486], + big [ + 2661142596049935568848160886320197293845651554935723441838794587158004231065591558963200, + 18649571977973323450405], + big [ + 784235681632359731709900076848909181973915945933838263073350478898080422713121114056294400, + 14709104239129723890685], + big [ + 345766047579095277405809132173946561661307387004518577545917675718104710447839590324633600, + 10144957046067209674833], + big [ + 448478537617720836240011660182818039461779678028205197623304051669640474607283453768499200, + 6079196777699082518716], + big [ + 735000187533687157417109835030149923217568733643035177459244309512288184830434379982438400, + 3140406195775032354972], + big [ + 198270412912436626305723596617230209125557827601035606482992484883053749409655078833356800, + 1385259450112886060095], + big [ + 509993209888581164414881591636063231699842088378679549910041371995601691408007626856857600, + 515662050727973185969], + big [ + 294815621206846827783479939125662981917058780850091855063781294799150491976358242444902400, + 159623156740388959709], + big [ + 705494885480272713784617890239423962817763039863208278259566051697831669636738642975129600, + 40335767980652156932], + big [ + 79210301979749132684640332057401729033217526889207908303401226891062181260673365626060800, + 8129932563867963492], + big [ + 849937479941553443337201388216992424728752315057412424863371066132083995460626722429337600, + 1270573433020721481], + big [ + 550760105563511709414201774643054569286668505269338196634391579025002534899647232815923200, + 149120362375999631], + big [ + 541796186631712813373586656159821478613573760397773291185609063143552018078370886372556800, + 12746564345371883], + big [ + 935803477082382725867509001931076259507208610019666009096270653026016692705371738865664000, + 766563512036945], + big [ + 636502788549367715596502588758912350405759192638950837073138224566539190978246973849600000, + 27254287330799]] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 50 α = (294 + 43 * α - 2 * α ^ 2) / (98 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 50 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 50) (gg1 50) (gg2 50) 23)) α := + pev_wsum_eq_of_packed (gg0 50) (gg1 50) (gg2 50) 23 70 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 50) (gg1 50) (gg2 50) 23 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 50) (gg1 50) (gg2 50) 23 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 50) (gg1 50) (gg2 50) 3 (by simp) (by simp) (by simp) 23)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 50 α t ^ 23) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 50 * (3 + α)) ^ 23) := + integral_moment_packed 50 23 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 50 51 23 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 50 51 23 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 48 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `50 ≤ n ≤ 51`.** -/ +theorem finite_range {n : ℕ} (h0 : 50 ≤ n) (h1 : n ≤ 51) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (51 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 50) (n := n) (n₁ := 51) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch50To51 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree52To53.lean b/LeanPool/Sendov/FiniteRange/Degree52To53.lean new file mode 100644 index 0000000000..264321f2a8 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree52To53.lean @@ -0,0 +1,386 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 52 to 53 + +`Sendov.R_le_batch` bounds every `R n α` for `52 ≤ n ≤ 53` by the elementary part and +moment at `n₀ = 52` together with the prefactor at `n₁ = 53`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 50, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 52 53 24 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch52To53 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 3099044504245996706400 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := + big [ + 684642060415729771769864343577763270582220283647240586940099429199735588347087604731084801, + 130400366] + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 728822450903805597341518325293855408677888464917551223241897809330012311098929480080556033, + 456020520094618489583890260645846600084925094086861942794683080934811694891643543766688728, + 885330154373572418661943853916972705528885543819549483174267253697667986018916418487623664, + 792035566980396498630328841052567534930638311713076745758998246744377706806114383869703969, + 962188427031609589367069337299286765119932934120456247295736288210194335127859252856948861, + 356768215272983779905274812356108746401236897464012287113292591927326999347938319390750228, + 994578841731861947945973652574917600258584022878572594348311960101735896917623873656357845, + 896070011248383411978092293132328307756351749504572748855830669861641859046637709396573451, + 250536785847886558147123680724725426780238539030929772984415745985470924843562070966748870, + 338245410934146854052972430445353892773148795450422600283448807832706182479532134562751124, + 201760399890351964881510845293727458719315135294700466623886828750062403664391359989420710, + 110811247598250535270649783004547458718802757471971052254460846592724525908134197791134590, + 568802666400887259914467691216893959498530517161702815922904368252570369825436648320792392, + 175099746480902488249585185801631736585577368676643606324247968311117335391342311680920951, + 105861367848590939385203266606827982701901877718732953284812362199679371753771398908349294, + 254769572076065160635533839446183921270275618530839617174216030000668876103566419490809561, + 534643131519719801624073629294365004176866761922429164214289855435336865942588982976884308, + 308594804749535892088263940402357510299020821739630531675139525665169137306163041050932051, + 412332927521999546153780695190480982596070492439088426976058238791192665871287266628111936, + 504170437949250838300508782552101756715871871922796834151500976542243150858827878162516181, + 378127990940327268613864337481161559585669549984078944399066427593072642856268311701841994, + 264143567199748765775094500454940876868946494628281001793074035689884658085489584498324829, + 508880200572642755690178979279871762587935306727723789162093880329945380314258379505936076, + 643086122273477787984935344018140727864437346542894929228588455105586196649522524297362940, + 751960178651113849898928120935869618712430884772070774232207067036835966083484800199621713, + 339705951274578337976142490266363589903501641512277996572144622180131796197720581049947481, + 379796067919679856750739099601192441920508421967679274704078396898804955411067943813526100, + 588715292309685927994645053593865857072941427338521164442600316705272764409209609092348820, + 314553225136747235478548362699010097006841972782937285311214666409745439746249149578420964, + 540508774866999130659719315138215111083160902824633382693497664456112963616243207365056366, + 554217036663500899177602875500789894813804034223517029970430811091399589764482845318336555, + 171985171771307150311346377992236945273178627155284477066966258834531710564928069659208026, + 32909466016624727952745994425797248829368103594172506584106146406673285642954181294577479, + 310953789150754713664861180130208985260922826766723300936978927335179853517048287539483307, + 131300269204783098164682482051445708463738950685675674654239361900278095616782880282518219, + 144781050120970606348861446484583812570926101650970238867251138288136007471066702177636972, + 484642064103425751392855912952151884654876053182883013922384969673128190515011987533187864, + 64697945103219496101518622909048111177157412798967010336647822329494865115617828248978986, + 549726507025648701659408407927139074988615305292710843068212900462529858839533637099431853, + 106394135678556373456536501800228877145310817830350689298915820322639120030417670340779868, + 919653104619960342358980924960556813350471434411422450176820240311686217413513670231769761, + 576387026552723822459123444268196373870025176584505431481761760169932010394198647616332944, + 541986456758126194598058922879856716220321590051475161847614330048685736747615403422072999, + 711691085500481131890742323119893540700758420569920755923845458599789286116003857668903013, + 659901742510651112629924389680970145066864125585973126869947861187690732461133611755280478, + 655347116650219019744279800528370673651143858861383131820349852470972738302730810579750032, + 290669876617019770735173730642821242388078871273718842135776373687643759689580839690719153, + 118941450306946621703411659957933319166767175714366341767774410940992473426397189424736730, + 725369864631255490823448701835243587500984157661504109140818428981434101210430649110510836, + 226180353692688399226373154018655208655149026423748194741197432934841837225757757759935827, + 954722683945491939363949080230261776460553604696011463578485622733152569818776118856832757, + 602903397547203351301366679512769415414843255101994390698354075546996642453277194336393038, + 295435858497539098407723535641652322643508208779169693554619078623177074323631088637782300, + 577209061546724091530119029938973513890220907055737866989957703779087525851977607450815198, + 133542673340223060122646634482292383625536275641620576148614771859938604879808056840369978, + 530664669781541191430062654025954365548387004306807963643809646916939242645983944777613709, + 324214419000355028791783524417117887819938357241923180544817180750475786059649767881523466, + 636032755162281850570324190395421283354145255946266218471628534780605191141070988325159948, + 654198160472522782329504203656677948859084762399126621690592999858881630435371363689535838, + 290565339351122520978167167321555339218556473663573160213702017155033660878043246847264273, + 571151730247103572074826719851612633229684743761200367314455620220326204962300102552053261, + 872273673365254886625254252214656516507831054109495828004323595281073611827936339491406471, + 395635691431503549052081219667629107381103768506166061519353218565391831182123903375016647, + 751611376796612761448249921959043845934417498890204286663633395869218586233679369295932850, + 456822098771810156567985785780618806155908385440631896460847477886132306271822735630399, + 655586228457636279970291534253831457468455357680981296165140595049812070771080739517138581, + 670948209622074312651723561691872145721678388696654994999846869337248548469574808773759794, + 986014151225312178733994622990807823993182930101671721687979998153247618151947778961907386, + 973910033070641151177011095072502290698483225085378161989671471279961969235162040709850552, + 776482491637796174028270103768709236146438183642042517913287419192816410568716677666659030, + 667163001815012764901071839014804361012773232355105659237958236951551196994035886278657027, + 515185033439097430524979286354270154347156096905450954961193931204706210949623567759329755, + 63136879970141705744003545370749574877442445712292906457145348316360390441225453865046396, + 744442714276085862784352124830173805558393345663909605079224114869301074144569797808172581, + 68403233773132506174605174572922442706497748459012797321274075716989034411260915645321280, + 597487060972473504440590838376930042303949342468214647794041817847660928034827133308695045, + 179386365482158870879522558105220301711827891543520852553858404987663208683930057350928942, + 885996778903517687620330371798273078855698249245482003453096707472844758789889527665161927, + 829405081981388802713131602141440371983184798119795744753538490516291726631005877695528172, + 141711788481924059693871465099403019555911499935316390448429173186770232401422318390639302, + 1094975297279786085100996379146108965359] + +/-- The moment numerator at `n₀ = 52`, `k = 24`. -/ +def Nmomc : List ℤ := [ + 1300030959398198507985883016110340656296766196780910159013439479997830004736, + 11461098971215156808826733373568510116338449424436459524518983350569104572416, + 48586505844658724662773488230843495355974122882507455089755298849581850165248, + 131851284745648474200630944083689114216335184010246343578314078035839599771648, + 257250214204464305777762877844633173114435328941546199909431929811129021235200, + 384211862989308703590904823617086884013485688095513561970711388408830574460928, + 456673045962150308704565358480728998639489201836806351538565414254853226496000, + 443372725593516537102042659130054660243531597723850013317812772841135775154176, + 358105730568357947038515067271686188312550010285238632999369489596006627540992, + 243824915070380505174340505426439746559628409235206502878728636181560342609920, + 141310238303492704273062936721242427242642779747951911104573592974188812959744, + 70204720223961897902988731483429686696923971797160106398986026837338870513664, + 30050473389635209600885889374280160905998171033266241125805446052971301306368, + 11120653200394757658216568240986654590869682412572368161403084632770180284416, + 3565695620296465719443256009803730932899934593966874669535022949555710722048, + 991712465732715041831709180047553904320745354610787472228376224773848432640, + 239339958802045322829563913263327621582892471460596956874949957461611642880, + 50120306119022562093524614103631608435440732551165164730422412807059275776, + 9108060256769575752687647886330898463875720148949409914154867287090266112, + 1438125818869523132950284350800906701036112805486912075962865065666805760, + 198177744571306110927525823805487783161731783697425661030582142432706560, + 24138085976405618087092863720014927152006036564075435913671823956377600, + 2706111911790883416186804990709202793249764874606919915203999031099392, + 347386287414610676348612390522229154578985000328483822121814063054848, + 249389476566339435079029752112491647361170120200440203718101749989376, + 11602917420373450188471618639936793080099057514620079464584772059136, + 525270410085774615958405948133651434997851502940925783609851248640, + 22113026516284311002632521246117476078191582182170833925418516480, + 836328872476552349405934661535799732405512556536935251110264832, + 27838784652524513095946028094979261164742798002285646413037568, + 807303917868611217283006574719811979107960397466434678030336, + 20310374244793105361105835985671203027830629901466125467648, + 442757421627840872908462476602302417383631070172442263552, + 8363031691089499300214004091559294721809616289778368512, + 136887703782550804325821625122315421341092637801709568, + 1941064018952496463359517437337132960203133069295616, + 23819076371148407627979067964748941327069488349184, + 252406766439055281806055739794067673922328854528, + 2301890756962624077301451467168689437703929856, + 17976127927603723737403692013425962923327488, + 119365859682489978526689071819920565600256, + 667489277360258601527353372312659296256, + 3102086011049187418157312796983820288, + 11764392353520152213474533982601216, + 35472516619070159340279831724032, + 81800371885591824572570664960, + 135496498205711844381818880, + 143547803202701506904064, + 73064711504598663168] + +/-- Bernstein coefficients of `17 ^ 50 * batchP 52 53 24 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + 5086289780154589858665018597715697548922857972544593222943384295277832970755473888247808, + 977715868641318731881613401798884075949466688305880382754088145580704371018050321717919744, + big [ + 59474232564196738765494022724858450149310633960130172935463289465837720045652421734563840, + 91], + big [ + 296365951643959714040591216915844836860263184848585551087920270367396367929513842183241728, + 5474], + big [ + 931084736063277149436120159723073465802029926477413437694975703705174448083787229301833728, + 238787], + big [ + 181399112707765995512549913830053575469515648545197383942836359732049494614714194950356992, + 8054341], + big [ + 972487675029928079049019675625206834487235838906601551322162681378987264224015450042793984, + 218635120], + big [ + 592157327505092847720420204679321999670353083406795348431584779369457978344697045889056768, + 4908085531], + big [ + 845613212209125452565746355095916438375346264347253768903936755084448479309642601267724288, + 92927122942], + big [ + 263818938076156829238277052701296040962316809810551715280965280020541656723226991823683584, + 1505971750190], + big [ + 759970737409806019672205733039249522128919411170507971229450973612734693088859050355982336, + 21129138994492], + big [ + 824146602571433647482818126715844101172649197830480456950484376581168815094273268800028672, + 258963880902215], + big [ + 888386502804247575622364081821999167537428996687264884374124616111666591600106790665060352, + 2792644126752656], + big [ + 264021531848632242415866525340549964262854618160457171232311061635221633178346285841776640, + 26652974351471604], + big [ + 800970523895393440184127437306656659513704506955420451457344419183491803913742015688343552, + 226204501334958113], + big [ + 978776640639865555805372250709761061413771447442480078858004200480445586795422027857526784, + 1713897093630745119], + big [ + 41021193788654651848754890290561037045861847388537878628722911592446177777759319660429312, + 11630513234983043065], + big [ + 420750940622801705866707826707841915789310007977710418070965814330691322028133831359332352, + 70876040250483273342], + big [ + 319910273935696985481500045111704411099625629875540331742928721245325780990580490156113920, + 388719382677878638406], + big [ + 232286992534331282171105127260861480675597214441552023272191566144556685568269422182793216, + 1922139491833436815860], + big [ + 428772318309639106791123317291894625286899532508178416881400774351859213579730740819525632, + 8581687724972612370523], + big [ + 670356080937295870222364973674615316317596431516042366581962714983781248558419181180026880, + 34633647744261835835244], + big [ + 434473844090189852542022096555796451413606881500754832175218050732562124115259097645842432, + 126458314426419734141811], + big [ + 601650822808641374149169019892307274849003526599015146990647065589755860737111457181728768, + 418028001837320019510955], + big [ + 766227455087649917054193873177989364520412571279061996911604359686500220625784255776030720, + 1251594637331085774210660], + big [ + 720675189764322321581390530773794600765342658040360063729957785928112601031512275315326976, + 3394835736283500861534103], + big [ + 290144013707325332647909849432900565818117837602025393042024678627056876746521188197466112, + 8341797013146802889631269], + big [ + 209712976825405319560892505252519684817208832199422269583133596158188743520609362411257856, + 18562923013347295826747985], + big [ + 925519152609042396154582357368095588087198975050770910734974076873168231105045674248372224, + 37384009719505180654019112], + big [ + 631573244438254903508870548672978081279774535293805555153220980978270549442064574985535488, + 68063254447055947402461861], + big [ + 747045777729265884910108071664437490813407374026095443069191254362172671640532770344665088, + 111861462353564669001962065], + big [ + 723954310396580129914569434277202602023358803207399013850748992883720785057754361901350912, + 165639564062872761933229818], + big [ + 72386313833350291368192334972277456766094669443571886888643670460039813254167575733993472, + 220479235133670224097220562], + big [ + 776909593546662015300793022111678007247750980902768986579542255303418652487048350853496832, + 263106786974075424681067987], + big [ + 636278554310917425701823404169151651980217275200778410274772785558542879135688251030896640, + 280629650279493253492346392], + big [ + 433921694653712512789184321079428442573965588976388389655603970813107563888741973395243008, + 266606317027516219764711790], + big [ + 211807865223664904707990053418038653450523104342731910371238586211057238950642690648178688, + 224715282637228614688550601], + big [ + 961147963137154801733572694195893762479696083090424021769763664703323200061023385890586624, + 167283522508372753315654368], + big [ + 211381071011663278817465861591821524801263314986122426338722856174961160218359106709225472, + 109405518313037295061513664], + big [ + 535826183532077583758520440509943169336878938506237009120029654462342433304759905550336000, + 62471005091155614983167481], + big [ + 768467338666635500959419585758292805163183474308184417639711889782018033293190758685212672, + 30911128552974807764837822], + big [ + 688997795720492357173671481145142091976677049519533918096324888439076337578623589232410624, + 13133550389587251353197761], + big [ + 6520580461717917778340654045497485545653563649933258274827657297229734609333933655982080, + 4737814172282176086242986], + big [ + 871032954001150753391278504181885007948658589402671310144102792128910509569894181391826944, + 1430704587411033664383874], + big [ + 98456026612150359576902202377989310895019703963791445311964059096155632587919689049440256, + 355179986019998028623332], + big [ + 326148345225184636688050297052960371990431821520064267635938994772570007298124930279800832, + 70807082315402555822375], + big [ + 427700493714401412379586973848374820358506548615595280784226256803982730020946716833873920, + 10988059574489663536541], + big [ + 932239243041114294198954653833647163572676611087904587532955045180276315588175998356553728, + 1272479489595229622846], + big [ + 517363527328754735167101351995173010074930499220411541132370665501762449528905257420062720, + 103629677938100259810], + big [ + 688257122618528691040445188873728309853116154358797117457619959891489516457893778423808000, + 5408528334805917812], + big [ + 428000789057357774149020735976082603468277868348462645244836012996759358717414909306470400, + 145363136646119116]] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 52 α = (306 + 45 * α - 2 * α ^ 2) / (102 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 52 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 52) (gg1 52) (gg2 52) 24)) α := + pev_wsum_eq_of_packed (gg0 52) (gg1 52) (gg2 52) 24 73 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 52) (gg1 52) (gg2 52) 24 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 52) (gg1 52) (gg2 52) 24 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 52) (gg1 52) (gg2 52) 3 (by simp) (by simp) (by simp) 24)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 52 α t ^ 24) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 52 * (3 + α)) ^ 24) := + integral_moment_packed 52 24 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 52 53 24 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 52 53 24 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 50 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `52 ≤ n ≤ 53`.** -/ +theorem finite_range {n : ℕ} (h0 : 52 ≤ n) (h1 : n ≤ 53) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (53 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 52) (n := n) (n₁ := 53) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch52To53 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree54To55.lean b/LeanPool/Sendov/FiniteRange/Degree54To55.lean new file mode 100644 index 0000000000..421f163c02 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree54To55.lean @@ -0,0 +1,406 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 54 to 55 + +`Sendov.R_le_batch` bounds every `R n α` for `54 ≤ n ≤ 55` by the elementary part and +moment at `n₀ = 54` together with the prefactor at `n₁ = 55`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 52, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 54 55 25 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch54To55 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 164249358725037825439200 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := + big [ + 274093918016051770909056602774105259065139354359395831971189538781052985361357499636121601, + 27647246130875] + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 670186382845523785142111066845487894817533023606437921373510564771359484213330650278658049, + 556506445231129439382821465435741534155264479870655303426535646913363044884710316621365766, + 132731792611289491762311344339440980021292461842736840760862070603054772187028907358183955, + 241186483603990809292204041445668125048219761729385553862524540286520586872860903458279844, + 189336210706320336968024108812891208401415593715376502743582229315063128155139046673406623, + 731906580403439466071270416363914143995507211949972901775033886493816372378469282208440302, + 218104725170571674943756440341059030125225662395686742056394892945791807261151705183193650, + 493461609223706032093919310675621432124964030096669532141158531425321210493234137588776874, + 594545493766769315913219568024757995489531800035231552963073696763423131892155737200046800, + 522071263416938555019058886593632750804177034367905265703671938373760567902864533417579828, + 40832693344447001236271051547319855422143786072504916198023246762482596833178683394906391, + 523531211006763106482935992184495690957159213573502719483132233389083407139467087714718616, + 577766927376871814429003243085473971716803022023854789458955325017608731568437940096620219, + 309640664305272986178803751766191722547425369175403722091171892096770133053437662002712944, + 168969885834050601909380312388174351388574459984894517460714758586904741619863872885277249, + 443482091414551682082466386814739805227941493741470942929074427228178591090556886036208761, + 53629422587915971258498688213149274293585415087621781181947514858291886501956555990208239, + 796395647821679385208126880835589716937756640480178485445600201725524115152348792024904428, + 217297678760194549434644588327335023510939570558945922267847318265126848420184231965890353, + 370699933632547406667613516949469833962958425172039174015142411886648617956878384828155948, + 288624637155091223133850297886596076799202107126783574659757384499862615833993910303999989, + 476256330988585588674079245655666971001054803070959268165430646231845739690074779355669978, + 374489167457400863860536599974215014938152473950143921278697596060801333572316370284370378, + 844301470812968708045986914703520668365886070340366336612784540711806993842641153543320598, + 471477395099313186918741774277841678760400766143347779979240776355005218457325581502854615, + 616357458006514193756760689161437628382558591936376003478094167680213426418981564736588848, + 236820746864488544890454527740972331367454710455296840000518012458542024443172838675752756, + 771566278161719723878829406555295737208357631107235539548735750824092008316815650103839832, + 768003266583787865180877844938134832975897364415436540057748816519056745490682833470461881, + 545359222101091132968135243948432887462800277613659951344521537730880497265020151920051884, + 435839076519406335977698852728897863424137648729399220175160659708304855295420548537037880, + 209762697595888975428520915329962740883034039081350155128599802831921073491548306890360171, + 191565217240011410541974101813434127737258006023855260985034915203868428593043809370458140, + 196227829726829600539763849443229847687126230368650741763303977850718101426158080177681662, + 985518668922914311108832035237808138790705518821887254676279486356368469874691770885732948, + 389740531964624748923115012736116327435314402772515947126414777339307426185741551244860540, + 360638478258895863019028524383650360797046334253356406110449973727380641361529311517604792, + 311134954354781422918599127692791910118179210009269000153845806476839769854223634714478075, + 310467542508636273142297108111496047714512250509983196526911052042623684851158528139182473, + 42374938186999369686867667178265874245936162755878280539822644757919077526221714717265333, + 315131513774634137569398586171850088429116326046564498549457761083333034363557009556098911, + 220138360208106116257207735969452007288327269258793031235130755513799358118466062607030676, + 100938165970195239545044148382036373746528933278248191368167110496377081535402852457710233, + 239624907262980975728273948830670280098284866347361553697977373978527753142178132189380820, + 550100435115329165301107871583874840924594758447268339055773490253256850322701535987562291, + 82087307415981674674813766280101406177383199982445847933295320263421886626489840850274302, + 171760290180678827343530699333480107027464055263588973101037998064921056223384171643700873, + 115683320393340952942533728307898539689142776318482611977811587585707350558843996864434284, + 849258885559742917496710210751029114359600385848270602094124006923387587644569838302342653, + 737894026187880658561995255818704749682077166785067124419730360743400198372003115821689120, + 762112795322647512141717429826969024667475210147389148009031346591760721435755934765223826, + 99765242443992756809790047284089507712356884714954058703116900188695856208536120310243199, + 69007571659406652045697493063175917078948833199012463942247002019708606074225475530970723, + 250868467202353489534646104453070447790928455119672182224661160531926627663091896470784761, + 566506921414811902763837914931931398896122603442503451042692230059110492132438508861503747, + 637432475677775362318425806135507475915598688052900558726633353881343150479603061094844794, + 16736801162426513411049957157384963639101561800710575258344680315654791014787648295914581, + 350105304833353986972035452442218429360920945174930861398005873953001794433103252868645626, + 530082756070494744873516781726448916280462254510815239808848472763422651667527703196300259, + 80757075658344100128864242968114781149889879363013462463661361700956680066750474068273258, + 801064657086638654006830261653541262838064023654321420425597080393014478031413037770511349, + 439613431598192900003091680136698328554234570878062305164529056502413148200007364952709667, + 147866428099140981030780367179110990840996489794379794180464484350391131286990301709727617, + 743261386925289975685181060880087960119746186660188454696304858930122600939740483006657937, + 505864475734891799687406497888826768392371871530048456940182578755975306078580654562923182, + 458752173438916510228713496926302285167455149127606195168180735545498405228622086566876291, + 495384863651771991690239326864894870954786559362658259109581735107883807737113699475957437, + 702956959477441823169088115096767569774354573451174171877064746012498690454001530809031513, + 848194136157414213855916408970846045323352974397740471464002861218053776050990741546309144, + 58793733303978010508757391763594795551677581460926740716018603576693135706783516252593482, + 548250320150575342470998998132878512613280726922521318854133000729677449698888610844467041, + 129622500835267248266052199349158412226558989198530773862488059085858337391757750577332350, + 287519877693154753467408821050808475260662309520882766003029060916434238874266983600437770, + 13966602336411510711035046020432203875916010540619722084205551459967133948011302274394315, + 259791659978163399481151250073769243062796244601709245448237300090419129048384889226167569, + 250791790651385408346320721506088774087329880837301724513846456199472957593696968408822018, + 234137302937063048577695878373261277489973545420548017515390162484371171099747923038495754, + 955205644697246900315440530013536070780858889559378765568024137132659608801251487968602691, + 738195389008286758028649010910791649919532463130378727963270307456768640767826395578232443, + 196632678194853532410597026324089471201981743072144282669198252791008593885185618510046347, + 482338613425062710985549460218627728857205235639681272799169725504662484963965108527026249, + 391406083068379606265086825688013161078739209601498589304597474971426701867755342153666621, + 753705686701348435519546436854571074178398891178757484310704760487604792863718900927947379, + 879125244401191575922873802904881690386705538095656402280256208639469882401660815870341497, + 480915608244217293288733115997343206386292022520677847337748257446830566443353940065578376, + 415808806479997887590011665720809262909012885087181687614023006031924508954049383302375313, + 20472101548391745841694444275043114605399196423510697807106558779320399577692152254276198, + 139999745399752066718764343716864212357408893649895222491013856759743746337738262650933973, + 6190004864449445543989] + +/-- The moment numerator at `n₀ = 54`, `k = 25`. -/ +def Nmomc : List ℤ := [ + 47216064286736971239763224212710479928976564648729245329540618229602201265766400, + 431720032292938213349635836637255353446348804502827011877869980852544219172044800, + 1900815588546424023703752507960914539132448538119713371192029486296978477075660800, + 5365521537182416522114293886003923399743827305359392279373109335288020240800153600, + 10906686015840381101690759606630378592378767800888257325733870756053329847831756800, + 17001236936197173287602189144510364643446044582506256244706347022719568011958681600, + 21130717706482955452095093576026263417210337986468192121234646800069069142333849600, + 21496789111861971344867062532556279345558792775561097007827078654907158734936473600, + 18234174108585928606878673430940468041899036311297090831177976358057535196259942400, + 13070239184391811876536770816264532946835738996817762700949135547433947355938816000, + 7995847503488125804013431285388900892442854609638430559177370384774199646145740800, + 4205327285953484197066287520738214374377970018239909489080883865630666688928153600, + 1911584498811526626358948616856209938380252053983531412062319005264622739102105600, + 753804774463391715492888339019024534633238857571731115334588349160973309837312000, + 258489891761074576281015783991647415782483509993981789469587403753334893025689600, + 77183855271426628048509620236967240319626104682737375727109940837179960852480000, + 20077300059689936108299831216855511280044885988654602608427125917442261175500800, + 4548780378740603017774143601029330555898144394195744960295969531707489098137600, + 897151749391402537128828959992088680186216844444514181541987837033664479232000, + 153982998790714166215265590440858829080046349470443078666841509135190799155200, + 23018250441638021790162386213399933704694433760837239464419664149808047718400, + 3008636899530983093080025871505924280431169939940212299883005641639749222400, + 347958025325176589761943191229300535852659518882550852066728864567944806400, + 37030585591464732377158391856939140467341526681442810096151428677081497600, + 4530365389620290795692328613666464889009656646914720098503481289500262400, + 3349272754293667615749785027273262995754133095409040474745864609752678400, + 149368771348369881660250466737426651082380168326431323865167589434982400, + 6538116109295484400203225709234302620320046478067354733781015802675200, + 268984648566692647807663562066487288726024765035811696144814178304000, + 10040657320603332054753518371591953691998450561050677572091772928000, + 332579253111600734915804084817860584862713961462628860846250393600, + 9661461557129669613126965232358991009541438235108717748237107200, + 244877968461413049747902102202462013358886332884688908478054400, + 5405670258851122621695467989393898915374157702810515066060800, + 103904901445057546847868606332664709927666706000941940736000, + 1739349206145333786681215515484430271115965760253041049600, + 25356672697289235904473177187966327573800282320220979200, + 321731127153608277359179142431692770933078317491814400, + 3547876065211157693347560327804763784564708265164800, + 33918880763622328792209926566666133311354778419200, + 280077601857562659116729323119537705741765836800, + 1986828966932676948586850380910581993648947200, + 12020073648262300189017077591363969404108800, + 61406359763615804386068614709721536921600, + 261362791078280706221159612263327334400, + 909849119681047104296629402651852800, + 2523544137830712626709059652812800, + 5363284366102718025039872000000, + 8202268056579952964586700800, + 8036171130356719262105600, + 3788540596534745497600] + +/-- Bernstein coefficients of `17 ^ 52 * batchP 54 55 25 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + big [ + 131421001068819737947329244449774449231843086036367252780869448528399146186879931514880000, + 242], + big [ + 155869282148922067317753165706975695963510442659510922758916713088229974667570073881804800, + 48401], + big [ + 229513568698393099005121862024172142990014858527793776705615662252560953461155329526988800, + 4693497], + big [ + 592493313581173766049567172779534804137024084417242714036841244510227558855100522823680000, + 294164691], + big [ + 562624281064068355910136112139188096967798948581736185149829744631886445341539464904704000, + 13395425765], + big [ + 947686648918922643345708314434909204194352881714370661900990212541805111756481118601216000, + 472364685879], + big [ + 746928838057996988181547994848069350071595679963864403496467462138040998759801764708352000, + 13425293595553], + big [ + 777480130682944131183209315824740208164464408842674502364302504025391857519042035187712000, + 316052488244190], + big [ + 13394299910318893054219375290705943997839454087384080250474827978945139913730767716352000, + 6285716837603703], + big [ + 368353843903224926930270272956968548773620739303584164471175894289441023418825854418944000, + 107189766152584282], + big [ + 552125234124893841005258074839884711981574009960909194016950495921216324626855506214912000, + 1585404388413254843], + big [ + 516639135912905856132556223192771401603165669323636776505723045090208260028326314246144000, + 20523767276376022864], + big [ + 944564574758128908589787595314755063736874343088772782843311249672887067976183782047744000, + 234246377022537146895], + big [ + 952862363408687789804251782611966790105268761108022847275273107893951157143483157839872000, + 2371185672521542986257], + big [ + 11457728777208643539393052925739507889185752575311698778355152348313515195464933179392000, + 21392018727297340911507], + big [ + 443238353234382538299019212531794103635851663878213299947912964303374007248434315132928000, + 172695153368557111848317], + big [ + 346000876011931131444753669743291986688317559480134178806212462080644865051188724236288000, + 1251701551266816414581525], + big [ + 5332681692597122560848803843744593756537826995012781217701760172822420231916485607424000, + 8168042327375393245599126], + big [ + 699548544520446758286763525242087145728189617403034886646154997468644474772588773507072000, + 48098441232271760538774845], + big [ + 98547139561721119952369274215908428787808771852404975219422111848595620963043216719872000, + 256074412094055201650160848], + big [ + 170798126493323883355583479122843085918251037495090988003889869402010052380142950416384000, + 1234531983538348239622515922], + big [ + 265988215620009824748901630622357501824294333818816570936519390384801166172100638015488000, + 5396238678166539611805147776], + big [ + 169756783746038114972832199798790801018593517505225537420650092885589567693273625001984000, + 21407866326255267024279928355], + big [ + 232908347945866817672537065700564925152105599731064787807300549005906916820684694880256000, + 77142170299977860602340012046], + big [ + 567680059643559226229590555883543088758016611609834172377006414641955020453592600412160000, + 252639534885930990503400014150], + big [ + 935223079630064127661359458763908484494027071524360160228396918195704220223212009553920000, + 752272038639786445813784022230], + big [ + 144931905906936010767016155873736583416094614603321995777330963211076124323324636220620800, + 2037067082356325114313979136810], + big [ + 50011747900468803269471080669895050095923902690165337244359567070694022804599911271628800, + 5016472439182453337689181947415], + big [ + 657839425216683851238095577572659343724182013120706628316149431657095947564295686979584000, + 11232063799347640796977001202412], + big [ + 383014051869524128247374042165023703854042768249454594557510445583234150210067167707136000, + 22854681766724282709789948093190], + big [ + 901908796708944800227672635522159483684423201104453816027445002578825197431299990618112000, + 42227450867691219066092182373029], + big [ + 603631363664370676581156009153104547205226033587929141864737808272811339025478842318848000, + 70764975498621408171203156034438], + big [ + 872631707225532739602983753407525118657995264719010255677345524398129059902436048633856000, + 107396408985404864614614182231741], + big [ + 678753055073394818857058732127634068269442342257064419589979726873073818404396615073792000, + 147332241319797599627809402622195], + big [ + 568651735914433482675318639517023850374638210072176498254879959062230986412506071695360000, + 182296566947960462994579107567997], + big [ + 193328440193622013128653497061757473869707908312906207320067451972011151253535729909760000, + 202915562716524511798231488856806], + big [ + 504503798394613617101080935564781926421812027845282375847426218019179386677518036631552000, + 202596799173481238442836119184277], + big [ + 325932705656365973165563477040598965225056460367609782466236562928302976487866966736896000, + 180832960567829921500542075158999], + big [ + 813312925308300227499266047125524869113575068199658017680700691092174058065117216505856000, + 143744239821708709833379471074755], + big [ + 504978681641297697971420693588483758360926760429293043317055216383826689784370880839680000, + 101311272251627259394979622929861], + big [ + 382833068387583537892629227251164124513033563084260868618428633025322924553730556690432000, + 62986651980517855840992120125948], + big [ + 875084359250837043990716980921304895139228856279692580287496482866712340585257191342080000, + 34334242813944720979177270706824], + big [ + 329237987425663969770648155602638112680278092845716518197064033608959554419698664734720000, + 16290678331578423378057215737450], + big [ + 93231293177409027224398605446017071326332516346904472410117816322085784301313273626624000, + 6668848962859646688008062501610], + big [ + 731847849100711167738362083653491334311298231457852841493438227174060138074412217794560000, + 2329888712927652264013344414011], + big [ + 828649452924235508297473105957991635260013471385556853059271900186180540835928993693696000, + 685266693734421929169459436233], + big [ + 980466792824016451514658506982172929620952692856860440093564741421526542698967711350784000, + 166735070690532211644956550532], + big [ + 45451958912522929748159630249022867097836453144012909602956520583501762277914517176320000, + 32799020957973178705383882466], + big [ + 475848761445003616159346475280439063064417961769918190495226374037299874029801392046080000, + 5056231388598388961789319448], + big [ + 693748768856636505080287665796190751705510767458050872929037865792302138364322161623040000, + 584400586574420400382292622], + big [ + 458116439039811679933182646994944998613117740549682716896177323132316737475730636537856000, + 47342124155018189419459379], + big [ + 525610953639002992639703402505452707138348984162177947048670888883307511725274232258560000, + 2391962456437307304533807], + big [ + 21659817264275083673298706133223946363340317931391095471375918441144599926849037926400000, + 57368509847422927695131]] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 54 α = (318 + 47 * α - 2 * α ^ 2) / (106 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 54 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 54) (gg1 54) (gg2 54) 25)) α := + pev_wsum_eq_of_packed (gg0 54) (gg1 54) (gg2 54) 25 76 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 54) (gg1 54) (gg2 54) 25 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 54) (gg1 54) (gg2 54) 25 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 54) (gg1 54) (gg2 54) 3 (by simp) (by simp) (by simp) 25)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 54 α t ^ 25) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 54 * (3 + α)) ^ 25) := + integral_moment_packed 54 25 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 54 55 25 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 54 55 25 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 52 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `54 ≤ n ≤ 55`.** -/ +theorem finite_range {n : ℕ} (h0 : 54 ≤ n) (h1 : n ≤ 55) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (55 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 54) (n := n) (n₁ := 55) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch54To55 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree56To58.lean b/LeanPool/Sendov/FiniteRange/Degree56To58.lean new file mode 100644 index 0000000000..17000e29ee --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree56To58.lean @@ -0,0 +1,420 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 56 to 58 + +`Sendov.R_le_batch` bounds every `R n α` for `56 ≤ n ≤ 58` by the elementary part and +moment at `n₀ = 56` together with the prefactor at `n₁ = 58`, so one moment and one +certificate serve all 3 degrees. The certificate has degree 54, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 56 58 26 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch56To58 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 164249358725037825439200 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := + big [ + 881668059927031677649607448586192616332003949610213871026290038646492588672285267093094401, + 115103103983430041] + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 629404523848712223986854940529621328634455476730716694761282812808469442378269343122194433, + 82700593614487904294390431257326110568927402973450554312045747544830455983150826222837421, + 349514123786972750888178950828475153860087582100517491372789898658322232148765223308524958, + 68166057397385213128445066253661647038354487915135269134590678430940267849334597154703149, + 702605750851965856948352980164300620220698349151047813434409666645158551222899715981586235, + 6638084649140697812399446232182862730484747700153845334898151941385069715068219172423945, + 293734892921191627030644037361149269499428534245032218106117842307162336491318046759304972, + 123156166001163171310445418128606177727899323989442996629527025292824304497780362889553872, + 124463398711688753730396917961443185836096138486310222876953941083472176233676421389706414, + 813679152238803670229474600396404453454138205522210064972536420291586230258982045672710461, + 381562163312315625360902503869550655597398823355828192806606450217845456031753268771145596, + 444289665402531135122027765179770589108787060430800846078610113336817947772789148185727044, + 853998627808459178437115760519994306340767192968798416754069520517790464963207886068066081, + 338874175010953765032682134114519372000717101952851781681130634490154786031989805974884403, + 757996552764636415933353561447908206473264840678562084096264484462899863699152545759110187, + 137648436265594918435817867681326330322536718001767898681486945970749182693712938696147040, + 398435923642871771163063050751515076731281937842169659716964372751024410550235992285648047, + 336672915464556522802742286510911505179637953271696743453096400828450831570372081292589687, + 671895982593470749310621410690237887792840683760744356371984180539082590010448732896605400, + 800903496108944595368671533760450015531287006152108409240497520846456651390386905130715436, + 898083696325154174205369090181772992315098238089470058257864146152486145214506248972564233, + 383208155353939339587653545678322067529863160610662183313188151481294230573928287628415486, + 185965884741014417118721057162553844111318872735699674961956918110265346336156484537769456, + 976854545916201975316797945268115103248672583995954935582184688411819570798606747220298373, + 382599235720440539654557403804505801750283867336449502098884080336954839227099026384065845, + 722831371972019732095606794699573608501689794554257549936727122184424547237330777112913032, + 982430688940327557786547295926570572655004921977210973347355225401052371307310594937153100, + 108555562928373833069273598860737911116830765263605358301987357977832321515142907766029468, + 580442179969724675010536017529617208145253037134144053713015664842629850866072160248972062, + 386675575244984301123982621479479071193648388620761063462371966196354669073266728237219376, + 688612187144177662779452729966228892888124225803923134562445212495562521323511677955079839, + 587886658750938434067040550130422659783459081170369852599871091149561624491556014060442034, + 449331911573587551988239058640013235414617241184737726653662840281856130494452777880671010, + 345802799661810107367996473811373322078369950756642847102387734389377964857272930815158522, + 593475209898468809965564520998505775789123130722838421680293958820670725419895092782679571, + 62932086047563745270799579235897132861159290331825627676892667720985377579523888811482642, + 940065726782923569891051522727781114822831853229263099947290630877909209210184612749170225, + 292245108880920171587993790333452768089008103178836011415987775134181569314143861395570746, + 930685157955387559502860683800835983918854683085191354644777906016878158782613205088730921, + 584518402923246618279777162188226451102545137361106762091659960314563426515178619221670625, + 331870890671344897893291054062187347183098118452892515703832771642559683986270056260378016, + 537742481578930245879905510620199517493484927050276384641373848289812659410408588984322378, + 248155208302491825902456748349357709586299421676777879286848899616764302952809019929947717, + 669518026703542225539424043492277723572547701646040705687119006012284155249522097498625915, + 720290686485527608402551234588106557991076261330410759421839822103021863306184398512948870, + 561089466053290195841289011827277708875365133188825643097295806991885957013490338809940593, + 239769116392932534189663532865632812568798311309135254454728838022598525071500115602645612, + 626311677688723709222683115455469735795917825835947741166852442767670691225634587280711775, + 89281231345875699915393233687433969972363844386877995316696080091388427623948191123347156, + 774922811753977367064344834131388983251700833792094137518387389244525949612548925162812425, + 937483417532411437213985069994957646212111786834647103983992621174255145476776797205426147, + 649265720652049698784650467533642731433841166887297629573809983773276410341518347604899399, + 432753754366495984310198784025404185868605191040129866126669930877304432001201960290762478, + 156938757913679334460787597655987475333781385480395005300630857888507532916197725966146764, + 38072354227279614452628416761511033247265985199356167338980355670074481259935536901331544, + 291841719357611597043509006432822661525570877602302822268617962539501162100416429706330054, + 897434305090269934666166235765925442532534422426444302865851061742850804344749394357561844, + 891068498119061812621663480376828651817413687389894868806084790014719309284151210676795984, + 79243882826778102345692962544865449499658648522733260027815537585482407821301535525184824, + 282315720852615437665681653383630905503147550501022599422844883798639228804966944216026199, + 253580160186390278467934797383603364207703247144329779747491239266387917088827863706427116, + 548931797997498204233707961858126162144560002710775279087126539658375486540824653979280622, + 47297851776645577445147646196381049384165642250462902633835348322102240893859945916799324, + 371760833919993830013834041422609576966376374185660874597024707861463558182786128875109143, + 322120863549061179175932160556420106644698998558773799910403720555690039479943392084333185, + 237507068707583425364414608635798602677629240497088921534516544612558370987548182261497282, + 279445211600773968932443587178201107074923367072284418368871284563990081400969298859038100, + 988504471122939214018776358560680591178587135665943883179719360995875631109619264815573819, + 739479685284414506080190892335459195567198500638531261432083103653074809773639384964290600, + 820171808284172594468743392099175823706362604019515121702642744174449845389506716688240830, + 667665827545455738182183270343504011111170991665295139018259283373271348337005144786536012, + 193895537594110702041580979533897205589515716139732026863783959693402998885368544700352938, + 678997223831690330632238994836773940256574316535791300782794857414997683759248496223963567, + 639940946910187637587290777462557902207593858152761644600436134555109766011814159207482353, + 732427209216955532772170828992919010103255088848272634769592783269455901210972436902548206, + 348468828738663535471537085124220555061538568168961471428198080813348893135282852501240654, + 171526274420407186567885736535992177623028462108429926816879680454819947150935704717432357, + 608978800172583254158195726716743702690548108959843324428986803683043061410282613844411124, + 916461302751896190946713407672548035997210184118435933809969990873069984761021887060950608, + 431473684411191282993657024712098494990130043263030063803933655666305017039116915113199528, + 527930153015948872099072651950535075703606752994684064338227549539626612747451376893374699, + 467265693052258305482488007106874707106446510155952400579499904011828528339917431400346959, + 51936263003056869031026688388245903177361103548858509697516962824754175263671788787434172, + 280506711358711041426943004450387951750409548218539478144490156877355883327764312428923662, + 832868099232357765238406704326832287107270623291592136595054204141985108054386957802676776, + 622933837683727475100022920176082888051631953708269170285922995874940808723874807430747250, + 703020157375057912587878545346670001004502147585409622568052032336903741418966171538198401, + 777686660550612714363175361805511533564904904490389550188823109618174631295617304833140001, + 883365739317559402093492388177600270664813072401757266768540669826329041397497859893205382, + 756061752268167581642999262301200878964880316018790314668494639913368488408107034480320555, + 505510399864111735071592301714821324177110215073295398225133727948712987423962946755473184, + 807246835964023673742145924871656368076577390194392061724738021591335391495509516764527490, + 191737481557345311319125147550231968976718052724821397470663805896465914125461666625737324, + 977718430172794223868972166270709150689766683002012964345276310170272127638801557906055315, + 4693092880083288260025666340202716758462295736635746261187172973670803761348080289] + +/-- The moment numerator at `n₀ = 56`, `k = 26`. -/ +def Nmomc : List ℤ := [ + 33868582764593486614580198271976115909945381301431665278000000000000000000000000000, + 320783574985576954266817702040765346435468423111908091026400000000000000000000000000, + 1464944226771346229883235364508543692815754116999974490834800000000000000000000000000, + 4295115136765919668519524376268312032880310840581088917202240000000000000000000000000, + 9082273220345340571582057632561758215665009777928915319597136000000000000000000000000, + 14751284758104105432077939677611377916650960687914409750600213760000000000000000000000, + 19137140825264939693776052776262891311178314056483462141355029888000000000000000000000, + 20360071640607291537880857112473816979755285790649204553690963456000000000000000000000, + 18098169354762788988463121409931792683987974709983274480942260467200000000000000000000, + 13625519195620228848992683755722258059883803192220805004939752852480000000000000000000, + 8776463139807067760582569762737995383560203608259607100369333972070400000000000000000, + 4873037428446808296629559311226387551868427417443101045063263537643520000000000000000, + 2345312857656583806744638801805282188390679118534072041892680816599040000000000000000, + 982303240459731677899573506650574396164657142679309449536943338668032000000000000000, + 358999922574020348412584179216096208248549762846073489934083756059852800000000000000, + 114665825582028445117360762218322789119057822571310583030713193523838976000000000000, + 32029535611512239650319556425768665704842598681996221353545453997149388800000000000, + 7823476034807414586554359962054392167911861412097999185219305886226841600000000000, + 1669903668424626293053683633952751587559044221295377519875655553052835840000000000, + 311184218595479121122107983311419552169507095646555034420546580031471616000000000, + 50590477903643325235750809883523870362530219638946921913819324844857098240000000, + 7178520133309593259519371618343534950578256464408935572198999127083712512000000, + 892106478409766777941564873448017790756372122096647214142160628585857024000000, + 98185816982660133827431812009314483888805893506515808758334087759921152000000, + 9939119916963633437676393057789374643822127955775461391110611417222348800000, + 1160702942716697816676165717017918703507609588377247568278550602657143193600, + 885103188985964495082304868003268556919404521778024643790459364959772999680, + 37866509791243107173228252377602677546078050946031365227732016072868495360, + 1602052346923722092883721529151973040677240243504270754096634547666944000, + 64343986788728864329495510919311534266655630087627140802893991378944000, + 2367391036005924145537611563523741752007870943045425066555224358912000, + 77917509209300817836063551626920532574519551770471519437227609292800, + 2263969423642112116959862649062504882112286609771180810273659289600, + 57711292797094350702236803227873014104624655713493568184123392000, + 1287560685245640996382341052913393398756798865424054151544832000, + 25128128553510660963646375794393285609017499188056012357632000, + 429043489271119727945132142610350604090805919279874257715200, + 6409950701800945563270351769563444706570837630462092902400, + 83774287013172053226156110705304276399176872252932096000, + 956918776848844618294111185030319115173185386971136000, + 9536360828571019805323364732115306378641687969792000, + 82682921172675210958965979129462156322782209638400, + 621167503268387900847853291726272409929305292800, + 4020890511748251669022692717461711920037888000, + 22257001403658112235812283834692710432768000, + 104289134216461900346362078898191073280000, + 408052823266348851171690914760779366400, + 1308552624077075698447423237835980800, + 3349761809403351687282424807424000, + 6582397587185967597715718144000, + 9322878474654558727648051200, + 8472072247083599145205760, + 3709817675048309227520] + +/-- Bernstein coefficients of `17 ^ 54 * batchP 56 58 26 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + big [ + 53669479959914104317551814264195093672676782419463322473621600000000000000000000000000000, + 233316], + big [ + 411761484683174665710614791110151282066443998480920105191404672000000000000000000000000000, + 48427399], + big [ + 106826538634759509553434283948054562736831635766018339461626176000000000000000000000000000, + 4881669639], + big [ + 128958416907839892210705939861094957061310393555325738690457164800000000000000000000000000, + 318432414423], + big [ + 35590156508032554092633520830102031961281164795389730337803914240000000000000000000000000, + 15110610181376], + big [ + 649096410641599615529228330480086363358506047363221809310611383500800000000000000000000000, + 555996682275545], + big [ + 144485740628102130668669267479666238853467569680303220716393939783680000000000000000000000, + 16511498834832475], + big [ + 590926630125557812387754928997407318090090552536466150651201978941440000000000000000000000, + 406741029696881705], + big [ + 370121363175269099959529691890721886944566082153708250957589418298368000000000000000000000, + 8477518094318627646], + big [ + 199521808830890169669485534873088600945244050073252457927205755041382400000000000000000000, + 151744810598730530781], + big [ + 882447165419756821444693434299034004033544190855704773506428723038797824000000000000000000, + 2359785300912956138746], + big [ + 959939709690164248320838049204199160758098123391921107990327851529266790400000000000000000, + 32175253360750866600621], + big [ + 473875284194398434650209672083009312535031176219919978013530230780760883200000000000000000, + 387496164493957668057700], + big [ + 701239402744959126467955473010658836399733224359729600212245747611714191360000000000000000, + 4146912191720069587135715], + big [ + 301944663855362627627419973958895840987495781558967329951671843384778293248000000000000000, + 39632376376008181583642826], + big [ + 517019408262247505889779547378117740893799144187263500914190219634276743249920000000000000, + 339650475431665949882223921], + big [ + 394168568048873874628201053430683084939136937576996417380735394126409243820032000000000000, + 2619163964621968607633174385], + big [ + 411051451300783573703945325923646705391997582699984837487648086457086342332416000000000000, + 18225865732823014949690636004], + big [ + 102846710080439428214648053952821280070549763028548459274335749848399408948838400000000000, + 114723192966016961781308991929], + big [ + 782531769297398652172411314094645805836321816864632321669161954229845730703441920000000000, + 654519073006371760784576574189], + big [ + 181146676774208279828352199285349293671955273237733026415539842688565178967628185600000000, + 3390199019029880463066854977895], + big [ + 675849582543604995023592541215563347454205073808892591910860415649036426582698229760000000, + 15964578708390662935213975808505], + big [ + 597422385716930460951748243198205676652367900719785517851178520200828288659598868480000000, + 68423766445217116498571486602927], + big [ + 998844040320298496588562941574821153138545717794350548142110053934327454254707507200000000, + 267156155476676520986371152320542], + big [ + 627812888588418565800932625863724754325642071320792292043388191727074516733307912192000000, + 950906289488428828630726805953124], + big [ + 213655751438183149803484141834847947268341176399808372156619194438100521045197101989888000, + 3087113685973789637650881085979582], + big [ + 879272670364091685271326075175878595087287559051537858024632195566161962507034516311244800, + 9144627152065444613043878339619465], + big [ + 506765576341056470713662670433100538713570442803814035474084139130403255882380797699686400, + 24720887244733489026226659857258456], + big [ + 954536262909488956208792732589538806352812280457966998429423590388419993363606389181644800, + 60990181410411921097195167149105729], + big [ + 798496296323633418895982097128721707145085513783361765073989186030592618587298270806016000, + 137304474559289984921943546729412017], + big [ + 97353222840904157031238463574878926335500337148090327789936074811615787773638528204800000, + 281950885600694908514559300141433447], + big [ + 925905348665080457847325511559481285246612392337023712145296389213849817562365296640000000, + 527775820449169022322525157009631753], + big [ + 523557757686203734410011699313101444265577789649026726475725234135972689331418562560000000, + 899724828830392054214564207828859523], + big [ + 770156688157553568881201358222575637350230448141804393792635533579617552673108131840000000, + 1395128995053932821673376578095841689], + big [ + 753055709422323413779785688807438903911570476458648437334141246656110476846222540800000000, + 1964632905823259886782202929151809607], + big [ + 252087729386826671779759956219098128342899973905774164534487513294289689567559680000000000, + 2507749426599200159316036007121413266], + big [ + 112410796589855602828464053136875329239823184589099607316956948074350712822169600000000000, + 2895003417950917692075339929290897469], + big [ + 295540749414289774591688037178357871534010671156784322396289160660350268342272000000000000, + 3014744806025510632999209519903832276], + big [ + 966341870181678182563411180425701763019806203085343506444021067528543696584704000000000000, + 2823568379145163546534899669979154095], + big [ + 327714127885883212708853734239998791640457763551786301521992238228858973716480000000000000, + 2370365089619866961415045841241461431], + big [ + 430564263040967097777997121211678385993241702028686642314477964110548860928000000000000000, + 1776652522363069996050839118422221200], + big [ + 904016517504493307733019967152911921965541425657947016760106966710528901120000000000000000, + 1183556431439496578550630155545689137], + big [ + 908231746200954685240296249889668313113176503245455297026728633099955404800000000000000000, + 697045658327458191245409192391818388], + big [ + 842943338788083011931467848111168085781422187079498713119559786854262374400000000000000000, + 360634734827295627345655124120728560], + big [ + 952512654738480008744700758972869714426814880330674796148034219398524928000000000000000000, + 162661903545068396980935167266706567], + big [ + 594136737039841651996973240518445869538439865044645332412698310167756800000000000000000000, + 63363336459532186870016173688396369], + big [ + 988378297955382943730413419061665019844286663242143806943287912951808000000000000000000000, + 21067891949525605717592049872724293], + big [ + 660884405265044629193654295123935968188834195380101083354136965591040000000000000000000000, + 5889803756857197147407231348546822], + big [ + 541025186986417483334684108468843270552499338868554754400180192048640000000000000000000000, + 1357269395597073479251003280593426], + big [ + 848036558811977346934086335538265616944306669075098087999974381516800000000000000000000000, + 250917907036525924826368764398786], + big [ + 41274433235224302181500386757992123471058998972016160310121847680000000000000000000000000, + 35785606126328498324535763880484], + big [ + 185576726202926675548429671214802251988519739488891518521397638400000000000000000000000000, + 3704831197356744186552422539901], + big [ + 147735593568092142871753871968471500200563810114510752130298360000000000000000000000000000, + 250191218492967670386429684385], + big [ + 472108576855997898720234335764472272328109822645188206140713024000000000000000000000000000, + 8701414089916323802595563264], + big [ + 604979996586729818029345416860185897548607247953202305611194880000000000000000000000000000, + 55158559162414582599669849]] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 56 α = (330 + 49 * α - 2 * α ^ 2) / (110 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 56 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 56) (gg1 56) (gg2 56) 26)) α := + pev_wsum_eq_of_packed (gg0 56) (gg1 56) (gg2 56) 26 79 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 56) (gg1 56) (gg2 56) 26 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 56) (gg1 56) (gg2 56) 26 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 56) (gg1 56) (gg2 56) 3 (by simp) (by simp) (by simp) 26)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 56 α t ^ 26) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 56 * (3 + α)) ^ 26) := + integral_moment_packed 56 26 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 56 58 26 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 56 58 26 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 54 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `56 ≤ n ≤ 58`.** -/ +theorem finite_range {n : ℕ} (h0 : 56 ≤ n) (h1 : n ≤ 58) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (58 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 56) (n := n) (n₁ := 58) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch56To58 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree58To60.lean b/LeanPool/Sendov/FiniteRange/Degree58To60.lean new file mode 100644 index 0000000000..6b3d0c4e3d --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree58To60.lean @@ -0,0 +1,435 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 58 to 60 + +`Sendov.R_le_batch` bounds every `R n α` for `58 ≤ n ≤ 60` by the elementary part and +moment at `n₀ = 58` together with the prefactor at `n₁ = 60`, so one moment and one +certificate serve all 3 degrees. The certificate has degree 56, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 58 60 27 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch58To60 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 164249358725037825439200 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := + big [ + 55334183297030382724393469126411780705173462993215823282755131920085007900326512662937601, + 497961355142175787394] + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 492278945395344304765286106670809581764993646056337330780278040336210133140094408435171329, + 654250769649689533407135776131680615322087419748313923142296141072017889740450322009563890, + 660737440113463838266640964849296197941225146490497206559460299899558514254903411236575198, + 847452951900978893957795742632060490076867951229189701984572367913880846794709552840161975, + 559918236727322267623639277811963424807013462492030495802572854093018110812291613600969540, + 898140819327653547596706536363577959799647169425815612891269572909580808127091697113597053, + 281250740001757269405737948324589642467751162768897782997238401287657016493291554562298893, + 947816541805377793485601438326967858419216392222406520939546610843094411011262938268298976, + 649293178271903777575666853660199457819757496628932453783513500590694073993597888943781307, + 963796352806474310265032024127028400335807912010041103110126383312108622154114947475875613, + 853462200144168741780188973068647323271325608354410365457721249804614924757873198127173282, + 491599426207337582109745666981152592600184475767100813773091585529442651103008621115454250, + 369000172744906734205783382907058512898608923529844082362064982180567318594211635145350412, + 43211455899314349425647669358483089790469056682165578025590768977028380193294424719940470, + 274776808123460826973480970122387666486512432246483804276679068291060400434668588580430609, + 353459800108326164537346756912522296303522812441584525761990517039653380800248349761391011, + 36870747777491444937752059496441860289289779756437367742227683577306973507266217484404063, + 479533288015401174288781003594795896029044792209875334291101638340616793235570897513405827, + 943851846918649164979476504781017827581184709227829154254337669706179754230971408427433727, + 496044413682929551535139895863446115892408762048804875999191549003886851385964438662855385, + 948763944707640687144749573597969719390625937492307641860995659373979991655417384581682402, + 585232983146184713572034379656249258965863935994375887460028245126598727047421189455593209, + 696953819923045282597899194502457239548513078174403028350673300952623616960610411693105340, + 592336674922030396342752124815579203339456554732692151841618686939412762859705523717152167, + 926501051822141019554194646949737370986415111962432915150661296128992920364162375278674794, + 4655697605821525648654084086477565825669585135780251966687240656983124447379981405475910, + 359582210955745258226297321957073921513386031168785411024222553538484146770946366988880735, + 881115057946441493063365409634956673552176703056214922345237631174237694663986427936528855, + 234199758579802179271075927308256104709448596774289083160380503608132766618312724942924711, + 483837721362254585658830239557565062694580342843519944648472286957355485494324751646824011, + 795818727844384217347025992908438653251191419324894950238874762163785665881822095737609434, + 993806758675809819110233987410451987652021418877814769064285802811615412250516255967699104, + 468386512029330139794596683736248802323503142145941816939837488771791949637090944032947058, + 100894481904176813019541425764275325646362121805992774996530966951365730611489894232820505, + 353686768977945087450285121601493208791275572673488462111597041368720987968308191179361264, + 356007630390311227679429894181414132154096355602512578932128304322286633914821662476725450, + 533934726902215622317335188481775162253253376606043915174117154069795258441512648078276467, + 269346475220765744477085820777407442361547889433386402777255508622616174756724776021959594, + 871933362303613659306078315980534837390800894847025582562426780860833567868271314616953593, + 516281643802255932019834860660652575642928540905801343802515837388583932872595449330121856, + 399225124354773132407729882815047668832527498753106496696249687478573289850669048933107513, + 681133702045534572885509841628689493005986278635525684632064422880649016526052953381767332, + 299780751987012961725457554249550941196699843513860457213109427890395018326955224200838804, + 540430354061341716383343467955113315934376566432271098985621423048638615498660378896804460, + 212058953206644805859062766379796315753909776649377714824572980062786652038594000477294052, + 240948866273423038966007332428962971380643311609020954357886357433721932514051961594136050, + 274412236878630848765681781874806835815381046020016759907736845553003925857240061932681408, + 178577103160642727396877642623982397335958810249988056490602978067673282917134369948818607, + 418286366702832037752016557003090206898679756146951552727665716139365098687356529177480901, + 199752896586200862345525102407523886567105036152638203700595821029472609140583075532164174, + 627120931683760309323832036691401827949435539168161500249695711486139283227760103018893265, + 780556069242968082908337742367943150450156574808917753460290676459741469011587902531380152, + 858824294324223564423709990084643145052030192424102407925094786711632107517708755857377779, + 965866947321182796765345324936002001477319279168010454649525538435280633349577341835865534, + 365384864965244729146070466179599872675575521210399040135676880224898608734735375914828562, + 331254482268866992091428212494458160961622232398007042929042130055439378581682391823375640, + 643568903061749822770610628574651180038292137139304780702688997910692846050494727963196512, + 190000397440806855732198345007033169597806442696182488778128438130155668901420070628545538, + 78756370632897850127016895129585422678700904491830654579000007290427674236780739610891244, + 508625489108879798745670744925117302403085752161710130507562447278192325239806024674001396, + 241434116786813401331912386569499402320362912265879574851392555801209510357348295773710625, + 118834398710009536121907454807977365791249301910660294113444774868430254146802793683380460, + 150661477346852923914343796233522734554786635980943289478667773890612446591078003777661935, + 11469324398677631239333950063211889192504972476761596029812348493229424778430911246646757, + 405422907673601356064185032582210172109541619351156591899153568766340896413215257411879209, + 349012269256616069163908711214864988402504103720972387451484324738945653647274984448888409, + 738765417358203956201835092930240838380151171056096616571277804718859544167584618828786036, + 847444595229708181666610505319472313782469454545810754633162607956006257118231993844816169, + 79690936056190711468370864879436865757122733435408128460559417923801625465365684760023575, + 198878959888850317352627240693031518480686051502193939403605794140725527665005355475041852, + 937647828080755465246423298993250003033556548650510563007650531146869382607460164146977499, + 746466277367290072514198445981632112330900519518006310497326933957920831048356567406270461, + 933047033876345776517246227891253066553229817264310002730952428022569216997964937286073346, + 528424688571905333358946872625067161462184252237166136504168210583461996664212789399812878, + 731077132444246602728620695805592231299983721057940024348109790711549441405099813012353485, + 451029525269393079161451159834775899304412164051771976937033145396872511834837309390351210, + 684456458145073113679544495399663757524363092046694068125364849274221683446333110738388627, + 735829266858120900402091065925446747222692697728216949722257172390018839079567458734864502, + 977248447849187807109857761995832579849498469003962104381113023725399598599751221371749484, + 364242526891487246598416461484011588552441112126309888030632390118866455513932557712476920, + 791356986585375828743736022367239635325813223714331247632052084519992744097361692147518401, + 396522735300286755870225519012389201073521661420384347353588021361214308921824284156053765, + 464144036407571433628245214589867475950163637350116267893882672606506062673034467345895002, + 615510435884866193877476009999702727313296261809313130471092242046827232428200621916799122, + 777584815215688813249606067503640500144023511966016112654977860797966031500910762602061597, + 823441928301508368635941263673514225884232299041762676465826266885518625829931676784706926, + 510683280209240316017419331826434565709165532557116138585658788273236867308068842587303268, + 325697059083063842036318235023679445046032797356403690742589988234144648363788111380889467, + 993904541715683704461104116141115330922286476243249884642113824064082605547499298030364643, + 238423613953164565090362691246517800430518193492880391583783165229383030756105262275949980, + 70999248598764647332421430609613476202780332450053666193093701181305308525830764021058400, + 594669137255159521847437650494328770454089569946248568105227288923352896379674503981148310, + 150056636678339921943870207163465591423904239157838298162240501462910163956816998225448107, + 914838936809412661076854773429789561395258131639101434165235556498876099996030690538250276, + 783784604565641478260475653119799986239044883966164615150983511246546984813225439648431602, + 213173814306089347670298587914509453327032254441408889254545559958654557027862809780990814, + 111661931630904509395053007900278594620144138547990044567751873678931975564730984448664554, + 320292513150467618543681878443916739002320043731921024675936470734552816037996461919857428, + 701469365221019172843556529599314294873676021662580517915072502849548535105480152501184157, + 399489502342550615644431202381272448030834420719948436273455150272287176011549551487398208, + 927778112087781385106362944742929814815358088655281472791766675192380386578197713402717438, + 448471087572926723063669239876154206304619326201258593972780358611690598231] + +/-- The moment numerator at `n₀ = 58`, `k = 27`. -/ +def Nmomc : List ℤ := [ + 25380853994369450022535770070426655654761373734262887847653813209619157899623813611520, + 248725647965345106890821407790460490122214653890384903915852744147889827745237670297600, + 1176686653480301704338618601355110387788283936517731294345360886156934402361668088627200, + 3578624600586383194803660758397135401787509307784979535869146706308507746972368382197760, + 7860497614322219586170068092961539492442334407185885596252977622799897948719473596825600, + 13281855354764644366975952716413762238191227126495537897084170454493208570721797920522240, + 17955207507602885341341883599778040700461918122888114771369557678902521989164994605875200, + 19940941331493180176699089055325034607720335860774032351483805222051948869997196581273600, + 18538998515914292550179419501118252695614262530264276784079507625027907259054211748331520, + 14628273280420438705635827039061124440156442249826061889792986054372581019858654304665600, + 9897592640350601729279749091948297608739647271018619419414474838038035785713001462497280, + 5786930839786714330511758627771047682329742501368400480352570655126076736915491101081600, + 2940706360291275464582157162944921429613146136831189573986099670846639472193212671590400, + 1304266116341787409149893211161815801908712279743604368688973741460074819310750573527040, + 506363687381203865486869892476892345560294052913246187239607513430244375060904987852800, + 172401539827088048024651668238368191577520022578196864398501937484621350802075806597120, + 51522552611252725893840114211793820196531816132593452928347673143268659800924225536000, + 13516900084182274881519752027458288772401501155897817070306306024407939551177631334400, + 3111245100795438057556060404484431755699023468585308591709912817067969204586083778560, + 627633370128918892890965373184526625880544771157522641968543896122978469806289715200, + 110823438872743816840489016008120268191523839398371983097663171239646710781265838080, + 17110341487494451250793983652304441024488795632096102525461434911396002751997542400, + 2310085945052642172765629748187946560829429166235545589888010250986916467127091200, + 273559821597127538190548517509160623740538768961509253183546238888486970106839040, + 28711293429325901578297414113499001460597893367470110122730651325498720570572800, + 2769732669876388164961799900582989243743860224852055055754138048498381640171520, + 309221109414926951033648007756815357604088588555237348580882736031542647193600, + 243546855277802008290615817784313391353420683710722731930845806093055662489600, + 10003682164598465070007434190912337434461448575973429139105601433677814824960, + 408996721075433859179768200713232184347646963326340180720678969638335283200, + 16021501239581601665519202723452066245408712523564084158920902697140879360, + 580299978017523881858747602388165867854484924972029264345724034534604800, + 18952305426231436421215804189551978170487335420083548889780794163200000, + 550001785887837601624613301791455270250699067448460338604623873966080, + 14078758551362061196937135537295818968688407264711786776006701875200, + 316901767072019861836753229580825226875485792157679455391375687680, + 6266977913251607995274705043330749008749777784129309671791001600, + 108888140159549563333168154256951246657088401771573065180774400, + 1662613258742966969174992896902806948128048564410693965578240, + 22309323213380367941847607747617517602409705252373240217600, + 262931856741648539978854857643819523900708930775039344640, + 2718552181131665719468340837810303499561214680445747200, + 24607865609256444274142496166932636663067987201228800, + 194405946707911331240938411751093259011535635742720, + 1334637045376305713493110632227004198454034432000, + 7915718736912512456522345708150062809392087040, + 40244469505251981085850971499899097658163200, + 173589018384062857270854714512523028070400, + 626525168659712258467802406879724830720, + 1856857574898200210102314210846310400, + 4400792791599485490657964767313920, + 8019351639172792792679605862400, + 10548765128140929715352371200, + 8915600812135881124085760, + 3635755979176201420800] + +/-- Bernstein coefficients of `17 ^ 56 * batchP 58 60 27 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + big [ + 354379525068988968639850640314734704372168964007891447590161513993209244900084433708646400, + 224504362], + big [ + 170367485289505338657467810633088393167917985915975241719763558268423056704351806842470400, + 48320422431], + big [ + 342360447297071408105225462900807048998862259161077781682737332617011357869247409474764800, + 5056224756035], + big [ + 890901199071567155047395223401858337279875181627173561018634422982726494504218054256230400, + 342747366289563], + big [ + 884163508281366057127317065956093979439016097298017696243369055655066741882851547519385600, + 16921574771652778], + big [ + 400021116939876788967839621122143912523118761404941718428522835066606325904179189933670400, + 648574226897513856], + big [ + 4819906396372172620571098628136000625472474803847327642680231224502905387412069390745600, + 20088819861268267603], + big [ + 201742441792905140985596443705931156325544797364300457578566919479189583336129461380710400, + 516825853778314672468], + big [ + 287281917241714484563447085357739040388188698663797701316249719551511961137130589336371200, + 11265709851651887530418], + big [ + 560345849384971585921939589835960931882971211815041787479327362058445319665075443728384000, + 211203530162700976147325], + big [ + 404175453884322198431436607203829019531367839196528132081215052216441692274882140910387200, + 3445252657542893885826706], + big [ + 405606166726207591553061205587851489161527743494470471375584141155229424409869797870796800, + 49354492407702148552160167], + big [ + 454634379074385622830784122158481269766548996181644836865251618244920887204278133011251200, + 625540480449902442742497171], + big [ + 202608283055623827491786644435353671357983569850160123376832683761987515214231812807065600, + 7057595605694339957465950434], + big [ + 418845565613267001628508774036507692171663396536873010302893015976746800326257548460032000, + 71239546006922992959107816195], + big [ + 592075562003934167780379036746497688091189265754711837732591788691413855845958683721728000, + 646060408756176139927517630706], + big [ + 153726367578135276301950683728931484393579856110629051489860576695835623692269831323648000, + 5282515553128037477203574002866], + big [ + 933088347002668622894838963219069437823097319216306610832549566733667561140052329234432000, + 39057839780361549918680988825020], + big [ + 255317947855890465242677236752305661398187591465805066940337491426074867242518139895808000, + 261791918712524023894189104000254], + big [ + 357721168752160620477900200610473038457183848805411292849777396433661839202488441372672000, + 1594021858281161015196874638545195], + big [ + 672165444095959545301276452941707883510023451767876755060747030927752606775660748629606400, + 8832544619848848276135142053834401], + big [ + 673531333884781977126766197948305450011371348001227167993343268298121049945635148110233600, + 44603506470543070235201517354407329], + big [ + 45021113474138362262456505120677902055432181142770185355848404443326471507802589652582400, + 205528937859793293790080989974824057], + big [ + 609051694521483819306376858992352862806320907902840656625230133100779160048741676954419200, + 865030963395842770492952183698232109], + big [ + 996618898460630453402516552049392893591327871067757241741935060820936324173228557729792000, + 3328085929606070303419414682720728008], + big [ + 710752067268596799828291119255960875461173212595253336661515980849353714558519413728870400, + 11712120103206197391849521612131307007], + big [ + 668637772063016729504185867315855868566196030265476796163102042405251603902498838308454400, + 37718966278789607488157100872077556777], + big [ + 15085058588194745946578540177593889711270515162007174483122627474425927127212598545612800, + 111200994303948383056034245400351514379], + big [ + 535021755939981098166553070491884630690851849781602511357953839569750179944137696372326400, + 300166425694929238957777200326578320246], + big [ + 207643995801823367844903279196190488010404612842819436986377366529972550262700883155353600, + 741886684115469513129963636044091494134], + big [ + 154396337634315247610305515669697432535663122330701394965893677319686016161867936405913600, + 1678745096349917834279686061552514336409], + big [ + 387630202417077469132149275236416709739996719461467551696533526475300327511230272398950400, + 3476771705861173579640936923756883593569], + big [ + 148300461220006261829024341826546732001951389315258901063129310588224039090040673507737600, + 6587110736136453517768373022601293422315], + big [ + 457124584556346749281814425151227862290754679210292110461508195495633730026099276827852800, + 11408329597084538017953262029663299974949], + big [ + 224024111647753350731330225354110260311513295011470316336542278921068183089612142411776000, + 18043671373789662401772837112721992209800], + big [ + 150554868009293753285483250635664920461073839600780558850773949570364374006425837581107200, + 26028492554581211958297441995089634671331], + big [ + 731373354883715256936827182862737564462202985662193391464937023566372572398280759889100800, + 34191036582249918486161702992749131167213], + big [ + 345806958139193350645763701954373335586271067301962111252140582342088092779895894258483200, + 40822600912437326643607387794108998471347], + big [ + 517464891592857534484370824040762530093265058652011976384270263012316306368256508795289600, + 44204174789261867791532387308368582883395], + big [ + 805805022087331204785533708699791115288544346750328312667241016403408811167282028871680000, + 43301578587668868962450594617150172006174], + big [ + 994338837774670466885333284971052345133747795910813426879925037704580843734032640376832000, + 38261824896110207192264896715552073350325], + big [ + 433226706546695077002845162861676989111597467902936544426112293005531658469439107497984000, + 30395553169478790975119530101734380756970], + big [ + 157556395516822887104420177945658990326584590845299105678331941711142726096525904052224000, + 21626260882302715565531365081850098722552], + big [ + 334084618272438735149947286041992268913568316451066346503164213035400327532193379254272000, + 13720222453714229203294403800483099894360], + big [ + 473291984761719204400488098283070851610860551565880026274292194093507162619269812846592000, + 7721526281953010798347114098973449638021], + big [ + 197990781369828523625310080631514159699341835384413653499557086248002985106511599606169600, + 3831309460169703449155287454546005293341], + big [ + 953402844669880733938618317591728053194716762304045982328186689514861907044537360344678400, + 1663797875525975579530566092499072636697], + big [ + 460523898533043283414774823416670470465054863686536837538321443397529762432140617292185600, + 626719345933755479908215060195224793425], + big [ + 356318884574176100053232118987498724985474200190299609363180976759263665281839127121100800, + 202508087328913921014618831704018201817], + big [ + 389836806402188861204390199650386044706768835252525633646994699815697136515942692421632000, + 55348424941006993198903686527191780203], + big [ + 569528872120572739885633999957561536390738361840117367043834305277605126498944358442598400, + 12564317669680577196632105359455687754], + big [ + 550513305501342473742461190718835549479551507891857467339701406207311504726169430366617600, + 2311630356514530307352055393270191762], + big [ + 430800720663271060174031209949125721324824114219423822105607129071138397270689026827878400, + 333094293935132504782945719919575334], + big [ + 156416296470507943368190723929068873912067967326257344626411661488567033841938431423283200, + 35724666081429307063180572731278255], + big [ + 872022140888203529890781627634306069077899983940881324300862715770115646754383640657920000, + 2625345785744759864250289921439181], + big [ + 718286009465459681619878706379611795524833427869207177812134115815195356132087431168000000, + 113173974728960097061531258361568], + big [ + 26409703174066300208995342018367154759942589384429530325062483433700899926363340800000000, + 1942380152482745588812686377145]] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 58 α = (342 + 51 * α - 2 * α ^ 2) / (114 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 58 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 58) (gg1 58) (gg2 58) 27)) α := + pev_wsum_eq_of_packed (gg0 58) (gg1 58) (gg2 58) 27 82 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 58) (gg1 58) (gg2 58) 27 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 58) (gg1 58) (gg2 58) 27 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 58) (gg1 58) (gg2 58) 3 (by simp) (by simp) (by simp) 27)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 58 α t ^ 27) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 58 * (3 + α)) ^ 27) := + integral_moment_packed 58 27 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 58 60 27 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 58 60 27 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 56 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `58 ≤ n ≤ 60`.** -/ +theorem finite_range {n : ℕ} (h0 : 58 ≤ n) (h1 : n ≤ 60) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (60 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 58) (n := n) (n₁ := 60) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch58To60 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree60To63.lean b/LeanPool/Sendov/FiniteRange/Degree60To63.lean new file mode 100644 index 0000000000..c2c26975a4 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree60To63.lean @@ -0,0 +1,488 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 60 to 63 + +`Sendov.R_le_batch` bounds every `R n α` for `60 ≤ n ≤ 63` by the elementary part and +moment at `n₀ = 60` together with the prefactor at `n₁ = 63`, so one moment and one +certificate serve all 4 degrees. The certificate has degree 58, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 60 63 28 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch60To63 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 9690712164777231700912800 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := + big [ + 658384224849341109626978858112228574607061985481724751004366686722403664282558232369561601, + 131890702893372416829372378] + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 828175709874375831914847599074420720115249740881486304392067422276594930176572027014479873, + 607136568161435100120381393173640103037438501614169790027250995692805622382377395332711410, + 700991013574058669486391223358685278096957142712649154054643379762899372674428958441385875, + 13706334499574238531927622468358337875901175300308119140778272667365604705304782574812630, + 94003113282946328693188903343447797662543782386469717872648399099062836953301727383215125, + 572286014464834136398611946530412687750852626815111064147169597840194504257150952441524308, + 823474076526563991189604013303461946493319757918584144801405586975726664563181619626471897, + 564109623673872331249116475924597158399543643891939964248666530776232571675197946677825139, + 609215980726310550199719213626777258784154077826963450054309143534054867199511244785252205, + 993534416194517543557578948992476381076731274701815752330153842762548319496873018827750350, + 847346856244559327976402066633895737058849715502817970730980593646762481946251985543296240, + 722374807275486345957305238314018120666329673122797978442293633543380836605000033385695882, + 894303565582799012873616418135199847326718992905518312708653375957606572907817473787996728, + 541544685706061983505813208396076954432516199129510097802491243480470427230369432017690556, + 703676046600097307066498385902541189893153417063518141022119435777880962404503444009931018, + 131475788652250453888259421665468986833997653347299930905009660524894610523783972847734409, + 493556348300198209390765560070615199000505839902991388006563322508525929765618088525757271, + 515186472988686771044974885524139028279507907686576822909438694359665627680986955210089704, + 921576046144230232090651759490736991223309483082663117017536443281563974163243302478814551, + 976974556882977285770951070486539357734705634008030195560223586094244159726741071737291913, + 174121495714574835855632828514634898125137832856937289206093682917846829157851917009824831, + 394892820347087865545583462483443851504366760155437505464883331673797759674078109683653655, + 794936411768045372639562139535253782018937948828001538777506781744692801561789222743497624, + 782894247210321585307731656640686375053479851955256880173076008060267134475408443895313047, + 44771612993014913267012041912187356285777381895338332474473663313611093087113157599842340, + 970847864291740994155636328485837884038862719422556676962852616356725107223822635048190263, + 955209655906032570380459551761977562209881078928119469637729621680556013996183900507497517, + 408096142424001875343870377037212976648216743321554681610337135368573827380388493892765688, + 58647998904274582874526397243920911618142650724149137940815724860431635639891579609118277, + 568700757254856930272765018497083978932368899955843118215303505782883913643366172870205160, + 797738792627394480296448884982480006024738544589847680920454836200108993278877552920477982, + 966461605348238626849922578191674974375058735652711457458371106018714478344207569433729451, + 156830434592943147085468547390780741347256496601477038145319827402179166709216822493305405, + 70710861484101636324557573319471369512435801444126575332106951248871201083558233012021233, + 818365110646299841273815451255958554947187552642046326606118764960728612819697191364777831, + 717883830902237495191836402881095946429834326759868362465505581483386635297556703604328854, + 531376073543782845254900200801705874041739894546309337587705785913799690206093126988178493, + 259949507732584898093565047719987147514448359113177157374472890641509720544211484967253580, + 499568258414188990326319917901310036328183191972908167121598990390873444627074544530731863, + 541783125122082676247412527129640947949720371159530880280540217200400158743950768014176756, + 344771378909493607719958523916538119082901722884659947645536319045874146472580064587196549, + 259996491405894324029357566833803819805025094558181727377441653293231697110783902459068297, + 854298413448312770138457754169415129611123456291283687838278094433736163094975446069142461, + 717824550058645877014957979204265865619652606509304446493391626048923116733858879538664950, + 88428574071679864951916247235300400944453263725915147044297276220286956274892989947552155, + 542693866270457877799140929894091307628583237678145983085246548139174359294221682355706359, + 243607207867193990923146577904753995549776269825357352971520784291637112868094656222108409, + 416714453865398464082462614281479974475958760429616352323131621315795290057810196897110037, + 324790468969161139607595515153133440657107553708390012535412277604805431215106280066279498, + 317559593509343834208131312114871747725167894452904899377179099727586309582660373571639633, + 502609812511065537320929032146910141130566285244297935293233041119291729696094389666304611, + 34034818996014449360809128682545928757805195636789308804650300902177605745754505577738475, + 243295414936098207538960063313261282527836131831267761051155938988547992845407052475480373, + 480408989077406985994002939705594460446975109504956022370535845172176454743049792186943868, + 332461586507663431282861385087170330362853978843644462998764809119308364493633442693192088, + 376219098797404640028074698198704239523966329965892031931549564200329140971428707598495151, + 192615231423132940748266250059307871224173572430964936841256559162013006999032974626576144, + 352630767513045079012967643370859774392634613480770821712933527079815690078624031717437918, + 915822978618025577937530607431499919751132647033072250650518370487056023002930228539279589, + 78529161617148810038259557845726159500943451749897142849643783837813667623683691988501801, + 97933149335873431502938802876903891212206492508246633297422387262378941228681607836546618, + 794456115996509451699113418499419864666809568820760710348051533939279837854014205047314755, + 205434674185648003331816684511524486326213731117285432559317463611757238462824035561865072, + 375122040263537492198611709896050321919151428217103248271498913412042378435695148620551118, + 577663176001709419065788914847623851019611559698682799614161519052066163818261498212508546, + 730476086417735823033393824684464261542112691646525492498676413092986474743701166160606731, + 9963731516063985693648944142529764105501437444636353234261544759806129078110372116007678, + 197638944998952357572065971903888508878801380414666327004609245153109580741483747242759496, + 860695079709461466396186344373502469466379914861497495754153589256350271223766092150106415, + 222321179175149177864323786110686315613881904196827741152350200016687170766393330684164958, + 117492569346282809086313156632860163031994494694213167436316167431895156570350829508143409, + 938162542873008499356635707141745453123809203037077997784201575196902886750112578717028629, + 700875533582593691067803419206331599581554133962517295574652637487065485966208217121878083, + 846735051980353113397130087382568599144858150214583141165035150269330458538202700013318308, + 465894850100790676209882123751353796298888954511673490693924839000926024436895766962709948, + 401770782680597818174356174134260317796007400082816841282119256876654845548703743686703810, + 788329690035871459365372956233467589800737265008535341143063409023238757557276924293987799, + 27396645570480067225031975515899731189826855659874698393732438097796328757134723129791293, + 270033593975323745423345789456542105121498526530726637271129918764914223868481935054695729, + 114204828169697098791621866458953034399089486877263480106193853903501710467896606915753371, + 784291597829791463423035574773327338111619483942266079860069643829548758618901765308691135, + 335122189084193715032979692628761319226224050019270210911785876112137824830261419067468985, + 944288694519117898441677750775011890912608660804199035892093571162093539647786016572946700, + 791164903516787981383691646734747867973107407448676481960319672360581942826602107627541578, + 628344241860879020448118499186834925988796424311748914701993204130738440714411141317137801, + 73622848034283569163648214183115101285003369368506334085609318871330569757508455122611200, + 39673135613873870349004660684364581665153557930694659313087374660018210589287163535856108, + 371585303059315914737630947042727783343851901456460641704346735613143673391310488599143709, + 556259678813317672571401386513676030623773552398316837754703438971454857126537307939587775, + 955273823918919745617425027703682668515891237774360002531552437960196254074001022793662159, + 879685595322328862138638392791523642114642092319810134741999504966043976823521441207437333, + 830357671166650455739173484419545021318423250765428938562685079537855306569654629914901986, + 839056168644388734063068929529158272927796360516146785044324344075074924707557945413288346, + 156456996917255157214618493528545346233496824026205745947507426067642887129621205519479162, + 935717417449149095840923025632751775799814967466076838455158022899410936108111893954156489, + 841577564898354483874085049065001646302908693253949723093816064296095161160846986877885002, + 33650684886355224832100209310648108665782012936612788677590421466269907634052042476279385, + 711932488319635916929365345062457681843641504881523529483804649913614708548885297175580373, + 992198871273516715036074125892530546284417343777046104246212261388917108108523906633635638, + 581601979286039860446015135480883816593159203189542406181453232615067876895310461745323392, + 528899463964567373555808499255508958018868908459864944996457106472508789905865242794652977, + 533451152481337954073060282545294449086001420789453128983674276046225555925654463849685720, + 82796646149274345266616270524277342909416499335515429212501551187050368290370558711359185, + 77917194292878577361908175302850954503778668293247199043834843993518770663637750920202555, + 995520667281770367045748870234890187664935988296927271857304542646428167719216480249719405, + 902601674640144465520893220104508176601347144655143555044274938385331458163895284547252860, + 711534150822393396609405515007367174771701283436713964858632679517047782421864418601886104, + 560035745566460709533857579410294526715523490348906098822087142454230455543431117087972781, + 49468693797522675158371543136005993782558048633997178566254500663866999695174529454471033, + 643348972277013585420383573374777521968629082172320022548306319716190012481129994750330861, + 22493861898994125401138843645423111952318970959129184011773246] + +/-- The moment numerator at `n₀ = 60`, `k = 28`. -/ +def Nmomc : List ℤ := [ + big [ + 170286432414455951789695637576773076251981987653082435682789023922201695661342269657579520, + 1], + big [ + 853132227638968345810373894716982569948168873404615116417359810860717739312619187286835200, + 11], + big [ + 22815731756508642689831102863982916416594069819725590102029365932899463002796209639260160, + 58], + big [ + 815567094371205658931113552441256106924151231407132489408531795201069567794618241478819840, + 182], + big [ + 560582481164515501190642053847631215351907693126034879809505342337403716742800489127608320, + 416], + big [ + 193666559325128610722600535876492176194481369442407411584955252212405620500154322989875200, + 731], + big [ + 421134665433615302875962384422413802394377129892241452566628447959688182048517571823534080, + 1028], + big [ + 272589271964378955021737481264867891857069049881617890059909601764629171797757880518574080, + 1190], + big [ + 256052114030146807458403214966431694558644330414677974304942659972443508920716626724126720, + 1155], + big [ + 479346658120665880369696571852064857018917515344141665146209579746393611463926607312322560, + 953], + big [ + 207830498922381958507595831741684682254221579363672024399374543809341355858349278332190720, + 676], + big [ + 352025805861074094000476607341548080203273214348349035994903989490102795682536447016960000, + 415], + big [ + 284586926015847763559259685204797272792996212239113649705398029786525276138304621311426560, + 222], + big [ + 107400109529363333714290166443331713617559975662767710310394176224276260428361140682096640, + 104], + big [ + 806315815453039970466175363858744023499663850690826257659218397767159047121092455453163520, + 42], + big [ + 484587130015826510620475753670434514823053868166282130612093732223312844808574197898936320, + 15], + big [ + 933632766852337568064503726306076245696782117833492612263493901480136109079371431794442240, + 4], + big [ + 385051180745515718354824683148078303485336998392291483298929805445279908278300016692428800, + 1], + 342485983618483240121105564999418583124770087828935736340773282296474207933732489265152000, + 74521567545772057724284314690358351312728462412242579409096818585101716758985466865254400, + 14248640106860532047337206914503401765908609540977663834445507048236556089651673882951680, + 2390145052266278719103705252893292885779509289408596229349539156458433537547613115514880, + 351282651004339441206562719871845916823301550732945224436793792371832424658591096504320, + 45224947711080341481323884551723715618989400712660075265582491332704807966543949332480, + 5113599277554475008017984059592424686546264734571949444329428624752903329099588567040, + 512772619174386190658034320937411210943929698445544285472252768051704930234773012480, + 47224607902960616689257367771656094740370013176983083565602998263937920665565265920, + 5047588645718186878806809790706355913710906302153503198241293354455609056910376960, + 4110681382610715550040430216172251363061305614549492238237044955246396140515491840, + 162254517327913801966574253754183021775169349075074064782800693868060768070533120, + 6410035955429517302240469566936907832502642984738022902856907661394017601454080, + 244703436012952439936963434842909882605185691673134240301466731498394028605440, + 8715103746175843946153733020144567046580869416192743459900421830453839790080, + 282080628704731770799219916882347846009860544684379124890520840491992350720, + 8165135106103872947091458198644192347973620375934833037260213484844482560, + 209583571930883727144773859122010269644571091557068083355213513894133760, + 4752172440547349711407552507840510488474720969675300507473134013644800, + 95060146879397213299428640870002805484618745923394301184350177198080, + 1677319639955129774576715975414788668321403391348223837164451921920, + 26112500708140543271228726514701351923739019122286985122215362560, + 358725946238751992541257602569091993554726647290521421338378240, + 4347748928474871198372952457611420161334541639581924589568000, + 46453273127183626824441225413597533459847646068387579166720, + 436891986332819582568623838217786187580556866985478062080, + 3608481791692616266311876708641658544058532343987568640, + 26086445581235168445312170881504253921505970099322880, + 164309434846190739113766300012433387191921625006080, + 896252793779203781261433397104132999540658667520, + 4200013124839748839442133073942359097768673280, + 16732436083963174669499692344452384544522240, + 55884121364313080215033170436819915898880, + 153532733129457236681936992504475811840, + 337854979644729330784806813491527680, + 572493539264678877330157779025920, + 701253310425317667068927016960, + 552631030695071494680084480, + 210389079328329522216960] + +/-- Bernstein coefficients of `17 ^ 58 * batchP 60 63 28 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + big [ + 474040510586808840787890340775258145080714828690202320917714391158872612427242873804554240, + 13604050067158], + big [ + 625716889069539278289420337710394386453015720130009679804960596838061948252331531682447360, + 3032302830922426], + big [ + 511570386934519641919891490082078410973303310084257184043208243491309214852695277688586240, + 328922116314067849], + big [ + 998663454858655096713602852366411289198616440171498266463474280586655324937349995366973440, + 23137228535463162446], + big [ + 967689491425441393266283731291719199319688062803359587664038984432363897679504958554112000, + 1186627234478829043686], + big [ + 128883595579145985150119824256283022155085618182236952426684227109716240338366397614653440, + 47299498204756205709859], + big [ + 232340499320412056059094942631565517898775022754803806598962718474037005346400181692661760, + 1525400076998557356859650], + big [ + 96963920539065911434880574619685178826852783087479521056980763575862462990014611414056960, + 40910848029127344619506401], + big [ + 92570614710728694944265297493702844977099177820023303725345925632345901354000536819466240, + 930838726784842036570153460], + big [ + 696106750369493049527651568154490219960871039492894500183147544610273059944048202507878400, + 18239829484313348890425229584], + big [ + 911901756322047552579684113088743425370652629820375411448308965436515285986893281949122560, + 311424607695702988081084406744], + big [ + 188193298128267932646734798399664060091001989681056398455735033233623966964324304001433600, + 4676347950785566122702247534800], + big [ + 93632980728259746444184750873245318974421820466809619716615368979376644668046682074644480, + 62222634878931486989497202196282], + big [ + 973372910060364476569889992334244119449400556607646985193870056936647217623275838080286720, + 738170560486812280148636191465321], + big [ + 547975501015105827685939820244284289320352995921143493178922262576166086014846891143987200, + 7847886368796271129038244185686473], + big [ + 606898396026772327568294866754066092973761932861971585592740092750245432863368731280015360, + 75091775918011797050924780016480494], + big [ + 574555256159470187788381115777415007227296016312463118986161431078422896893394138274201600, + 648987116351041749363572272054029320], + big [ + 617593377313131027462014357503328516432136933613374891955072738101009917163825253601771520, + 5081605973867613328064538763638217989], + big [ + 39272504042649337275944458177725720192008725694206590099184208324575922594254354403819520, + 36141128681754364588042192829001107496], + big [ + 146268895273260399009763149584522828184164937716555991468143586711146241641980682357964800, + 233981839871194233116067413988834456985], + big [ + 861516538420251851429468660418426867930611371558546939641774411844590973275941928991457280, + 1381468263476207696390478427506477854289], + big [ + 191267634639372347637153741154965228141875845343084914143801853303305014358361367128309760, + 7449922763152670284516804046671216338721], + big [ + 953353069037084994130204838951915154028701647758314587039396696821556170447439205645680640, + 36743482953735197434426844091610503062952], + big [ + 159589756688046159935906118289623450193926600887532412665681626355331528886574107454341120, + 165919562180223005164821845623172710077307], + big [ + 218932962810558171092543071229218660943670034604968187515736654698022931275403363772006400, + 686580074128763709651781779650216163369865], + big [ + 327691928826376200420770857733283094475586037020257299420833448991010565916764885504491520, + 2605400009140153808859331223260128962159333], + big [ + 871173820947592087550446056300274816151881477186101382562882602136719574574656001985740800, + 9071801064856866426131775083104276043053918], + big [ + 492641901679674946739004042779953569094264726006662365586787326949766578136285170242682880, + 28995696431440311985753810828870472295312772], + big [ + 60642437449371878686248399777312505856053849639560148535372573037696001656917829342986240, + 85098610100868516119091468490693494643909768], + big [ + 648935285357973181239891308925862183751089788337457264466696260996622446884795077728665600, + 229368403836712431726028295105885403294504995], + big [ + 418896311368727283745561574213059622121718392290807804825507509531284428311456713990471680, + 567787055628789951486513325750290472600704067], + big [ + 115829262541552118423731802195353570421218686847876052674118402916673732586111265574748160, + 1290740078086727641990252920234543720221588073], + big [ + 605250837756742314733351696109784763905670828750667053325820605877349329475245205304115200, + 2693950968162634533188011413550966900511700241], + big [ + 229808470040114710446617939951083785825715960559118680617410649254397013858028628549304320, + 5160127711992103434711752677674371965888400471], + big [ + 335405582262818997251121377748714416864959121786646563580389649151266047947905782985523200, + 9065431171820112011839949727302720536148832537], + big [ + 552825219917119249934284729662481050941225595235564444782702154788682392681449655705272320, + 14595370669724216461680681920467151742331339712], + big [ + 648755276521100971630113728178149447506709062970339883957676713932408884347688874210754560, + 21511766129004372033724562400741728273744145025], + big [ + 916195781145623145332882612799625953661721435659558442063647842239580267724631016189460480, + 28986328472641249699030185659356540606572502853], + big [ + 605403580038218472113835137349816630910830074321480915483237821628404823965453862830080000, + 35650725654278127268882615504831730370127249755], + big [ + 740749187417825818082591338189597586442968565205875861933376771889101774460625940696268800, + 39946354730704588892261766207759981366176036609], + big [ + 937362424844637035113870414834545879085674843708551061135000565089913046447942958925742080, + 40687525518072133855983806666298690812785244150], + big [ + 239722850812019007927661547827580178202906082128373227068446710807233684283548748690227200, + 37576591594838363743967111471090409894153336172], + big [ + 279236645571292809901837598535589703279594342811627708466359508448961965015574468079124480, + 31374735420943297440757925001270799767625954996], + big [ + 687910986703084283481312550124742823746160574942972153945193070835087115702143544155176960, + 23604623038471436783139568979917854551594388122], + big [ + 599517782867584713099178078451557147542057884361352053834462366458773904964516944281600000, + 15940214705084884011259248104643495318512354162], + big [ + 879384549554294650531857625509321101525044894776895959697114262063885804032604836672307200, + 9618934945313998824348494878807587863617435292], + big [ + 581864930446112706537395964493419837219391827298147724559661906968018137110184352326615040, + 5159593519947583033665633933604170313503481449], + big [ + 416899301103358301500908913996587330574243228674526371140808365621246162729497041913774080, + 2444865621064313287243642066691786829962974530], + big [ + 462779957099702919453866357456832829242324672033319668528450687831949694720748025639075840, + 1015766643725366083874617142499554572792835336], + big [ + 895637176915661740471027460441874147098231685414617636264282334829138522982378803455590400, + 366659026591972202147386588032585781336440792], + big [ + 222012280871871944755885442328939233755129944759224880032750735572070278970023397598167040, + 113690461700944426951572562837855596983661114], + big [ + 409994373690790147458504990879194655415458306018026260189264266847310626359932812242452480, + 29847249607884208437272642224141705241885479], + big [ + 843081200106082603315890398617691090714172235098768386789932450218834782115507007872040960, + 6510360526824274164301181028887429524430903], + big [ + 663993743906612878050457834394870517140926337474830660991452863067547743992517430828072960, + 1150077160240572767023862124129602747210404], + big [ + 940362699284475673617833333191230438506676020796580801100198862876957290472295273542451200, + 158674545582799828567496424812880122015025], + big [ + 933023086549093273705530660287035010465201562614254547300744487417389121582098077261496320, + 16180518968681993901412376422095986127701], + big [ + 962286673450584252911227839532695544056129627865688456727769577333832494075625961852764160, + 1111327159272739956074436483718149597767], + big [ + 364290669651060996315376062864341199481682470107343386492671279374040760307024957485875200, + 42670055443475094804722555899679876357], + big [ + 648739331448264565548801503776620152314971902961141905361105333179568060768606032284876800, + 530728061085969433856886146508203256]] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 60 α = (354 + 53 * α - 2 * α ^ 2) / (118 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 60 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 60) (gg1 60) (gg2 60) 28)) α := + pev_wsum_eq_of_packed (gg0 60) (gg1 60) (gg2 60) 28 85 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 60) (gg1 60) (gg2 60) 28 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 60) (gg1 60) (gg2 60) 28 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 60) (gg1 60) (gg2 60) 3 (by simp) (by simp) (by simp) 28)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 60 α t ^ 28) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 60 * (3 + α)) ^ 28) := + integral_moment_packed 60 28 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 60 63 28 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 60 63 28 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 58 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `60 ≤ n ≤ 63`.** -/ +theorem finite_range {n : ℕ} (h0 : 60 ≤ n) (h1 : n ≤ 63) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (63 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 60) (n := n) (n₁ := 63) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch60To63 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree64To69.lean b/LeanPool/Sendov/FiniteRange/Degree64To69.lean new file mode 100644 index 0000000000..fdd3aceeea --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree64To69.lean @@ -0,0 +1,542 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 64 to 69 + +`Sendov.R_le_batch` bounds every `R n α` for `64 ≤ n ≤ 69` by the elementary part and +moment at `n₀ = 64` together with the prefactor at `n₁ = 69`, so one moment and one +certificate serve all 6 degrees. The certificate has degree 62, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 64 69 30 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch64To69 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 1182266884102822267511361600 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := + big [ + 57506311493896185948717579976126833046728758532500717201250065630471887791651588092723201, + 360440112992905200430070440542682349] + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 166305476599842365614698822052673219170584451615774354401542656636627248447160805230641153, + 73469574061778724334926151605284665595540084023553089604407691842399284136091467722285220, + 322012547254834210077146560833177276176836344880728770326222995969540222633829694999204039, + 207978673168884612805785538547853269913009773913125771010054270252655075600144183614835864, + 480853920321758193440691834692811740365707438547934625449255765194710945496537003082192216, + 578396942634057975326768937442640054814641521629835829527168892004435336717743742657200859, + 769508910055418041039632907233416680652014335018553990116061530045421559780891632691134803, + 183767144445379831201929263801806287580829629431742813799896222355730490094241158529104911, + 346089335720055456125735192651470794248045670165879830906392734484544146356602011618520474, + 995243529758477570877984827933190435758250074297146297779886063220742360996079600254466756, + 779072197713873768026877173527339106401810800534610529585878644376492450212265113195094052, + 419034735898416660055778225159974309967698192482481445451742117912769975979014419252809304, + 441755306142591890141486086826125006388774421288997359796029361283596994855468740212716889, + 428461600549128331438508822190773717609188040045945208670299520197138998934881072577550483, + 642711526547748887099191893289126750039557220636011574507883570729501527198394262715489521, + 385909853672789777462708893494037373473152214078048374964289353731697685144929691354124107, + 506496978001456959657575447334323707202153503614502460150137223691285799211978770543782160, + 964872983889532106151251273380821464266978841395005139642317754586107501817791967527598432, + 438547934418735321853551169563095270831207338233492644580077094851294530511171333438961600, + 890663502964483364927160717433432271359600766931210141705424104233402412706254976584920679, + 884521968880645191049658152469047887326950585514720419390675458277323468200352839158150748, + 823516367021443995599204749614171364526474569650257983834855109634382608095622995657720587, + 200603722791913884304694472443865707460995809674729876098003243997197080984291222295799125, + 896134406581518158794263831929671497295779163488029426610881067167787548625744373301032926, + 762240186942459045130267716785728194735569176614550481816935627226194703358618146111415607, + 649687666511280250365324842051038440501489794334701914679489517522666540576417783947115049, + 587494394888412194947728828801408615076610835659971331817384900516114524405003499995777841, + 876534125227933601263090914745711766288221229328234138277057654102814380726627307855077741, + 503758415910831438829363256685714068501123326755563627057581359579633009464842740828359439, + 886184371632717128638214992661981882148923686230834769343682662798748436054015856840935174, + 275487180272808576863207588904758973618429573825244421564964244920780796492626486366036607, + 542417292377017122952238795314501592757367736409225844699210463535439571818526035586063636, + 605824563194906818326190454599398797457312134154214014380168213262064490120970372496122053, + 219694475767648551686322774116194191065701424519507017438136909690756715473359517641216712, + 557241136129247906745084573538474241745353040964380496364242633217038965316389684131138048, + 264251797878694879398651849164574833436569716755738691135694751255687855254750960527061229, + 882349049233190854798923356292226451407298161635685288774027142117091360902330893586587578, + 827178415111059320893720010085095669605968564647284501768324257689307603683750717091826266, + 597125136835329296593860096129294204831951111845051056378200037987980930231958496377100686, + 783767369876204837236045042916528158579642003456138598673569647992450797688470071607367391, + 372787669944758463176423307777212957855199633287850898339567142655292640161978316495388055, + 410832873551518815623953523316096846005550437869228247861259149079407298309994117887130623, + 131353868464957584534612755974931409485930272243699452262693625405665098653909948686404651, + 489800659511128797786262437728590005547688268248674957860960388260128671321439937893198767, + 186820501276298667788073811868909373965558091956049931295441719913131951458203677777632040, + 168338940545958498463780641606961057436514732163563369358794901608683243929416554516743736, + 101406229233011374819834081701009636718299335216310649700464390339829724626605031953222739, + 692920943051813642498865719355866456026413486276891732363230403103351727516626935127905780, + 331181638220977554574763268362212633568865443587595795133636072569260931564097519140490980, + 189887097550188215584515327497154671297241902899910437949100324110498105189771464580629848, + 731999204464147445514401110533690951627624925088862416772412579827293714309955760055054248, + 579579765007553773250126726506987396732835154993255194095616441951523176357811676066827065, + 850079584479023878678661842110579286649175747509897734518804727315769047126095580301362008, + 843337948122631068287111234752146566031821241128093420046209332668445964119272797854371739, + 563042478363049045826238594841028333828151232813643984636659156973597006754488946048212563, + 756064844293114091461541376016597154254990647770009934223958533938747560934690739706919685, + 149940131862006966309685891788961151026289263893328467891342465720110259208514160911317685, + 942995035528246616123975086778003437122601867743785523597213303235491404922312120882731372, + 947871478361725823565164488592904697778888430511527649756082361426497173603588979463896789, + 229057398222955477933834982050786100368715756809407363558739374679489306663169787634863580, + 433246584860429551384028503462161422455755660862315602355078608743940127525053229569490908, + 960465909915701072077162411489121395025155951573988777805969982511217507249267988912695441, + 45908733121793178783916800977480771792160671156098722534282188053136439777719197748786090, + 328040145352325050748651615437159230542793849207973113650822702586510504792971149437546324, + 747835388972937849306097908287751875315416696586078409817048634537716530606653373086388659, + 731303578995042705838060533050887020239421905505686863966507730314949323260558978832552128, + 35538423985146555343544875480453324069486851922617087126153082728540596123906219530965059, + 481220722616086482595377089697508623199141528059023061042079920357164742935264996646774416, + 930701937958405790219704780784393465449765147097693108128492303862572379655579177250915723, + 8314100794088958043169189635274561635245601830888714609468469155922430219816935991695376, + 288150125124311438994920459339394396275329151940386718296888002928580229613950938169652046, + 487045803366956891838260990127614871437463455296328113834344420636372210079876062984810918, + 108762696725574822117433419941782504068308445681632913400374669040794966719065669872348967, + 43313237747061045062023664698570959807433810763110528364914045379466220605401485196760407, + 262713666039804174960110850777590169609997054272067501248021502876927351642635712955278773, + 448097132497108709977421598586486244523453040224507764238989125433490410013363617019494521, + 52811053867567341836855111989159344133735874526738975964045664865906948680539427850834274, + 31488285497807474120302543532671989633629801869900539575551957210255050878199044803213142, + 322693331861824023218859615797466584537192090769366015519883429505329817721804601738801417, + 216785297266332388793980078835637231971417688271311579691662648015943766821847325196653836, + 332985811523605089735396589074766570650775082683824782059398141709610788757814492135672466, + 400926376912917608274882904976019346646415071838904945330069659064050769366136066965042514, + 549575195107345669829663789368003851585175937189589038912917388507451191876436718971140232, + 411944557559853343215172185925720355937737561903170913428093690945550476088317027242270161, + 834088160684034238961856279675893127883458603997784966352907487747666449396001478636233928, + 214467480925027521968310209281943031712534698480447355120770969950758758243164776495041949, + 446409500047986182615469201101841559346079595419116094177500366260455723892429406628425372, + 216705988399029336809228793769613209164394135828909160755067493004499820431574139221105612, + 149539088560527736781097911095174294499359525244542017380362650638489759644137435238194845, + 747858291790704746170637656138712084186237928729099198317614425661361651476532903882248066, + 693957084742845668369504964646470903394556977217419103657769167798647304141464332594944482, + 715419001300437580925323826823675483454596758462465143117700519027891411229287513591101326, + 62175511594304576003712342013665097207143480251946106305947697124772263623290130641482369, + 634785901615849782535096484239509341482158934553629555720498597591125065612988483224956145, + 856448150106552595410251005579044318064331630359110041704635263350548950876919370835458192, + 86332960607034441719422584863453102763584972305025706042795252815188852024126035617497758, + 506734429280879323990815105959288087199313356856898255912557853766378622208403867658489966, + 579341272045891785547365343445376534078760811171610151502917484210340231293470780837235120, + 298652468166017324516679226418180147499923676177450742087540262238264144681227668205440003, + 297534844587371811415803720871323643476612752008573275830860113922157651208363087556530341, + 719576212781267368127824349388623874411593629034170443624862465614565573989940554118404435, + 144097433386331934590187240793982787964571178615891604778419377041132902521936220478110172, + 726532524112113359062833665758049351669026093637757105486354482998562012421449148374957546, + 778221091590266647972198453316253940891578846563932437156350380345925216994418679281138054, + 993498177731952178806251281758474658757856893188996499112030040160498253322277760271921693, + 931491569141034710934829720610173553156977091778121962451591182907356673409245993822270439, + 708167252698616488831836297755232819466749734110689113102139123796191653285097797657573726, + 995901755913658427612327687072223807508558118408827764726313553212346265089230314281023786, + 478607262361879737011733887447700618447068293956968666319730513242359532599398287054864156, + 272784897165861553800074738416969790024133657899827595047172589345852033657114652278788023, + 711672931257038579756226964749454360485437594557190649600479994193561991175400096972212266, + 636831738640031652687944590254380647741187106249802625137199566915975357209709135813018316, + 939268636042051599096033337796636194723644310800328541646804263256752888392375722859525461, + 776276116313883344858144832947064322795840411962834794138573400185119550562602082346961850, + 186825085909483796620535279523061287423792880082149444642966915102775438123261152539658024, + 604532690728494764825234700134121936644422536554639218399726263899610730863948607558178871, + 665248136291496859195262665425616102178645840988583937415381880118108883614971521160370643, + 452136585843891657280332176434684724853778044133149083090909530300625843701530467908365731, + 952688912226996819607559455910322090401799985957075356001782473629289889080718430004801494, + 970702390167369511003032058927626659893272013226414423160143094825077648124307534110975895, + 887767376334547891794637327963432913268729586877181879769806730380835260384589140608039643, + 875738134547760499225810117876509028240510436897801570098673988519994663076759056213298744, + 463613820856084162195241904702238073703534599995282137360128166676294559706217777247407822, + 481531085890164151964496393258591175191808601188299477604160464231739905753127133372544173, + 204116178378392081792438855100733433169590130448038409068154473733539634666229449026947859, + 2536535024120751775978859240702903886545696349156301257598266799449180110855684135045235, + 946395149605881624765246445660393662929812512772773078414270145772732508472599309962618737, + 612112968315221187644159823155325868920603956395389717787364246891581758568219927620415659, + 14319] + +/-- The moment numerator at `n₀ = 64`, `k = 30`. -/ +def Nmomc : List ℤ := [ + big [ + 66110477984836116462146975177565987674838144210723047333873516205794578773093226486169600, + 98260444], + big [ + 243108287415662968370546360712760481526758287324382528868529663372377681282862475850547200, + 1059901599], + big [ + 454075868420675150363631640995433612849527316895704103204174810822008488047143002780467200, + 5537147441], + big [ + 852091593634716817012794295370400112287649437897097835276054090654093795380018744708300800, + 18660582924], + big [ + 933473192722993558709977069272671518440136646314470586525781099802596768616798002505318400, + 45588121340], + big [ + 742929378199716691138181101926893579160296153280945831076094109300071526554012228989747200, + 86015714127], + big [ + 20557509552523704074049102616547768111954289642253523482455826059845317586712696297881600, + 130400663242], + big [ + 459341981698797080834235361099672397517899366686895608450005492563146095048479910291046400, + 163154856961], + big [ + 851093853909466445163221898838617915115326143353802869283326825780884545941270906168934400, + 171734412525], + big [ + 753262806540143355256481511535569273495821620027486109693445050078377812928515446669312000, + 154243485736], + big [ + 511487459786992900768903617340541026760048565599169056161968580492680583648873787739340800, + 119482839363], + big [ + 309593522685584039188524595161119593641781704530570496266026736240057019377004505045401600, + 80486067444], + big [ + 97912163642717468895562150541255176878978433900754785174246253557258315961217912825446400, + 47445261414], + big [ + 52627616760673402394682976106695261407043737622705134322034834336046805996897997894451200, + 24592991428], + big [ + 432187185892878259814765112469774748309744669687439554991414399200566001750620591724953600, + 11249551310], + big [ + 851131118747814512748665373354721892190504503484760746790134226938942731060995350016819200, + 4552786272], + big [ + 873191946267719554699769149805927033950058525127323442638457689685515482696602426225459200, + 1632917920], + big [ + 293044006011905475394588413729023773768568962276869289588621537186572932009604228841472000, + 519494077], + big [ + 958464964473006027849217895557838280878302838003394179882409726922386938761247520613990400, + 146622325], + big [ + 936120983062608613975629834154621872803663090203812010515885240372915000914377872454451200, + 36695609], + big [ + 84841340184075123584755171209197719716184720255379371645779622031931243289158571419238400, + 8135017], + big [ + 886884790981123526277152511114598686701776386072248663152222450750620490133440901310054400, + 1594958], + big [ + 296223312561829633547334385619844997403541153117306901001314588576372000698886639530803200, + 276020], + big [ + 55832403906229427095816865838885022714305289037556063287772031513213663564249900567756800, + 42075], + big [ + 146264704638318872755835723034778966329320013079328680781328157305507352103580558426112000, + 5639], + big [ + 25551260323460136672941631545776626738798462800650174587843453045443789065964400253337600, + 664], + big [ + 828339141471950121676658873040971153111493277442865689468591283139001870575273109566259200, + 68], + big [ + 333242342186879103842537768204819142410793140394008743101656302035709342572929782854451200, + 6], + 534239900114573058053922931610633427495257705275805409660814160443325003432490416524492800, + 52552683203010488538585297092480031922870899082101312102535306268256626340584979274137600, + 45866497973844810438612906601484054625371390298152941823740438892312949725775391201689600, + 1676609094888077161899473374771323071273070705064612265181308114970184551921624494899200, + 61858859358876104860202125317306435943135156666141618336128656271596387800036304486400, + 2238196207692148030795300468606624501792069185946154046002444423956466144480801587200, + 76828449341252834667768890161773151181544355052705654128899471477578018720002867200, + 2433678020966848222287649601414896077079695416017444790870583794233963596428083200, + 69828177033469716189246260158705146561740783402037822293087263285143045931008000, + 1795322638213067815875997716304812008010943589521272320410099577292746391552000, + 41136536106768394444089514532129975109256117360982200727079663128246275276800, + 838070594272317175397504932908214755224096531721824051204009289640103116800, + 15171082727373776290148510116667826888444973340561455516610347033794969600, + 244047271283364020096974778009849182007483289567547518419984314898841600, + 3489602396284278390994409823135387238224102250804687208220198961152000, + 44359626692691824750065673460856777312065925727907293481802924032000, + 501219463391132951707172104573182823021554811193707277868387532800, + 5030436992998100479993695417466807451714322656696613723124531200, + 44789191277478329073798895579142843637056631313972754959564800, + 353083559840751507181568279393958662612462597733909685862400, + 2457578012332105308479058728572791201702363926607849062400, + 15046179757888608782521069180149666281786217373001318400, + 80627522569971754037391614443795802249009213472768000, + 375741162250935957975313587598497563629101200179200, + 1510204426271279572450457959315051060438813900800, + 5178872360835964859294587685430152138430873600, + 14938473986232021216928582473082940581478400, + 35555676657067884072777222854288395468800, + 67980454508376523397624348199931084800, + 100355593649325402804858377994240000, + 107363886921106370323272223948800, + 74072390919622254520801689600, + 24742531356953776069017600] + +/-- Bernstein coefficients of `17 ^ 62 * batchP 64 69 30 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + big [ + 378444517412801962470552224258131126189079872984919975032643023063709300541904356219289600, + 1912981719685185872654], + big [ + 380670178534689006133665889908941756539054957527759945907151609964906272047534122519756800, + 455727310111812438601408], + big [ + 99522743130282795550243656800596118649943134322463622707873999693208408575156456259584000, + 52927897062282177819124057], + big [ + 145051640445550637231097744817030006392841875856271176058062946854414576614199467914035200, + 3993595078644769712083534428], + big [ + 683118205933761645755400405587856666150495094534918441105759312420980130960940847857664000, + 220122587053640558486450726517], + big [ + 998174388267087919067457732689360537013769005716534931989381009215008234548143450593689600, + 9448806430046879185257443099878], + big [ + 999309025340567803584014497294498277395035941499310126833933124008647213146594214936576000, + 328839911778462066515467246758874], + big [ + 175814342034084584769678556178822038013725790562470157879108354372428198287372570538803200, + 9538260825040010862968302001631636], + big [ + 894104778515360328482819941427052005747002621603384692810390696291825428051397252743168000, + 235247943543440862225969538977457738], + big [ + 688954567499318900393779227181729693647084629837561542760046940388666029849910382795161600, + 5008716186253391229595822480664539336], + big [ + 937733366538557013823531119447659487595866289586342122278296215513059684226926220463308800, + 93151746291572078943999801170473397268], + big [ + 992244218887867854917664784943661086221356669402673231725895045968774872932871163399372800, + 1527572418358727689022331139189514016988], + big [ + 466301674753136871528049111196607115656214052557031805185044273023484665817862186939187200, + 22257317570301669479414793189271558326289], + big [ + 472181578863513190176376280422393316311022835100329311013916193727136101182485818454835200, + 289956464423640834183582792301178754631091], + big [ + 909563164750068345362107604392613199039398330490839674583963006707032227872165251671654400, + 3395110819149709951381929134747564653958694], + big [ + 410517235172117633643975815413891537585642362456262787330849582770702452121248249728204800, + 35887662200836938114729285867644926672215317], + big [ + 678528127416758156661269199280651341840320419132506217274679045296113190133363733063270400, + 343732886415512046894378860315829729310324972], + big [ + 984950738610868291463292662473554611658387564427128472501969489948409298020501634940928000, + 2992640475475361832990949209029345831732356987], + big [ + 137311129278895579235742414290791423425292086230462803915399014552603415305531589604147200, + 23747454744870104189058370768547426288730342551], + big [ + 185829762848931412186585126060990742088096093975459791028405796845896794641336519308083200, + 172151431063909358357991132545029397837551137234], + big [ + 559047156386994516655223713076168123680423828223733022331459911433558826755409933290700800, + 1142333769165024370680515989471941737835762900520], + big [ + 415259159840966070324091069668957966167575302742567972105578890831167049304028769314406400, + 6950213863741713552551311888007852696976217615119], + big [ + 232941690454703035010102248908833848594873836648531403766575073983936258141089960034304000, + 38828704946631083882449973832070329526254814218553], + big [ + 827558481136307859841675266022163595779352816207217309139252357441149295373064057598771200, + 199430033428083192907737606066718798456447538806889], + big [ + 936892380807096379637872578829149479342996014779951336966773734286236810741318505673523200, + 942675693741128663300827504524325914398850053331996], + big [ + 24287148695152111170995114705995865994338692819231579409160269443259967723368541375692800, + 4104370314950995520049106379688788030135870046683864], + big [ + 574664753260201655997314012048623448519515151864863321452386714344861801156132144047718400, + 16472390443933708058706482400598515161458822736282752], + big [ + 760377808844450262911244116878776005490979529817265173059126870337676291694875586120908800, + 60974372961779260264372525278747911699591850949651056], + big [ + 912524788280755227435490440604446125968236715491083428440193887609234351035839878162022400, + 208266788773116872379129476161128799715475897190567231], + big [ + 304270156280470835632597166564368024429021836004070616575114024110756178390455858023628800, + 656639003661483800510110894001967078606317380927211400], + big [ + 786529965502723734605588098293527441464388876605113187070802299728925406785310296532582400, + 1911494587589591977442530068040180996542195807483451397], + big [ + 920433232754544696453540343357879705341916271446859456033171512767337547154335110633881600, + 5138314866050085198464035345787972511304202597970355932], + big [ + 428399446551289063434319356345320178720916959645261169169158109818251874608421976984780800, + 12755207261643200737898481309639866605393494374244526532], + big [ + 174549331036164310819545166067588248702633973612989264475143054030587360058189374763827200, + 29237946277167227310319815106914628798983337493479001899], + big [ + 116065065679129924414987807006305827129833824756108147062070744092719381035781312426803200, + 61876339430943195150665902713325148543048912071086698074], + big [ + 749984083446856661159130956098544269347252140247796602952000750359166093931693173899264000, + 120863194590344822809170307591654301506054407732368195649], + big [ + 313763821143703159970327998022739738538896060767860178620363006752237482335400389666406400, + 217805583978701407395274528247214998150867867815511231757], + big [ + 850217701807415119070522194982102337728483748575077944491047672420087466030561946815692800, + 361905681513739621124524318734998977035291143421805862079], + big [ + 933261728302079359385354858727181110664654698466620857930300590627015225856966590359142400, + 554041786053760938024175939579954461147144542816040389425], + big [ + 646232093321541877747774859314661881975072418691432464796248523182401999673907202123366400, + 780718000462378756330666935053127032523143020919107757425], + big [ + 295835746141096097629143576396710397751388390318071469842751865490991244568887092156825600, + 1011440990082960252586797841862250214138031990957368605787], + big [ + 816845994595792816554426438607841550416605479977262250562968010724599933467881507913728000, + 1203012944156834873080016313693483156745683863001412216491], + big [ + 135649585714172760170467095619906294528106943126727841134592434011502098047377647389900800, + 1311484009501707698836054985487711784975987266792150056522], + big [ + 243296329326626005240440735919791770451332312964648358103755714964804527164920529997004800, + 1307917708938926804026050047314599940946967455681375042405], + big [ + 128716008715844726043765857504157027151502510788025691622547009176620030885031945909043200, + 1190572324360967877423306579397172891097264237894213113630], + big [ + 428896364755260437054678047894088009030411799776529506588619398357672874574903342058700800, + 986687048659382611479668935592995330409130225826668953869], + big [ + 58920181396886561445125627375810183287268813922513601795774796230620239961319148198297600, + 742299733942141169425002247898743862732798102484235116358], + big [ + 920129320201158668053016054775072152785439068434951031759693794554639298354044725100544000, + 505236195089261532385531143329146036661604798359183306223], + big [ + 69045052060319152061709208358518574224471606696727883870369603389242417842757355490508800, + 309912600210386532313868466398661166491736082189866557429], + big [ + 698245650134040861296468317645730335362511841552642138313344903302900671338634528843366400, + 170551401018611829041558540938824087526867327128130823978], + big [ + 163424369541798038312676135421942332818985014144764791708775621283932909227084853595340800, + 83762011168694900701005831503581328947535511830617847191], + big [ + 869419796363447771249308511655835743365397845528826106827913015080349897144280328804761600, + 36483343121935823361587547759234571713333028475099510122], + big [ + 760745476459496168299550088298678486145135318753769676352937699082959844097021695754240000, + 13987282276941816971959081594190120510587951813665546802], + big [ + 765725514979369498091060661470885621857356343025091322629328106232203601053179041755955200, + 4677194016131873770499152253643932731352292453639121468], + big [ + 785554316711282887292067494284967437808221875066730179904348084921615170406154946740224000, + 1348699530340560014183083561420039952326078577715357620], + big [ + 71517269596412146109515089728773741860761560200934431349004275073170761442854569404006400, + 330569044331371412580196234127747795075346234464005048], + big [ + 464459198087983703381507641947717938099184392435344186672013453237059441992172631909990400, + 67586864559432587636803278187321309509429900021242073], + big [ + 109862309475034896729400526000977213688084138957934501967419671956405455277799731154124800, + 11237837877300240903987761911656271739195536626539677], + big [ + 998051376924935606240043714295456228866560630188561914989509309607016522699616769435238400, + 1465829751584360975453440388544724736556881400699305], + big [ + 600337752858614869269157032875380590890216339727262295492431992315807988346164895075532800, + 142019829546983383938198324772533901610481232726486], + big [ + 684493172848198106284075964569550987111011614162189543124139201785181886123628635042611200, + 9325463646789679904468477090796188483239034917493], + big [ + 189973879995164727343566185534830736486800567791184553356769303704740689637700317426483200, + 345713730888225214874955918615858092249071060396], + big [ + 599845866351161002827973513692469261580204233855200491464370952912380870457623688144486400, + 4285648121045375358554498048004020732399066981]] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 64 α = (378 + 57 * α - 2 * α ^ 2) / (126 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 64 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 64) (gg1 64) (gg2 64) 30)) α := + pev_wsum_eq_of_packed (gg0 64) (gg1 64) (gg2 64) 30 91 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 64) (gg1 64) (gg2 64) 30 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 64) (gg1 64) (gg2 64) 30 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 64) (gg1 64) (gg2 64) 3 (by simp) (by simp) (by simp) 30)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 64 α t ^ 30) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 64 * (3 + α)) ^ 30) := + integral_moment_packed 64 30 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 64 69 30 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 64 69 30 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 62 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `64 ≤ n ≤ 69`.** -/ +theorem finite_range {n : ℕ} (h0 : 64 ≤ n) (h1 : n ≤ 69) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (69 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 64) (n := n) (n₁ := 69) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch64To69 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree6To6.lean b/LeanPool/Sendov/FiniteRange/Degree6To6.lean new file mode 100644 index 0000000000..a7bf71c330 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree6To6.lean @@ -0,0 +1,111 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 6 to 6 + +`Sendov.R_le_batch` bounds every `R n α` for `6 ≤ n ≤ 6` by the elementary part and +moment at `n₀ = 6` together with the prefactor at `n₁ = 6`, so one moment and one +certificate serve all 1 degrees. The certificate has degree 4, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 6 6 1 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 5/2]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch6To6 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 60 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 17041 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := 23949621038340868125 + +/-- The moment numerator at `n₀ = 6`, `k = 1`. -/ +def Nmomc : List ℤ := [ + 30, + 154, + 8] + +/-- Bernstein coefficients of `5 ^ 4 * batchP 6 6 1 Lc Nmomc` on `[0, 5/2]`. -/ +def Bc : List ℤ := [ + 3780000, + 19440000, + 166620000, + 451560000, + 295680000] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 6 α = (30 - 1 * α - 2 * α ^ 2) / (10 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 5 / 2) : 0 ≤ c 6 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 6) (gg1 6) (gg2 6) 1)) α := + pev_wsum_eq_of_packed (gg0 6) (gg1 6) (gg2 6) 1 4 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 6) (gg1 6) (gg2 6) 1 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 6) (gg1 6) (gg2 6) 1 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 6) (gg1 6) (gg2 6) 3 (by simp) (by simp) (by simp) 1)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 6 α t ^ 1) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 6 * (3 + α)) ^ 1) := + integral_moment_packed 6 1 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 6 6 1 Lc Nmomc` is positive on `[0, 5/2]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (2 : ℝ) * α ≤ 5) : + 0 < pev (batchP 6 6 1 Lc Nmomc) α := + pev_pos_of_bern _ Bc 5 2 4 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `6 ≤ n ≤ 6`.** -/ +theorem finite_range {n : ℕ} (h0 : 6 ≤ n) (h1 : n ≤ 6) {α : ℝ} + (hα : 0 ≤ α) (_hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (6 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 6) (n := n) (n₁ := 6) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch6To6 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree7.lean b/LeanPool/Sendov/FiniteRange/Degree7.lean new file mode 100644 index 0000000000..c7dcd75e42 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree7.lean @@ -0,0 +1,116 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Moments +public import LeanPool.Sendov.FiniteRange.OddBound + +/-! +# The finite-range claim in degree seven + +The first odd degree, and the prototype for the general odd-degree argument. Here the +exponent `(n-4)/2` is `1 + 1/2`, so `Sendov.integral_rpow_le` replaces the square root by +the average of the moments of `Q` and `Q ^ 2`, after which the argument runs exactly as in +degree six. + +With `M 7 = 6`, `A 7 α = 1 - α/3` and `c 7 α = (18 - α²)/(6(3+α))`: + +* `∫ t in 0..1, t³ (Q + Q²)/2 dt = 1/4 - 3c/5 + (4c² + 3A)/12 - 2cA/7 + A²/16`; +* the resulting upper bound for `R 7 α` is `1 - P α / (2592 (3+α)³)` with + `P α = -5α⁶ - 222α⁵ - 2619α⁴ + 17388α³ + 19413α² - 5022α + 33291`; +* feasibility enters only through `Sendov.alpha_le_half_M`, which gives `α ≤ 3`. + +`P` is positive up to `α = 5.338`, so once again there is ample room. The exact feasible +range is `α ≤ 2.710`, cut out by `-α⁴ - 12α³ + 108α ≥ 0`, but that is not needed. Since +the odd-degree bound is an inequality rather than an identity, the loss it incurs is real +but small: the exact maximum of `R 7 α` over the feasible range is about `0.598`, against +`0.664` for this upper bound. +-/ + +@[expose] public section + +namespace Sendov + +open MeasureTheory + +variable {α : ℝ} + +lemma M_seven : M 7 = 6 := by norm_num [M] + +lemma A_seven (α : ℝ) : A 7 α = 1 - α / 3 := by + rw [A, M] + push_cast + ring + +lemma c_seven (α : ℝ) : c 7 α = 1 - α / 6 - α / (2 * (3 + α)) := by + rw [c, M] + push_cast + ring + +lemma c_seven' (hα : 0 ≤ α) : c 7 α = (18 - α ^ 2) / (6 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c_seven] + field_simp + ring + +/-- The odd-degree bound in degree seven: the exponent is `1 + 1/2`, so the integral is +bounded by the average of the first two moments, which is computed exactly. -/ +lemma integral_seven (hfeas : c 7 α ^ 2 ≤ A 7 α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 7 α t ^ ((((7 : ℕ) : ℝ) - 4) / 2)) + ≤ 1 / 4 - 3 * c 7 α / 5 + (4 * c 7 α ^ 2 + 3 * A 7 α) / 12 + - 2 * c 7 α * A 7 α / 7 + A 7 α ^ 2 / 16 := by + have hk : ((((7 : ℕ) : ℝ) - 4) / 2) = ((1 : ℕ) : ℝ) + 1 / 2 := by norm_num + refine (integral_rpow_le hfeas 1 hk one_pos).trans (le_of_eq ?_) + have hfun : (fun t : ℝ => t ^ 3 * (Q 7 α t ^ 1 * (Q 7 α t / (2 * 1) + 1 / 2))) + = fun t : ℝ => 1 * t ^ 3 + (-3 * c 7 α) * t ^ 4 + + ((4 * c 7 α ^ 2 + 3 * A 7 α) / 2) * t ^ 5 + (-2 * c 7 α * A 7 α) * t ^ 6 + + (A 7 α ^ 2 / 2) * t ^ 7 := by + funext t + simp only [Q] + ring + rw [hfun, integral_poly7] + ring + +/-- The upper bound for `R 7 α` obtained from `Sendov.integral_seven`. -/ +lemma R_seven_le (hα : 0 ≤ α) (hfeas : c 7 α ^ 2 ≤ A 7 α) : + R 7 α ≤ 1 / 6 + 1 / (4 * (3 + α)) + 1 / 12 + 1 / (24 * (3 + α)) + + 210 * A 7 α ^ 2 / (4 * (3 + α)) + * (1 / 4 - 3 * c 7 α / 5 + (4 * c 7 α ^ 2 + 3 * A 7 α) / 12 + - 2 * c 7 α * A 7 α / 7 + A 7 α ^ 2 / 16) := by + have h := R_le_of_integral_le (n := 7) (by norm_num) hα (integral_seven hfeas) + rw [M_seven] at h + push_cast at h + exact h.trans (le_of_eq (by ring)) + +/-- **The finite-range claim in degree seven.** -/ +theorem finite_range_seven (hα : 0 ≤ α) (hfeas : c 7 α ^ 2 ≤ A 7 α) : R 7 α < 1 := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + have hle : α ≤ 3 := by + have h := alpha_le_half_M (n := 7) (by norm_num) hfeas + rw [M_seven] at h + linarith + have hR := R_seven_le hα hfeas + have hid : 1 / 6 + 1 / (4 * (3 + α)) + 1 / 12 + 1 / (24 * (3 + α)) + + 210 * A 7 α ^ 2 / (4 * (3 + α)) + * (1 / 4 - 3 * c 7 α / 5 + (4 * c 7 α ^ 2 + 3 * A 7 α) / 12 + - 2 * c 7 α * A 7 α / 7 + A 7 α ^ 2 / 16) + = 1 - (-5 * α ^ 6 - 222 * α ^ 5 - 2619 * α ^ 4 + 17388 * α ^ 3 + 19413 * α ^ 2 + - 5022 * α + 33291) / (2592 * (3 + α) ^ 3) := by + rw [A_seven, c_seven' hα] + field_simp + ring + rw [hid] at hR + have hP : 0 < -5 * α ^ 6 - 222 * α ^ 5 - 2619 * α ^ 4 + 17388 * α ^ 3 + 19413 * α ^ 2 + - 5022 * α + 33291 := by + nlinarith [mul_nonneg (pow_nonneg hα 3) (sub_nonneg.2 hle), + mul_nonneg (pow_nonneg hα 4) (sub_nonneg.2 hle), + mul_nonneg (pow_nonneg hα 5) (sub_nonneg.2 hle), + sq_nonneg (19413 * α - 2511)] + have : 0 < (-5 * α ^ 6 - 222 * α ^ 5 - 2619 * α ^ 4 + 17388 * α ^ 3 + 19413 * α ^ 2 + - 5022 * α + 33291) / (2592 * (3 + α) ^ 3) := div_pos hP (by positivity) + linarith + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree70To79.lean b/LeanPool/Sendov/FiniteRange/Degree70To79.lean new file mode 100644 index 0000000000..6e838a2b45 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree70To79.lean @@ -0,0 +1,615 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 70 to 79 + +`Sendov.R_le_batch` bounds every `R n α` for `70 ≤ n ≤ 79` by the elementary part and +moment at `n₀ = 70` together with the prefactor at `n₁ = 79`, so one moment and one +certificate serve all 10 degrees. The certificate has degree 68, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 70 79 33 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch70To79 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 79211881234889091923261227200 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := + big [ + 742117491270208073267246210781686792718452029143697184594291832651357836033683181115801601, + 3278195267035189732574107128719797489600321312155] + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 98400157496544552959903587828851094122435517589857803219841991395136630088315625933897729, + 588464043534963184236413100857234825357860000051896687815033699433014577280446969497510550, + 502305244364544169422945339564484104764764226356807267251569189759985252522208723305064264, + 219363812449167501108327271227321581477162983820707060679378846055729127327564232139198805, + 925918586378793657679103625349092970432278183634502600497532338168829468196155243532947655, + 365726963549974420202477034470230022021805915854666283242979098085606965846776789225352792, + 650240137080141609515046734086263916207765060120123671347772176387741774012128060720568298, + 248038502259288294146480458412845726664999883453661825291985265182972846003114747628947886, + 764383099571525487134472296250623409228669503130802897829923368695190781729165921060306412, + 46136500242028945126262109984942830706041292467721131680256560333926500839365535596157438, + 627112998354887024910968514192103143871220132626335015152224633142181712850342338792430155, + 243266077669169572830919513572296124437333713669062055745992907942730720399514990461533353, + 124288370294851727378500064410056757115453654474284025642742719446836613312249497946546479, + 650125406920728244806337149023312235092908679926727896651316823201272380542109132552071633, + 313898121589792843838441105150658463015937265997757786211402222839530373388954005866228491, + 639994882223837790094418228537468868175658077089101363874099687878829817033108389414001607, + 332925761380409167804604981437852626073359816276191221072631039763722387698769707262914478, + 671356762509299526309880663130773131660396007422160877906522176550715803507041884119502703, + 731407909535712450885717588680721207963515966359197568299664115078899083955971699493798895, + 168450850721939156329572030815765625297289591696003889644272387780522512337448130481022272, + 908552600144861386181960516069340650788037182488766956681104042273790747515248639108878232, + 630491905563152427695533048624615270741232789590713138359677706343091016404634545596987154, + 624056291610881693422349842799370074953778046551214516344115772502239211518414627012910172, + 518702124032993241434532864816454114866699565885208512240253518315952295829659952302941257, + 881626814717799978683028361965978431082907487496796185691148196587599553724530050414208800, + 791033783922626194190816324579551807929673845197697294838520146203368586817158649957417118, + 88802583801468447171624267793525736141176993354176963684332413835116655675358794587685105, + 539640666170208454534517441310266191377014767370828885084330770231569301690599540630922605, + 511197782053270593522235771726105612708178995524043574503560313118087740054747685627330129, + 788043609960398235455394607381975602809247049457259095348453482886852147324552331016957233, + 758364637476042059165201385427866920416644050888225934028348540116268647253634166850896531, + 297131245725981970202752893543356753775082660790013082255957350793974305148185864567514812, + 198760642845663513743423593883858782104079926663851895360995609894329299971088474787597395, + 331553364744415819032291384616610238871064051140871111834240068052759256519667395476253389, + 475418450955892742098508022030487241237165706489880104499036787712088204850429534184500508, + 100339497590659142961283671332881420233285364826529185182477846878602635923122006221329221, + 888390954939261463032444785371886683408042116401205155108211500627381562099519119090902091, + 754587485793811917577548008568505259768986100333851441756189245457690675481646388838975479, + 633293795006084910572856938564740785846001377823114902310646682784877392721850332397917672, + 27119573992917547123046093396897433819533127220921643304741159066282996745027515916967995, + 232501785600076036317251785282923914234516351827185397602763472715704778437249508023891683, + 243454334637569308049666413183952503370281381457504878388623179306991217517526603612917732, + 261427522362917528143502266376283389061398140474433431313797267050267173215150010337824413, + 832966189383197880725758148884234720193904951235685590732247313219249174189269265284165488, + 750693337422983171546400399619944268524575232877230017409237723819299948530484749657163593, + 250689268693052706447009657395190885078296376441999184918669560524761327369680516743291287, + 732008170156523596971553064087716059924382599997701131387552418702572116770774562270444589, + 836619920687544423806196458940661237375066559971983829126752537703384278319860451092699803, + 375133730649191869401686780925579379087713145774541066572117535457642694363433951260614871, + 999651940962698643361084146588411977476583129704476156886963859171492333138028039973794510, + 232214086699395212056312234372487897090049644298717993639484217836864289413407677458194094, + 569167852156275928372749112386479056596423831199836489284213502534042226607349436495337414, + 294190660668147257336857119676442030941908837225507045722755857072867460108463929640847130, + 118371776591587873065855607221485044426567601307221425920123203400898900719242174580162194, + 946075418933863547845539254001068193962101644279463894834887910008941634687787809935054255, + 578546091034733392155231660273802076335905645809307453938570205722244721781806477912022793, + 793204894914705593451134916914954261767926939694167158365107248360305775883442258793817258, + 547284183988625826339517445066157706537415335770555021066093057327017905620176418208363974, + 810613291299126925390262410358598946976568541181371416426790905897737639357563555684801972, + 560949970191108070215629501704098324816363766504659587460072708641500477618313147020149473, + 882257430920676541273844279983982803731537192336121844870161959859660017364395744120557827, + 74187525592135685540417063031404244765925311939245080948557482707725039156525283082645875, + 662744006088942707484840539864604315612926991826044262801270775284847293681566006793933813, + 844962487071241126985017456690727755750135496028247184498275275047413499587270891148961023, + 607741988858052101981880010193044267416641489522217526639565245773953899831531057895375350, + 69517801079730943379483000769907120212706271835613467238460555611100390276040319682894038, + 550746383472545722716673007477998840911379126402766508295614972893387055076977784827997420, + 259219134128906099328381595604141345471231626960737973926232858033939733721149224253132867, + 267301974701414224191120328881728779375621809039584990428722041435033421197420691165698560, + 240252493463396217727568695904679171706295884633362220557297420550260896383419756107548215, + 609256622714589706734919198370371802413849611863650151573366665830639528582648807092089698, + 64623404685920033955460350383052516157190838169535462596051964020410192393222930522990829, + 178565651544866533260923683726569014560629892420675470931139602579028623503723002910474652, + 621024881616762701088371310499960335534853884625333662710909209564252204989737114117465583, + 118184656504173282035199499482499720904842290320312573890746376685016978654923562624959051, + 953000110390601857823860258232183020734733992258909083872230655014856060544963916598007337, + 627894987978830335544415030263059958408064077088138714835619473776623496942613595655091386, + 24583119300794764087576470992500551277255058751953188962213525549155186808136411452567753, + 854327289435100481591408026089241512512028198367430316873015843578161488546471038396003552, + 37186984457185549680263301888125455259981250206854745919666895691051365855085821604578431, + 483592844496613671329248051354104480034724632387353960051582569142220308788145850568025788, + 314542467098240285620445451319624770672915714919822088474716767375576394962308767780942134, + 615056952059541364327200900800139632714289437252422315182502241653834867391064411637425172, + 735684285427690251361437266311692707293427606235993987346293175613378768655970904894038028, + 254691229058158706303522316305407221644535627956457294879617017888294031848704766905500825, + 878727690651967963107552407293964999132125788296607365244474460519321697057243740125711631, + 190313680734971793347729414886225006801689202962757076052044773599160032115965144323334580, + 466543255420763543219481000573953047654898626031685649188687628847913399130315498765426469, + 549352564406610209224806670630532871232299370265079595253525222420679212864485099707370581, + 764657654066813639132507382767992993918461007602722370077542011411047428483122289924331150, + 936773762472870463267936557775335498765939674921273558465167734688101453628134791443189191, + 40334577609334552916992592813034282002154619964826383401500932788129526634403729005985339, + 76784464692813492490121982158523744048504594014391165020373886432582672051815131276685311, + 571334136463329842132088722007948791804345304638735100855935607303623092903640071289071301, + 710227313024022223554353748382402539661039168059752522672688329766473751599948700650008408, + 92651412744361854583780237047144075545266668475712339973985673020434482384964862501058763, + 714564999903676272209157795446960676134537544935695866584804359138437436907588119397542119, + 543273880413741354498726785978892172519372287400075668031431706782760491440637395329738954, + 917614417004677667411214157714820379045640777757577726756779279168304491377956926086637417, + 598590883044238523538404173726300584553182558123360734940908517513184437630496445293955091, + 937298656210880848882391569737103320008299312456734523378905098475936575019534270118857514, + 851548708422993579460042880190551522919663337626709149829210394325290525252028859020447831, + 902101951376267834763200639386801524170421140574824966822195459010418500928988611551666461, + 740056116469536105783457613035973229513075877765310242451391237913904103545640547257160539, + 981957444450321350647844481367601672411433069397362279959930005031994655089010460094711885, + 601858494038084008325169717066309037208616381546186893916199053863750785695834767503117352, + 358911301747915148137599786456570419858363083255855965086277085189836534001868160197378718, + 309874541813759684746962427778533092444375174197382777007872026837773534543477472337773641, + 370860743038282316902503477852136406489088035216528515061047954952782226431108945967569578, + 825180832070714785740828439103923020419711444275362104687828676828746813790230406758661994, + 329229194267653161179067221103424518174075453703754783261744192015109486782838946907514915, + 499386206425611872952625208809820115650308212604139986601977764229350995549319423635336978, + 487717358566334661936681375485292066805506355974625007807581655006179616508070258928089744, + 187765797052837255426078162951831217962172716011106799826117032496519618758829329964032874, + 652583541051719895004952490368833749754880698329357189883827449304387903250481284075490272, + 915392919257397876327919887143338473917095949182434399241515148938039567842280615422042011, + 298180998303745339492698809371192676724343538742994173407467707258310962378871610981022605, + 313907080017706397646898446090407335395314548874914560681699388524971849648597312973603752, + 423571053038525349996941897644419098811353542762363204735114629644544906989747976262933715, + 376964580049796312192668619179926564474133602875631983340141994928847851778650283639850907, + 72634564255445555388978329549211764190216012992024722609304857949802677206462570348464720, + 871506895815420477085492961327294584257756968469423154422913579295746578949081148997682436, + 456283921498213870341437051193194330207864308718354259527217448769180167758442190242387412, + 161098753580817891471407562556922322402676968992525860805766181382218994561379979629186217, + 393619154134106749790230481932281476853265528402803157573114716434138638692799281409069386, + 265850947157163761292200514277059465425814445192332351037488787821816552098330785559704469, + 804603932820885908085255849461737452338861169574074379187773637762339400790488802958768099, + 345081028956818052917899725720913886840171107020011682017588218505016859459233210109048224, + 907839553060912920000162836634780464723720481925635142588570196141176342061174106373479485, + 711502373679662639363860931999207101147417850213599235396073641372699294558818871293814195, + 688064605000334405462336603587760510425559504374426460350988459685458417434512217137078807, + 970280326279355373233661318953174849662355165050040405826027024856534121015829791440283407, + 393533190368860092537730631071811160476365637203307792526692919551540342922684562689791049, + 986233705126734289931303319290582337309102953828826512126797850052735211656930695987419749, + 666603564286032724816035475743260308637264970859774860446556927973178243812766577923350999, + 587596498741026267827216018395001605520423043736163744537119103833789817065641587493785178, + 242539115712857554992140474923520785669314371049668502595309630634218896797999061983651315, + 440711043084659341757483000626979506752942322513574314083429624985150214888660285018804403, + 780153140442272561007534082581369812757076445056810439012803923790641922188932016664701101, + 277205318244983570747045343192058265160467122960127589489746029533415598201583957765663156, + 459625354351578507303907825962447467581935638484452394820350210482554804006752884523810704, + 196454548393111205819401288589419765688818841040619685063443817007931109625771016266526865, + 816238102518262469226879176468426049687886034609689697293189826308150081639998076423420441, + 637282349221636838682993344695766626000663064939150030985829652322495736945983656754163798, + 565582203331103287869447346871792419544083545958532626694880902428870850325437958674823764, + 594276766119008455393969984713167788675338848595546817781843524952151669080720874150878584, + 961840544855060038149293707183932670893760397125426769409886148953015366386779238708714240, + 715168733591319160383560780233379197719537531864382565577857065222955225713962696955654884, + 753215782343427598336098134669054723362682433381593411083089469150370086573477244243791018, + 604282505503511607737855742089542072234627935360380600468390691103869229746026296920986133, + 888117988374120072841089577769295003797161312733439574219621708510346094683690970956905039, + 983832237857955140958180044560711833986571100725499677328788411349374495817882090096014875, + 520916364109975824081865365338199917721355542498000586283045006572680221337120011397113327, + 430044758152209348095715428681922620437329468854124777206193600733741547517844893332020566, + 328255991360112134687464898489568653334568690191052313753163962171747756523194012094160152, + 151469915988] + +/-- The moment numerator at `n₀ = 70`, `k = 33`. -/ +def Nmomc : List ℤ := [ + big [ + 547303994591327832101812039936199035096598697228765627224336854985615458865610570554408960, + 4959318365057365747], + big [ + 689155066742693300436388604064738470150916431245765128618361426101511808246872304087203840, + 58400534994538410692], + big [ + 237456642268557659818260425865752309410402034820677596071065885171155061614492835874078720, + 333981308828561223540], + big [ + 146644533457260647596513347272659602243862441763259821486388239768469857550532752787374080, + 1235652657246223352269], + big [ + 971204935632558288619516499768815672259773217264225029708553947569846905013508575057674240, + 3324212152492263270427], + big [ + 530177479122612080069078655269169137306811497480319851470622084440536629257622168241438720, + 6929460330022416915039], + big [ + 801011962166106488435113914891811672962810590153652697289453224437368919814253188554424320, + 11646658646758649331804], + big [ + 77812790799608367636548091437595194119680412059248458769076809594772623831741146784071680, + 16215976580113365450441], + big [ + 447365185945815903177364185860364869550685135921494626010942081847234957609675904065208320, + 19070440704967449779810], + big [ + 467077138953124886955996209080019039058216047018672630661327250633549763975332021151989760, + 19219346790987745549333], + big [ + 372039398794598660614069181108173871844273360907282826888374998588982145483015812326359040, + 16783283438268192202422], + big [ + 914574302044749858116188157616304562644121763714502030389322637081307080536171064223334400, + 12808596149607273027811], + big [ + 766066874670269685687258306174203645029960380495140829070942500414174219329559366803128320, + 8600603800357077252027], + big [ + 410245336123103072895720601271047928135620848109815597448201830251892905121735248424468480, + 5107919434511249151729], + big [ + 15322447397952188537668327879663880230136314194438967496449175952609173750970864359178240, + 2694156436237477139073], + big [ + 839036308868529009881980165706021474086620532642250796696505482990383681275888933514772480, + 1265956532238906098886], + big [ + 175042727426502223382964057719722309855950028863685071210761002559455052276234612794982400, + 531159223667219476941], + big [ + 42602553448267807047567652980257079144659784457777508584622143649189391510269515467325440, + 199304307974335458807], + big [ + 93003155993600040819769199480754828651878306579403848563472052179937447883653890871132160, + 66939987658443118457], + big [ + 276356292504162170166982615509965519754820243461341726136033683812476742939818984137031680, + 20130743296949748412], + big [ + 600426399954782144275564692470589826205455451036862556724230115786790304302734902380462080, + 5419021240856258008], + big [ + 419625709879908199549671054362325441363588153956090302406406480679082019181840680741765120, + 1304716161087401565], + big [ + 345128770108257755902112595805030146995434848250312018793926963400459356665584069388533760, + 280588534504488882], + big [ + 266281112024845383973275588709943585550795986389033322534755799168997453842241558927114240, + 53802126161260056], + big [ + 703646851805652409279830334498539883041511548598487876610920128412223193814048536705105920, + 9177817899191595], + big [ + 746144423418024826761570735913418788802082210988692371165046288136998552641211340569968640, + 1389280490789730], + big [ + 280108189150165526721680656362505578262067856798158857604463462627520638196537406521344000, + 186125206006119], + big [ + 584045584130888492670685936944326442633975679266617039808325443120825946731651496274821120, + 22017099608120], + big [ + 753890865757797277432456692695865952140692971217211565936329300845736654452751476855930880, + 2296471680321], + big [ + 714029451197774017938224387154012702865413249522304800871312246132553797184509458608291840, + 211422808747], + big [ + 127112472390092357783675175855460221406327277919239749617854118355249253213617694619729920, + 17296818871], + big [ + 440150041846387946125479637106289789691379216954399124264721900882527567949942588828549120, + 1293343079], + big [ + 132577211058184314618753833519811459551186541075202897556778706925280307883745861309562880, + 113398489], + big [ + 850730371602781749779479289899329795265088577924994405352397311616615459709453394792939520, + 110149962], + big [ + 324466369934279043292791025662994787391631150526666725307227467916730036591562662986383360, + 3615273], + big [ + 552455680385726858425287472974974000059911804289072730982420332392835346833134741933260800, + 120634], + big [ + 840782459306478518776023046613332575016525556139933368310602982499622969579784503925145600, + 4013], + big [ + 492814314667232688006526272455400774033323851722088400632951959031037805448514596188979200, + 129], + big [ + 939792840870932743155686422875194554431068733109362059461795062709325883958818240882278400, + 3], + 110637059712870622722268088559925994368272707184823088440411834437932716145735683276800000, + 2827552126743901066860202768371231315462095632044905949594244109457723015003929900482560, + 65234165717275791246534516489763458069850538723709515594520537411039263225628925624320, + 1352986618482973642804787730316205346735037818072031657322286896046006587392367001600, + 25182397918265868047706847058383998812031910546417734618020952362123163423945523200, + 420413867798212684406686692845793423531025226684313267409781612750027386729267200, + 6296326499102713587013326483953985930372847767937956204510678026825782662266880, + 84617924407775711830806116122309047323930033996805690712507858758798661386240, + 1020719248166341955330673001725059914733296533848040134020589522312578990080, + 11051510464803813805147119586943743163125113435758730520075370173374136320, + 107364793804661710782815381725256668394996648171695949406824156847144960, + 935179784323229803507804061677088089083173589907266290563502718320640, + 7294094458960184393702956402417679396550866848514002587367306690560, + 50849777021567815493800364438543315582304924126344626435082158080, + 316049482819089386242459746425234436825372479899542291920977920, + 1745561221878856550927602099561410074611156277425145968066560, + 8530753263966735323025993834102720054787419954479187886080, + 36692166582558708349053343241744524713075646327160832000, + 137953367238920151364824025523822895903207572153303040, + 449471141724124073206288748518782684885678198620160, + 1255022278023425441662568391976035905150889492480, + 2959862528263970605471348550824008149159116800, + 5782359216112393599755834000643528830484480, + 9107221093314090797919750761801979002880, + 11112874270007015506462441140985528320, + 9858573830889557277250390704783360, + 5657043925248177874815292538880, + 1576107522532054851240591360] + +/-- Bernstein coefficients of `17 ^ 68 * batchP 70 79 33 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + big [ + 789081803665412710375136127154853939138321080254854342973360238107856113505550312805498880, + 200872353138491072914510058586557], + big [ + 573257600317044408456351760289352914709318424300063174458294935587767566267437893550080000, + 52472698936423006617723234632586459], + big [ + 383392217439920859938658102113836173538048068189069592182143833429462713609029040765665280, + 6697515488657241232039344934213731201], + big [ + 78263518403165052023778011719880252196061101638407214067838421426042449326001409228800000, + 556691014550896261070307460204429535246], + big [ + 664486033769571080335335724223123281511678506056189725139119379927252644408134320531701760, + 33884146952568915976398698499187095526500], + big [ + 813028393119967828101314568123123334170687587651575163460672704761182824600263114631413760, + 1610250330731985697788397416007350535741213], + big [ + 476858384939738895392487862326371375139015436520923887039905753076326052181893600352665600, + 62205967268619407354578591674840131877439500], + big [ + 993819521928480558323207415923015271388771404976322131868200289055839948675418250574561280, + 2008353041849804923873639133881422109150890498], + big [ + 893210622970190950871384291158612273184311357715172627628024011091048778681249876987084800, + 55291686021990683818700011396185847993679730845], + big [ + 893716705861281294857897083246663942914386511085703215593003696076429920666798607931801600, + 1317991947529501597256724883535567232362661752746], + big [ + 683289977741059733040609070473819443373442413815530240309084940924533200971873071252111360, + 27527715308892415386496071789274386592486918682636], + big [ + 634169230617676445265398357973679873965657941755735140533077123622036499589694291779256320, + 508589614915488195580519316800080082731952427626226], + big [ + 380155106279186702091872594629723785037519538404964822324507494162687083483920235778539520, + 8376715086091366098165296915304909808581506441781014], + big [ + 593776400632388843283599594469089349721221204340709681199575507305321055385878634535321600, + 123786870280002901204359207766175381064898797934196828], + big [ + 413322605488134791058507542230798069500439521399277732491077374500188048492873698592686080, + 1650064511609100173861156170417262524220129199068241702], + big [ + 713271397976956346970589769742038330275005501745439014730856035659561887840289353315123200, + 19930677980973982741197037601857594761375265550877997474], + big [ + 180428369269339132918070170506598197357431232240795439199961919900477612475413112175984640, + 218985209232762296465711532346988004212526880385178596348], + big [ + 81907201613459512613729811694152357589453621595129148336245752374242670671476842750279680, + 2195915324364764732670294592502564677961351659182934405339], + big [ + 684875208051264535697518505497707404790404675343246387213616075640107508718265545680486400, + 20153997461359201646551491221236661478950611869480988020081], + big [ + 794520408758097147154053105030245127693610236506279165781432973525168409681321934360412160, + 169714980821960126932692348317190009822566877011103591001369], + big [ + 769901825418070048226218359229347879865426562625373650390534540404981197280285344336445440, + 1314069025309681171453865747342481934733162175536037604616054], + big [ + 869637128548746497815193826076532487471276555543414427617620886825727208411005593971589120, + 9372560734264864781159397931777837521242396782237026114890523], + big [ + 229462528384973436098213963471625660496433406986003808909224873647560348361102924783288320, + 61679024981219562057115267773548915906635894341365935352168367], + big [ + 353323318131392915217797553626268294248728742356027581662097949207106540937072808978022400, + 375025335169338365022805302481649794267609179960008577915359310], + big [ + 955179941085670211783797769483943146487897240112161018199043356183862102303569492018462720, + 2109362900752036422013449539156453725548287775029785688840414345], + big [ + 586441397490716900797824390497821975907287772944802968103465010410852569169230433940930560, + 10986561258630277054984812596414511305198090814012334391816750443], + big [ + 773807175243778941775658521539274691056573231928171815888587062879724177157378884207902720, + 53037211914574237946971592648759192265775757101438723458929777533], + big [ + 16132306335824295063757425681780392520583761052363486120708553161896918310730567998504960, + 237486989099674617764472367133492235814191453989319967921974948635], + big [ + 137461260993040567622121275260643697128858079858193663888884480645766848333519701357363200, + 987006040532427297150346924231655009192150741973890799227713954109], + big [ + 18465108741107729448131006348501050963029245581971921792651038954877937839114630400573440, + 3809384717195468191811916923999441815373803072901641681447563384261], + big [ + 58870470774695110037458867543014654183907036966431552213946409065612473600861597408952320, + 13659555920124757036061771133220670845639882156724306500474409739705], + big [ + 369006203223480508314725486980177725800164232329796355183003173491213362981318876924477440, + 45521593987820108234417417264673027282625893206334266892513181564342], + big [ + 92411443006626587325562000720515727310144015925495460271455090746898702302275767810129920, + 141030546451188239593740909345452340454168167135661878039175485288987], + big [ + 417851332662353403922850349125229468566893113193219039027177108291122198361060910982758400, + 406260616745303581657090193379744653676453504942720043238133849463032], + big [ + 596645958989453332715638382705443648225859154188927561190488865542099515436444150115860480, + 1088277417683742810282847377235447079308275898831736713374710575450972], + big [ + 224832123124015817255852521184219727254326366260860242445957890805682231622324216062279680, + 2711019995657476934693629962163406076186250732359650348083647826282198], + big [ + 28899017350528034895491620760178790764815601319012963927060232358229896893925938283151360, + 6280094246288050004303440580542054151354829613084995884358869581323812], + big [ + 50264979955093276379897611409045572093227754207355994977025455250130561890590508418334720, + 13526594059016308896644608934360362650990914971233470949287825309735221], + big [ + 942547058358521626027301130027964464530878712225791701064070371898713166967336826463846400, + 27083987644066699322979693059439187778215785310378637365306100694613740], + big [ + 584104134512996097660966890159264320679521264828131696424930576453568720831888980894023680, + 50397970528498358868003559299664679608077139801805115928489989923796439], + big [ + 462190535356534528419147115410746341084957149516260810323850838421293987885071341505740800, + 87120718420262303822763342680866943600904402244400905129433051407934328], + big [ + 872260233657838093298730737833680553690130902020965208179772930515661296678967301940183040, + 139836786894218691249781591989047753654293186163666518553820572856177378], + big [ + 139017386580144119229953040908036780081636375397765834074722770366191709448473981673799680, + 208277557257957937820952339308811178646320926308089539305777340790286255], + big [ + 228385501306688163786741114294607411256325682701694328594040658196908964136873677658521600, + 287642547656268177099618754961489271925411211791650546657371163241617046], + big [ + 471900599639432826457659129173504565918009035990219789492296628886811987902340378090536960, + 368005194369681999713487284984401435881802461801721038034667995510470510], + big [ + 874375030038367341278619712294771002184787750896736399664938623788201825855682636802949120, + 435682549137120351683046245614046311494422032123923897540051086055664851], + big [ + 810828748485557321151517220791681291289159016017214980739685411380108294453840763745730560, + 476698812685496534844477779981242145313627870365204887839708458182735777], + big [ + 119325806951535304020147261906373622241001463693492249440077811567135234211827481176965120, + 481312290566113422986633593484589852593758411102069410551851152764266095], + big [ + 609255250786897489196461314545674779637131221797435135604503902657562158418078836405043200, + 447682469619187730278576916011589489678757331863737397971480211816845457], + big [ + 572706652898202836047432271797705593366742741184539882777736537131236610490673229568409600, + 382837253372213909736268111834209457753396994594703760086958527804270438], + big [ + 777682622287474054930229084260629659740932083601715598702257647654470523000829291192647680, + 300314609226594980801717244988409161300166222081515628008894502323590991], + big [ + 229339829937649772862791745097183585995342619707320158377741498400407385814559789982679040, + 215543149724412732856701407704649634249146270366661559858440119361011106], + big [ + 809550120211936951650681886457611963905114609300284343115457154016799476699080260635852800, + 141124994489146704881966524535572328509366419721157315302653348433899912], + big [ + 102912648106614848327769641918706328565824670424753708636547038320236822500199213563904000, + 84006695408864941796072580240466431695879147200466684958187503955693208], + big [ + 553225024121499597302236533878394053184453108058820278215947571566521395873946329709281280, + 45286491618395007249195774921877824407533969060519658387270438763419300], + big [ + 422997921378493865278024786389540539179180117708827687919486806099866457047702569169715200, + 22009101622007964938919363611507011359728375101664273464283570699132887], + big [ + 618880285773832861008840664628582435381646715320095398442933445107388647728684279026155520, + 9592157814625383606983197908238436368500627503532252287358881343030408], + big [ + 131895975718546099805723731635389119236091997996458098769123366917383180297365849290833920, + 3725600091130744405214225733891894757071640108886900523349251643884317], + big [ + 257980975349470597391533564175449214181280324835559059877796315346091820329956050521292800, + 1279963599998380790366903637618146036900265889995794551886469508542612], + big [ + 882605350813127716035793850295498866383898848292156100028708779260737027922057636295475200, + 385466220577711853794611383155643383492294755515747572840956400060854], + big [ + 723735972360656073307756949919723214354739072043915504000798469329477686607057657759006720, + 100625628101162312366984077350860428278146420613534531254683372922838], + big [ + 500073493446808596373976329340023741399381735592475769657179282282921657332492530194841600, + 22451644316016956194061096692800546100265519257853377909842917742815], + big [ + 254434316803281913136906081400246382819428026950049248695945397781142898701078065022238720, + 4204282651676300257852680114692781408750234311844528161734725639443], + big [ + 344107003145101953536590223396442687399908174212291291570501703884876784773350871898521600, + 644838966387693193062326710171996201790853396377103415435689743609], + big [ + 867170021450617983057495580138207584598841282999004403989886035256991610443513793966243840, + 78290996971071242052192624593365118493867626214840824350538196438], + big [ + 735177452938737355641137685673275914502070292235441053212625542186177524461146025922396160, + 7152046534234756003132108135761571127926180285355510429511679877], + big [ + 225485125399520978512947013942669722165120376263440064495154161850493578271018360682577920, + 452583562540409401456438294269649196981508981456050496424021935], + big [ + 839499829799681200361993364234459462105151373047830824537000323725999285166803108914790400, + 16973620037527972192257933977120386075408549409959418050468691], + big [ + 952857869136892667339973839637425925331544500671975810823199413719071701845513612768051200, + 254898974566290700445697209810723674612668379134347306220619]] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 70 α = (414 + 63 * α - 2 * α ^ 2) / (138 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 70 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 70) (gg1 70) (gg2 70) 33)) α := + pev_wsum_eq_of_packed (gg0 70) (gg1 70) (gg2 70) 33 100 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 70) (gg1 70) (gg2 70) 33 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 70) (gg1 70) (gg2 70) 33 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 70) (gg1 70) (gg2 70) 3 (by simp) (by simp) (by simp) 33)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 70 α t ^ 33) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 70 * (3 + α)) ^ 33) := + integral_moment_packed 70 33 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 70 79 33 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 70 79 33 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 68 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `70 ≤ n ≤ 79`.** -/ +theorem finite_range {n : ℕ} (h0 : 70 ≤ n) (h1 : n ≤ 79) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (79 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 70) (n := n) (n₁ := 79) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch70To79 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree80To100.lean b/LeanPool/Sendov/FiniteRange/Degree80To100.lean new file mode 100644 index 0000000000..6336394139 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree80To100.lean @@ -0,0 +1,785 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 80 to 100 + +`Sendov.R_le_batch` bounds every `R n α` for `80 ≤ n ≤ 100` by the elementary part and +moment at `n₀ = 80` together with the prefactor at `n₁ = 100`, so one moment and one +certificate serve all 21 degrees. The certificate has degree 78, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 80 100 38 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 17]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch80To100 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 32433859254793982911622772305630400 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := + big [ + 109425388765298374654413765304824563761911907475766835157373953177019305931030836071628801, + 8723164184970649540136980820083385467316299498187180406471657614659015745] + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := + big [ + 753962010275491328447656468963419868711966030170948161704493800382082415212722831776284673, + 612338138787764671041142320592040356240993468772360783930604751701315749885223292484190672, + 906662058367826076027979322935838086469583946228239740004283604760462841177310951708762375, + 559445703705762770039425310647746368266458476620491844728018436030533370592125210471337971, + 967702714060018226256015577751364547605290573520808093766002696818914569607965724228313105, + 552536723133244246326129691927996725309340584471788318996853237550897499370607323787719921, + 374912317375498705197907775950187818479102945232247968537938625341337312670548853570563439, + 421311997786329089841091011620417940070983894648081580393035739213919724989061673805715260, + 101024131465396272418537591899169031011290430225212721333293917125474782312187510253237409, + 574555844362957211922317826286996767204019241884165920413649589975939063083740756435853239, + 143953076626388076402313285739796276092968501755644123551067140890399292884140525075474614, + 983800330232401945324591485548308311157527969732189892595606224837776523707613725364163339, + 677399435509776737976805369662115314683477771460747473448697913626735305475813821189034184, + 639538976747780517344210713719013918404300097280195113917049391361518746479962184408243811, + 579098907561513224206161149641696732269905650632510095195241592692450467511765109946191342, + 765850746705047915679668241858954864785242404789341837389233383823092061469925066527030182, + 503530571149403751567894893129224281844713763515135346915957323961590556690666266115828768, + 728824163540540353264254459854080808642876796246739015922385786306199139131675181731311999, + 301626207846430497786636019422598391231644334451268499145922267517602054326666027495714468, + 624264873572132850674063126154789780839084925926911897139649248957527355538695732554424777, + 447872112231346247263643658692810111730750016856834741871401938008040749724407498709594862, + 37389371126170039608210322710751410332181143384726997621820240766968886471482476500916846, + 165819476001216773699137591415665432736849612949036346827432904782867599146991106902830265, + 665108229087564879053213587522576712569854451056470935045440989224964603545290678590952953, + 710304666320085112831502259242846460061488505213129401234401525071523966889002002249095098, + 799835489620467801461399854912015581348698330840742673338703349068405673733330656722268710, + 178579301753859760515964011507188143403398689457998436610719700498540556779416649753257804, + 602150555569133275950149512080266550612971299248557983027520696722991119541133529214855844, + 376250458348161671008473656668151177374928430936400326369111166542665710275976113353392858, + 630551866181102039193752972956804557013407917224979057707438822499776250650875324540830132, + 162355548364725246422413391914940311475569817361434757205071444555094309662501995680474321, + 85565558476618395380231707011336254804766596037645628494302726162539001468604080200413261, + 241102868126154891366733274183120600044732595607361691635085220750871149480454759473603807, + 296067428904933395163982902375916184966423367112344215952017955959378034223993840945760693, + 253700759307045787650073428167573948254817324225636081963964167462301812864667394688840771, + 936372012726559880635669845151972607664495676878761504566886806920749002774259636234610732, + 206431111800682649340419165171197827437659694785925130624381419633611113565194731430850794, + 13175614793771469431143491211479080538974760298440604687591438925233330019532245469228776, + 617139587172201197779130294726888553780860727672212727272055882830867180453001162090689491, + 707333022684818505498117851914334908341312782094543805195188179649601217832734082683129478, + 959394629964182551495293797912576186051519878249461774341861453779780194910413369828440134, + 506669239059139338293266745653896838888956113428518536725001923905630900466618870793433520, + 975616623233495126499357741974472656269550100994829741351706218515787243251865980232835081, + 626829692002889398811356795822008372998266079309146710243255156822810375291117106462122575, + 198120126743549313720671912955159546005984365037449397543384385325384813902510243641665187, + 465046232191613570599678042810641153912895416455599813820050000354979331769613636106742987, + 487404425010265774830879772004098060928538209417166606949966230018265155012258229340120091, + 778497547357285842618503024015552907457582634343871236289380095725096655256649811627977971, + 978641986490234023742034424412142695039075177743055146576439821749279174209344797026359934, + 882858495358991853746085372124009528335835006731924736262781586198644654575825861659591389, + 3448775337025614090965959810691699592690496097589686204588294167973166067992896039477738, + 308085884896966222626659212817796247385218949795852062496952819747459673105766556887931291, + 995064384160536890858494926331502266846037312399659849630236938088000956835124870433316311, + 484102067211568042898608128157175493224844638813481435933750945388450013930095858503633417, + 484788691530223955501371325232397790970460807676746226369237349298085825903543181720173893, + 12691042051400615123552460960505623409242061441110241104269048446566637032119534121857967, + 568665119205292986468858255969088038950498908980956677159946963411415696260072057035675287, + 782367292179054968272826451491122776814327822251148808982253111701959058882615350252202528, + 319340891889197365333966559901534878980155457849510000443694548889895196031591201970033790, + 106726772043865094172358349861060112854893203552644209695598182167474535628916144093995600, + 427976948441646458182936689034321101888504561171261495684853426995244383384596836242098135, + 854130413157297107718665797233712880527505513473212447813583675842685304689747456697049220, + 908013986779968551701972409100579878730077075861980925294635136963681930699400762571091407, + 424298475020703882259585279196264783735652386288552684673030852484806843839049256546952147, + 707180647548673941355464930941407560949870981153161829976751483936196156367072373048151083, + 834344735590178131782061746600529403308635584654459532644430455978832687358472257280448663, + 151622242468556526014444836083708741570125152022339968581047745965907462677796753848356875, + 467765836033501805397148625675710496526084554945634828270495083064537606307258260030419403, + 442820482979220630780979837805360191055244068495812540602728235956622014034242107639561594, + 730349855368855547988364337860813907469950177411284902457653762049366485982251387437057982, + 950231540718107997871280941955374593243925200834811147407024174742432512006368919766415003, + 182993667624890331970095494928287486536183811448868381530083401299811579330397799037082757, + 234609416390257336074512983575968519575416015742492358617710749599325365945381858965843067, + 423953695089320151676146585448961922222382220581469473173025123450315765752144611340403519, + 53277234996517217400602153725712596895921444772539266043021560777620718457849259275593503, + 65148099703981941363514626778014352451683956050011856161480393086327467847544739331401725, + 795249569016075079633690908750995461101160384478089105825350611527162713660979006925918024, + 813050046624527008812294160775381051570321670653630708104445390097215681444853880540275381, + 559179813674567460440356442952250550531740437288423362507996457867493379027627780921433691, + 885561637204061872701485712244825240038764134184518557800081209590662892483596196828385271, + 677567281725686367874116369083431468350599119286403201815995564126870102288161993168019632, + 673175941132292113054715162272670988473421792238922171082264528086985464355710109668616504, + 561707132503914215702188600996511252576067091133752828940736256315414355303371507007372204, + 943367750884248276948773276876131357481329462436611443698096888906463966084535113149026470, + 303310276038208929355828407475136738088475565919867944399326148225646756380124346281024511, + 992064842333233327456253390981895777949650773103354761154647635544336474102120514160596391, + 91861555714585558516545863970282488826328989940765515665866102607624318899783204535314073, + 574293452888788902347094933983827827811363045889147032458129928409479971123195248517433635, + 753074471194481540145386182604966530098527818483257521448444065796403605906309442316875173, + 537368302988050438076572915454181859257377848859193660682175408755560071197108817650831997, + 89111740842899978722147929623629595119744235233910934426798758860646941155042873085255075, + 331392560634078356113187025117709692399631322154076856561436914665302883045643812221313959, + 279038913561587484880730042741486490709196997957452090613283840563410942358196660789295839, + 649575504071790438347884188894246444270025175515807873122441136339280895368316076951974151, + 359865533159610732387680137626539879064749607988996009003558222913801200576601385932703558, + 884594105026990452876991133963542049968727744821475981467467357997120715188604906249687254, + 660043482589230546953204535763658779728475125426123803975763154720321675461048186537812773, + 170715629131413142046146244880321774195365463147374123362459171812245543719449244341095245, + 255502273351797953408982988397093647766949650078204534852415392758336884027078205951813894, + 711144129945477719343088118470315754352509480376086811692969845182947729700314044744947134, + 99697277683277673188983831836188026422162386048191384678452857643292287875752439406112920, + 153657667969768622105563628988222371744684009804100895927931598750677332479189062533803139, + 922870019410748442377210194885907587234411314731909705646980911959049870490277444805524080, + 281855466375770311873163005396716514249101696829783239173063446884267156353113144350888494, + 64539464284294470953465436421593973552344749982018261596722599456939955700132739544928060, + 73483604463151733631616790089770783298465366619771202075843879146067406288695639839272980, + 159044181778955410920006290861339492065465898983329853632200788785007484581447597669832886, + 86134699402441081984792116683922635338883811843355521256973329037843265515928877472207151, + 519412622794324795730144985695273229713889866593937941417115525166057765023428132826828610, + 920126123621944621391766295317226060176030491645991597686570616357134582769979232461372058, + 952367218569648666031575022887263488060950995642128966686982305544541573142654360583449157, + 267287969132211262552812533946319479121101600113292226135282055508847900926424895235161309, + 445039058726904917508663380799358211167419281696377132985298806561833107056441283158392089, + 522162139387057945671322499395735624190238032884858008171575152028098324859427166007667245, + 255178598157691886138501638844025309308424539282253091091689470020905491730899233102797827, + 138720677111632121939563151041789706684116761389173366728721537587086783572600968005041960, + 973564847101007729443702011714070806825649127984838357356854908809870214466832384818090682, + 144571825738132706959547169041339061894427383433866340601242637141794653011165405290897760, + 191848238746120231666257844069411646836614166964698611077597119527068536369368139742960936, + 297508384230946095303438833784472810965375443609899779886019761125355263631988549126411953, + 38373247527564750791163981281356435859852285740399170095840249907368890777806851207336610, + 727464852621304912153141322553016569255155810602897874698071002172074181882726950301097106, + 160621432180334900128881095261560515173510800209836819973432604511462829057915290527445037, + 866834608845465569082510090583384754290181234100019881054524670599052751687886770389793685, + 195786956462169884915742449498129564935123631105805450566983996611269192614100387254267510, + 336494336726974258795582968879397913807584385696306081809556815285333725870862730916079663, + 184356536295609416590929226335742181197551700579296172794565864357355928330120786896946496, + 878959456195803798360735775513311216310853375442293904386490783008936050460626175093734772, + 125983961271965411246494460881697829810525150386613663079865524393572780960452522342347432, + 647523581667503781326660479452920800131200099016752592426374461585018832947039351271450982, + 945077137027385119150240960222163397073998552834009828350170621100447725415155851620811735, + 81712569577284842507423119807694087472674593722596374752196731266986797466081997877849770, + 990544982250000533954741056648906774659186152462978047234492213706250579447242582388382931, + 147552430785824568758796892754191192460078438386192027039011922060869763491425364108595017, + 445357951538445528274287800853447084177456373152364908926551497339434635030202988695987589, + 403133071224096764724403786779768387429460789479626460700103964503198654421758173707359465, + 588131778798628208670327444944341611555230822552103913633669463056379220470679581600035902, + 564503582317266430353726873164223110375642911190859926959648368446778132132380167661133847, + 76829223714663703029808696912148474269276145015607178111164964699128586495072088255907364, + 372549700280172668215111094163860852369108696821072858748980901469315689031532706521438560, + 696831568245431424630427323594326172449464121936738061635880012110352982357489750418331671, + 858327961452051611439154228733250218323353414634246096726053427685380865946484294977187282, + 845966038099525416342313293485610848722442148301934221188058100475862990093629702898287040, + 201819546741683666158379778563860074590830214631004711158363361458572374459604464700315489, + 997379437553677519193237447634953935119186714534769204136194147598421869486498657693406561, + 957965515345318041546967952427112978040019161147619590398552436419491798884533563209978851, + 268982606148290694077195960672091773401038395851632088122682384060505339876326340062661507, + 109710446703448368624335638914800055732263504421229150910596965720109787572497202434014105, + 141110811321097485755143421929285506822795293130222851541473113498081750253175114822720117, + 360752795905877537536512487573532406670927908981364800872330251644978365579796730317858394, + 364747526093885796586727885792458567556548181894260476359024822557648038400158374177359234, + 863556404299744362484059722751967300785934464514091799909574452159909571804687970910605140, + 375804773364740675945182141499871828163012262743459016417549670772200507035787707272153513, + 503423657965787140154875582788771755225096429890901576089358925263578610871615397625619035, + 129129280147641093077149025445955450604438854557226721501042366854149390473864849587031474, + 841998885266603287302258751100732747606275512004731189931244391660696621029635913311525188, + 890986131796334905533293356284981802961073296813179439742817665048103822318246567143239560, + 388351905132723285751990572003241558427792349230757377095738580219081132954902177427477002, + 69588923588664237578189804418023575507673485363921078162211365853339699498650984568654516, + 881634460718477001332296152856458156249105217488711288096065270517849001139044674794524889, + 51762204099737014146614843207503911068392591643383262356577998545728405484867029306754111, + 298638999731501081396636472028814163396593665006411047081298769495027201845170557639933896, + 194178575832799944268850643190516113008239842763241346455550127286928824523410244333549673, + 797112605053847544079603286424048464765837757439316805067605903568510440296475120957801484, + 435809147948051587388186573321072200298718936762829118591947892458996178907256773611317810, + 609785332448789601473208929556876271015455232120803215610697868784596361610126464940072249, + 811591707328056903111196696655455315732772254424251225366468010799570411483994268805356514, + 298195520512003352574869348779656333343954809376788429751797576913950767068635179930945666, + 178421853909553100775261454804783816590440968761586633241512246083645465754947618466702580, + 749478184064449656665678776935824976776961593634966062824142633193930299675825184946776383, + 802685249544224902812211258608662962802905900307789666028672603631498990702015547190745222, + 83063361285672318062815108037542760697587033066649096165276126852436078793526404294663612, + 219543494081098828974284957850178905246318741084698205501812671570971595419821809503092707, + 524763227614227326350867080210095429334095024689270654257093668340057132598425193971384362, + 6643546012644982621476743377777394834920475254822210178124332472632755992631776432713060, + 570923729008686554546839838558253604762978102685941485019199383321124128769219018208480556, + 311376840216773770846007410421245789005587114772703650831472688063013475184476092846186066, + 973511569125081920666114016426256327889949104491711165904403453600153193628371610812660297, + 615450248183384433910994534462694763761872047648707507665501960389779949461053272444328831, + 92357411232512553459577920077543153707186849885404268486890558632707760108759046022614632, + 574431705501528494316972822054017896968986106503983881385268052067163088187240661932788947, + 283358099840199295779359234470419985943548201574774352544549334958644805038168419320143638, + 237944520714328035723916042372369677036358637432041286718898103108465239662636224932693791, + 943541218194873643048593948697424890455457428509748936193769955821961997475504662382458751, + 142167816307488925074697433512912966012416794498594502356050026391506258394999237401061274, + 461949684442415687187337766740290933080753816212409941394939068587653421465009963150175953, + 622563355903125030609316910742000046654700767752925966571991422599409702123645457592488826, + 633365063204222288038505086158095839811259534526538858661289054320216565722674555619757987, + 927130416478213629976562242800228003339431103156669633016997107393101653161344931354462775, + 238595771888110675387614029588775256128662188228738433432364184945730471530844868490276410, + 525604181367219384012617012173138721109710160157416848353608854193950929282934845291125136, + 214823471328336491943709905470923999170561749043578450905791113689241492622050368896489022, + 586126334798038962916566570213146174483983796233203536547695773484566777855991238241523068, + 585890975222699528482211858013818107996655342598938606351665221365690641568960786030997538, + 745740987168380113944407691536676038787456968827084251313373871914415288427329282202226672, + 319736930079898186870852551356074395667323675374432912441441519238894151643548225106462110, + 882806117440008165599951234046248016328873281830329818742498982168992169677951246025989014, + 955729698127429556162235053725626145672145500250354556823769697587536815881971130012516638, + 558548777025152999589015328077306856737381170501043830473872898862885922512240209139403660, + 625165717599486790956014594965152472901318183466768198595673325051890409967728556850137352, + 798928994245547116236895010144345994198330641839370410243355528862155673953423056617769670, + 139390394793806859181607345242033297995773005306048540883906807738898192379665333448587546, + 743947842234641387272006641791022928330359220984433497606370850764991491542171135946092040, + 789380760175820843559054870021994048269193303611017531292210192217156992211484317734043941, + 11462444292648943308369222108286339689596271329472084475110725777780696268916513552891273, + 955158137070311892771312204935825691582576942320061242709163225345256751206938287778950080, + 634743113882619666491627745394397740429144355507259602476145287050296711702273248628101066, + 891453419028960415456074108892113244540354801120209284280696191437692858038588451339785731, + 473173621023363236199826758779601644582354375195402103752357583053812406057302556689418439, + 404753666982985231802836739943762627969484039018328915373] + +/-- The moment numerator at `n₀ = 80`, `k = 38`. -/ +def Nmomc : List ℤ := [ + big [ + 938387794729078375249398059349434752761847604814463108582305921734712367881387879662878720, + 2451457992124935473501133615070262873921], + big [ + 811464569557452455036783279106418066763735853342570992265012684042672016293022390814769152, + 32919184705502157421658823211314826744102], + big [ + 617643745463899989229598405974860698240914799621506659889371634408284677541651792351199232, + 215458812285770777179089358424573080302766], + big [ + 879565535109812947958136326719111498180087357381806467353420586935822889757294310654476288, + 915835443628844511686539186578301305479070], + big [ + 462140297753223364398019892336843720838402490834923531536981594593164432765262323760758784, + 2842198038742088308951573820508526777252934], + big [ + 613712085404530679612032762863289525955657683365262169409163521617467267979511260973629440, + 6864044642187844834215556688458249735858364], + big [ + 208432137924852535011371840206189345840752973430082717645163144293471066437273840470982656, + 13427088427682447006680667927654728685318945], + big [ + 445987736952524802704633955624347771992395019643871780707116343216863636865250251428069376, + 21864158125852164064378014242761193837394610], + big [ + 312405980782099088643558209803959957476025851470148763458702532446423987088467696249995264, + 30227698520405358127647115803289101291269264], + big [ + 154452515974810411886835447739037891974183026302636111913496337365838585328576189884792832, + 36010774628601357518875702937883478133261265], + big [ + 213806759670476911387968170697020567137384941220396896109496541715296666839419197990109184, + 37392016018675068145192099157096072528352955], + big [ + 567753343073076119908794434665042365733893269436985417536562320559981233187211068095594496, + 34146836167851041732795552212460819592990038], + big [ + 499672685446937157751981732972995004205393742830465828410201038402571098726108136806023168, + 27622466647867936598786965726597394277200887], + big [ + 914921673848294466080233064133156085487416565830798108214968985777489076817898386365612032, + 19907615004305886809258957858995402928230114], + big [ + 10263701013658779450932398985930010621545160344392707957849881520452880495865836314034176, + 12842207900684637449720355185194046807377405], + big [ + 641532131057272118802037314121272847393927520297104881808485159066453631487728551674773504, + 7442975941904218965211539954205316217383117], + big [ + 435384235425870795983553395131403549245455508666034410478494600965740833479769844311130112, + 3887151377319415212895090666200769536732495], + big [ + 468725298985847670853156311958337545863614227030085794318353513855691331527934213707792384, + 1833588652291549942873081308682996222071503], + big [ + 398305704876134174232161740734931718767202464033106847605330188659009745963452289595211776, + 782558687550161344599527866100009025878545], + big [ + 558829354989364373918684629075964859128383085477805684279658344182666230706308452982980608, + 302560497182004927775621666752966075658438], + big [ + 625603392646856653839053543472995758030156055795306557169996649895708137118973921389969408, + 106051993477839308308702859189414904021140], + big [ + 584328998602902949247419957155612054524114648785009430345941033552704111926557151170920448, + 33711319268249472065082657352264392741200], + big [ + 451614667506473941025484532583503048963117948418018670444025006071120525113589326594179072, + 9717134249437909558409092270516974053630], + big [ + 550837426648188362208623204269515603799799874971592063679203533902450592742319266094645248, + 2538530219740669135064598239201183646012], + big [ + 819024392260622313528140091065132851417435660733438300601619576510753236508622303772278784, + 600491835599671373763025035201235478892], + big [ + 545851909808208710114168205205556896247292589472143832120288245018331593613279321036685312, + 128450094305989474794668335895102715441], + big [ + 352839234381676662117285896909392346729622995393886685294237948151157060400210880466255872, + 24803266945745496268709079579195646894], + big [ + 919501042539887746751247601903904382592341337225323179819695833740291145788419776706510848, + 4314188208059576544036087966906767334], + big [ + 411769117545205638870527067898343637962053132548271689300269612483232896956162274211397632, + 674223780595113902570931821070179016], + big [ + 810239390517455982671738987702071065787482359872473000049560731601309524085268021013118976, + 94399724004762523811364728006051660], + big [ + 326132400587122259944819292485487512185717696365708590064544531370958740499556825049333760, + 11804088398312409948455701459606933], + big [ + 974631402916406496293046887872176369760972620515374802141306353563543909809312215035019264, + 1313973531302205999013808188008659], + big [ + 662067455677117728975905665699744733521209597284929176535905183057414971468882477888569344, + 129819922486334676346158093676503], + big [ + 719495613078382456476447784072976480299296279787540281401488823800014735380011247118319616, + 11360182884373213016499790008235], + big [ + 478679348485923973568604988403387824260814657485963126530745781477553332075488860551774208, + 880420134093915051775172698501], + big [ + 533891330672973781796238523363940783358521684317529454858032391371506481801803761132240896, + 60706825211252738744764756963], + big [ + 846464501356237414235179093772576683445188707487538953795997493293267599910613978955382784, + 3807543873812733665044886871], + big [ + 866340299632754520438279260567429896118609672288221433286341410828390558771442734598193152, + 281915090032436267346476815], + big [ + 285245997971585733226292398611515904265208954384050376086085773332670521746116818551963648, + 327099336370581513667654126], + big [ + 356422246589261210595203523536350622373466814963520993541479285772084098775869715816382464, + 9149156055589856275689215], + big [ + 262728185557758929735228281945768745558574653232287151887343843974823731926539508106919936, + 260880540619863496662879], + big [ + 715654121545621120499362802136210467441526703689311190407040903760624152515919278346600448, + 7530121029802986951452], + big [ + 906026351484310844313602932613053453921131142496607198455126487392331641854181608255389696, + 216342612427489653447], + big [ + 154028371374416388953653826564234877955273230444829783232273487102107767643092461283180544, + 6046519886539670794], + big [ + 239532378113828528707285389941209541419381892888788998275467622403320480570093819660337152, + 160703800662245158], + big [ + 183787818172020018739856993865343943892756895976477913337705179899257129364804683643748352, + 3988492826544713], + big [ + 396600279560088175948087849031736685227380480281756010508318219171813626042127805874962432, + 91287508022945], + big [ + 348661157713632922329859866357876212255099683862903028078743659626995686697333898805772288, + 1911957323446], + big [ + 11229827788382064367371038115860844725083876660366472738697621525625663058203158083796992, + 36487079479], + big [ + 941323361039272515458954268968741249092313121812604746078640004807723072127477717544206336, + 633107071], + big [ + 797997618134501870435256369007627910280994459390008438426413443981147431373244605208199168, + 9980268], + big [ + 181244321531222796982962161259772876620482895930814175075635874082700557851073778613747712, + 142920], + big [ + 666019344625450677058668677738139865067002393880902280655466664883299064356844164733730816, + 1859], + big [ + 994329300376906421846789925448583550720994053174494779638277054342505401590772963574022144, + 21], + 236504499496535655096170116071069732643156715536363374131431905723827544764729271508795392, + 2312440655225372280997586421252957136202127125247832968615934851204184481942325700853760, + 20556783311361049327630468940441702030195511244967368938421185301573474536274356338688, + 166082103128222897473283723171643696107048435631128738596707216852904311853015891968, + 1218605575048468158171037360500484874915303004745460507584543423740724454256279552, + 8111606422808559872224862434398245641949256535300940452701531932722774960766976, + 48910896762059962173537101594632484191832476882045264656440740080462795374592, + 266629397940651077707964170984721882819662878979170168337053909583027765248, + 1310780150099008317887089034249408017908243246652631651349519137960361984, + 5793164467104267856002438515547159704816096736786653455826281945890816, + 22929247739358792028893069032179234445217260145892980307474344050688, + 80888679170291782849765039126975432682489080745391333143564255232, + 252852427111386244978359397627846481887262530068454319887220736, + 695312909805350646055954940892636032256191467531052947341312, + 1666838136089110117006146767118676732931294941674228154368, + 3443648889619244786662209759640098438509459811329900544, + 6040913590125217669627879011657679726920583813791744, + 8821754425601899407029602066954371908924105293824, + 10434884333909184634136919541017446230058336256, + 9605069968523214951549676507445952673480704, + 6454717416401205395401186056664548114432, + 2816840911512241803152568859540586496, + 599100897802088020258310672351232] + +/-- Bernstein coefficients of `17 ^ 78 * batchP 80 100 38 Lc Nmomc` on `[0, 17]`. -/ +def Bc : List ℤ := [ + big [ + 459778819593233737197278572920546718008031577624800147757518699997250274297631176707276800, + 315501137318612071695028400778347154122204659325728165], + big [ + 326996223665300301921157741970583635135239668725520335326905422738950876200900283177369600, + 94505120016702322336678299206898188545097904598028948306], + big [ + 833995223679645120549971721400964849256196305664649382336224217562851818216253510228377600, + 13873091113026039680291656647280865975223919112468753766592], + big [ + 857039719982824917136897050237923384436339724567148967810918358077632727737437598305484800, + 1330310527763178335316751586827867404323438511280149487533029], + big [ + 954865378197679695650396386799147144346965815388655025039386890261282919325859291804467200, + 93713790521758053393483033236159737471439665327775530649644299], + big [ + 152681298597652730857300315734180242243998867930889438840025529175885880936608574524620800, + 5171377263433175271434345056193080724295081336158461914701265738], + big [ + 23952712297060895982666927125695172703100019118655250641253414572845923366083519473254400, + 232776574541760761737824801413294092756712326686113592348070463010], + big [ + 29788338060665394629320976629988053069029113370564994603901949998596519091374718032281600, + 8787855040238456215162590548900978389221423804576428790253611470562], + big [ + 850423078043676797887343079386087514236235551208326005975502353953086840535531097843302400, + 283944893377922403869948547320001639853427307107611701522230047003880], + big [ + 854264010655333845299737378631349187112610197473176627568554616166845142243777422399897600, + 7973899295168095135138798496193408690788739608078090596555033899890438], + big [ + 378945374902032151036037091459540069735275064519493073255859673795255826746320049563238400, + 196980301092379186107462425366960722265637320789549147449548313769917945], + big [ + 432954532329783214714965603949129334705699553647696110590187709011829130604551169323827200, + 4322013621860348041503736697923053535557614479872011724379205110295417177], + big [ + 246500036117689047881479341127394084074948923365245031869574099583617907358268457274572800, + 84896981084681844443993325015230707873976757856776097245494427137533856758], + big [ + 360885797900556740574927403201388889953365533387413558009201155208334158939899221455667200, + 1502765509945580015754135666179198693598870043214412723146136094966015735804], + big [ + 263852596284363079544963602908826825027504098693489958351481556634676959370255589493964800, + 24103512315500495493605728735190844006289217658584024634814748266386764494541], + big [ + 609568250327924297660929554288620503074014553180725097382717916845552750892773925715968000, + 351963115696208827520430064105764384759017601495897069266224280954525975802073], + big [ + 1725832141687824884401392434709837992899593762895067322410625543982281368068801167360000, + 4697735426097184588970376556985993468147480062963230051591459976767519228116301], + big [ + 490621810826466874107363032264518675114246952347153521940811709780562445997209481641984000, + 57512596343426596488380913341147466645099165282137851877394445590469253099872591], + big [ + 141856547521265200208262653007861474347895880265969472235539229681639485444132043751424000, + 647784790940415253450123665090822075550942718227013615339358061883537951299091910], + big [ + 204015478100577979111063982507330620347663682639570526333338113641760728208221809934336000, + 6730319948690435666463512509250302724933543589184898462861990255942170092887534263], + big [ + 515390689066316520807366469028462528089177856055462073870356603819078708943654607650816000, + 64651758115457402038170242802952213300446201759167001428602414639149559295839633706], + big [ + 142323938751467483219151025304898771005426739827572136957055400414550832359326280056832000, + 575368388698877193527446965376328465461814899467228469057280345703504082265766647542], + big [ + 683785668611875359413412712138480277011972401831066653140791296279833281023724683788288000, + 4752361109097980381401549355849747483560222517807687730126288484209729041860872953345], + big [ + 437822968950961991691095746119110018131150601599140529113221367718175949290490164150272000, + 36488529404954705035080271990181780579795939312995587662875760257369818404505541608545], + big [ + 177079973817768267605530864412113470307499798185558303767278650310378064286335084003328000, + 260791087540703641897288803880183784379617430907399110760805646223531418589397839777080], + big [ + 867958845712872234272989446737644367692373634898375551938150304115411362474179097840844800, + 1737217768423419231451998312341062012168497069341311980588720100916331736284412064216286], + big [ + 928983871120739601867554602052732389100493423452430979248565768888246700934097527845683200, + 10797277844051978795435091313796343245345389529981388119771126425459082765678314846314447], + big [ + 492407068807985229725200286847909411331849238720701716816680129155837974586913383566540800, + 62674463543407307384823470907126492596688526841085874694465250309471504216921705021732112], + big [ + 684073613296969683877112750027908598595547838562271989093872035882274251925131481002803200, + 340056756076541001084482562102717836508359752259511348990290823969086477448822451076149759], + big [ + 289325663656497467586917820790324680194543292313686205934593649507515016391489663847628800, + 725917191429880282134157143014653947682493452533149041748601990144832898102256517688810281, + 1], + big [ + 792809914394188923583803225127681981960942141168465243690289597455266970566840257452441600, + 199343836373928309175612947688658750015720174200390769405006944714552948187661431948837478, + 8], + big [ + 119327361102107937714320692242301759316169480696720406793000617028951037068015617599078400, + 481681718651681251264124749947661706729394463972978522907558757703298620841549180485345748, + 36], + big [ + 115691504463548625295866293311540490959925983278235715296495967664682647131778346228121600, + 96618088996421821405430311886872075504845002412005388986441034145948907476184421237938135, + 152], + big [ + 194331849527010701330716010061814191963540210652188764614940380765355309089411605882470400, + 421646880244710375536071545758990492511041271696066994522205538661859600213873241939522684, + 594], + big [ + 138528633985495393650317315340358896412084536372271346726662821315791577081614249335193600, + 475963636528620613596828754066833222285116962731704209055164759551059167574337864394139554, + 2178], + big [ + 329513539537409865442721376347756230565467161790784384162880842527675201437778414718156800, + 934902581271861709042507806177260850862283472323518490424335263132664410510798708857486233, + 7488], + big [ + 371550337706862314913409556221428094318237395368155684666900583783453868492124262183731200, + 462560065319800769483420054441021633945489084707514931151394641154446759828508054186584229, + 24154], + big [ + 931104169038416062421834702766499789721108111002531560658257462935706742241280580701388800, + 480811934734550936337111483700301964961042568155391994301686453949698652587975039243676563, + 73107], + big [ + 235136775551739336046599297472743761031896289732579883691975175916013371515846710735667200, + 50998760924740911934196974118125471272346453175953560095076111844389861717778693131850674, + 207667], + big [ + 880700373477887763727759039040565638014316444548488469544799369045434298539653699783884800, + 606783396742911564142342620686612633586345333648424623194718760320044367665609311304017472, + 553664], + big [ + 644234421542477092313708998834581442562439340308851017895494205053220163138954129833984000, + 818794639030994320488893168240366896898331709248879743874789761927442178848071625635180418, + 1385509], + big [ + 85999497532441779838824175175662672193216603929581129998613218755593321292723237421056000, + 8279881964633569547935456885615081434002934934966794927269251352990676980481684010032381, + 3254204], + big [ + 987002292856256738924017003820904483095561830789844401010723925107207288812383483461632000, + 252404178289153094806090631928844547189076779647059165719509127846301292113558107585198173, + 7173301], + big [ + 745183353978255874770501376051145304359915172916751724268653394585482783921058101592064000, + 556182436874686129109376604997444345002742533341249071697564167591419391354689768727197553, + 14838053], + big [ + 786116825952664251352477398532785946431954617843303725137818244663368017131571402244096000, + 665677797569728779938401484904919721958703364064944895516744290191421616880887588031925405, + 28796489], + big [ + 766687973793420135976162398197425245055363013146958957207183114662771656388899179069440000, + 100013463412007424783522454058552246113301268197039065005388897431848281220148725871780871, + 52420783], + big [ + 73266639755793001833433115383099996996095303606855599919426816844043464441321897328640000, + 432484168839981413087278632820076371406324613966457426845497062595387022884089184682366356, + 89482678], + big [ + 327903852323504704487224053094692130768620443983769724150335100869212075490186394337280000, + 934059452894199294601570297447053598236844404935097737343759469523578072691257006352154112, + 143181654], + big [ + 94039845291651935410276205735503883228246407619528500842065673405842070327961667502080000, + 910517045468246398330894260231596479340177871183176557853095101155289609589796788122012557, + 214663622], + big [ + 681559177574692517996678566890812907052593024014088306546741605238714886865016586240000000, + 707624642934529746671990293954324852102512338169346285483905611680381190227626369644937067, + 301388578], + big [ + 161660115147161704205849798436894275794250127790018700178962376204936007933224611217408000, + 814713821739112507787717533171140177311335013078248451908247388419849745457064271370359951, + 396029712], + big [ + 256281717704409797836513248292260059978052772677058070197762949887024787583102567736934400, + 185590834524008793413833547995918124229492701375418557112887466394472773453887014927503801, + 486690659], + big [ + 404678673493369087828133369383104172388392013067267270728245847602314827018287763475660800, + 808726331143749669875482202538037171730664178650561772317821534748369081753322377715813333, + 558914373], + big [ + 145548171463118857604763889588747690543835472811525785902326344271943935007259499272601600, + 153652521774305688185291516159155685655948371132053157727284242299445553352038585659364550, + 599229131], + big [ + 332468553329845838089398999878755169750469513650600816436312692869676963906027151320678400, + 350791061600974616035482357568550295882178913508516078351012600868776736995201979584614183, + 599133700], + big [ + 853599676394507792225604527788830412648368379804870488874966934543357049042600427991859200, + 716331017490261311768826218887816677449842127788559789824320958901934452191834458927569670, + 557953936], + big [ + 973315376555974406404763908275439779775754101948574591306619750157291877225037213728768000, + 135663579171574967026719640221330399482151768901311284798853070122071248565745716807481375, + 483284149], + big [ + 513133661426056225744993974803467135779734413740838702200851517560618455380657327570944000, + 592600207388624628951985332433114315470298789211490778473182476080968369058431675841920913, + 388721851], + big [ + 7450954854838351360660529208080049026574071189756526235769742810904642468267278991360000, + 957911495703269192112602870939707085866643496831403869668053076577664066141159603304391839, + 289812429], + big [ + 528417308862910294915832195896753684314056460187480342313954496451831155052681705291776000, + 178622164825093266627366085314281428302940434266120036643506629567039105106542736746953758, + 199867090], + big [ + 425039174206107273744945478492239471417331527142635253304755343176150848785093018360217600, + 868151458340315427435943574266700808665029485550546103109761855000871744912988451029977751, + 127202984], + big [ + 826753113315544793730083313462587292585986756836620086874537767795670445030367991693312000, + 302295815732765778865318525849751709748338214457050845295648338849739570428433312045913957, + 74513335], + big [ + 126333498803786705740341281330195166994148936162643099231170072194963920275330425683968000, + 346408283902438702132525532696815217661802575305407699967944925984609227846788853673871584, + 40053641], + big [ + 288640511858498739919930734224309826253190337409033787211932005630615132851470919008256000, + 789059216967286554428907384963097368532627621757357807131657589415996605238437222216208208, + 19689107], + big [ + 493013960425990463481096640957633799585534966476934487281124403446899050266674776244224000, + 853556733784179040735757518850089747109757258716884435670061264603634662906997119976533437, + 8815962], + big [ + 805168643498175702134405979312252481790659047899860268909957705575316552680761479659520000, + 705195123874865890322652513829806037579135020602634032905017093680628457952744730477237229, + 3579234], + big [ + 947792081059021649643408197093747102232535758873556894419339321987857832795955976470528000, + 493363437674823436062427278522960421447690796815527755192107736538455725487686237173358348, + 1310623], + big [ + 917306660232731946910461482781896545912893102298848328553544898439504370301418755588096000, + 674117058490541498620238509359764895214160287271989968158955640006250482073710675141539397, + 430147], + big [ + 998129790314523393508924142207590548172387309432268788361376639316784442564539939028992000, + 935898921782686331859808454013473840394447194034309867428254002686288457044175570317110272, + 125596], + big [ + 650451786309383093664142903527304855613608288285675578660866123809090026839235402661888000, + 553341961750330069089435832954317128002587886816507439229951102328428795339721065038738162, + 32334], + big [ + 195534521959123464667756112714743992699992945212471192023201676259863026359569056006144000, + 456287303247293189369796283027184104019594055928631196359733466063729348011841261035118312, + 7259], + big [ + 979682212881957728404570984703991408716737115175369193321981042187428620118943804162048000, + 885184520460608185446208444783059722574162605011392038115911283565257503618435152593231163, + 1401], + big [ + 48348162084147908075694706557605102110262628467112782412549781464570568716604487499776000, + 780267969963035892211505609253841174826722511341090434139521949518142952990277963328211107, + 228], + big [ + 763202667692145913693161784270970523282659816739656273304802321390470191677440452984832000, + 821318807248287816776884258561172525597934728006661290282891305908470243337767769510959736, + 30], + big [ + 700830488748468642340703286614519188834507762434477731180792834732390780602537159426048000, + 318530692089034333972370544559647560784620064572424280280363593265989260517309874244090041, + 3], + big [ + 15819107079048177943695118817997142413636291460209269422730281370210059253137486643200000, + 272328215552259723408434948076652745309538020268965526618525495013301239889926152679722152], + big [ + 766015130980776264072302519526931003549960480322470409637767060272403643875705193758720000, + 15791340286739612978757208605816325388611147473895308195269960058538212514568427591860977], + big [ + 379645286017170864296004153882233877229942440447549126115558029896574569814203721318400000, + 563356214158231826774388193285493307597394273236215311106146896012184793789716479670634], + big [ + 961554347710817746838700367050105161989866918167330320316284408547777742666079404032000000, + 8865002509152569821059895688417071384566716469930224821629042165718285270449859195993]] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 80 α = (474 + 73 * α - 2 * α ^ 2) / (158 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 17) : 0 ≤ c 80 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 80) (gg1 80) (gg2 80) 38)) α := + pev_wsum_eq_of_packed (gg0 80) (gg1 80) (gg2 80) 38 115 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 80) (gg1 80) (gg2 80) 38 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 80) (gg1 80) (gg2 80) 38 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 80) (gg1 80) (gg2 80) 3 (by simp) (by simp) (by simp) 38)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 80 α t ^ 38) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 80 * (3 + α)) ^ 38) := + integral_moment_packed 80 38 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 80 100 38 Lc Nmomc` is positive on `[0, 17]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 17) : + 0 < pev (batchP 80 100 38 Lc Nmomc) α := + pev_pos_of_bern _ Bc 17 1 78 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `80 ≤ n ≤ 100`.** -/ +theorem finite_range {n : ℕ} (h0 : 80 ≤ n) (h1 : n ≤ 100) {α : ℝ} + (hα : 0 ≤ α) (hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (100 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 80) (n := n) (n₁ := 100) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch80To100 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Degree8To9.lean b/LeanPool/Sendov/FiniteRange/Degree8To9.lean new file mode 100644 index 0000000000..cb1a61b236 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Degree8To9.lean @@ -0,0 +1,115 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The batch 8 to 9 + +`Sendov.R_le_batch` bounds every `R n α` for `8 ≤ n ≤ 9` by the elementary part and +moment at `n₀ = 8` together with the prefactor at `n₁ = 9`, so one moment and one +certificate serve all 2 degrees. The certificate has degree 6, set by `n₀` rather +than `n₁`. + +Feasibility at `n₀` is proved rather than assumed: for `n ≥ 36` it follows from +`0 ≤ α ≤ 17`, since `A - c²` increases with `n`. This matters because feasibility propagates +*upward* in `n`, so it could not be inherited from the hypothesis at `n`. + +The moment numerator `Nmomc` is checked against the packed recurrence +(`Sendov.pev_wsum_eq_of_packed`), and the numerator `Sendov.batchP 8 9 2 Lc Nmomc` of +`1 - bound` is certified positive on `[0, 4]` by its Bernstein coefficients `Bc` +(`Sendov.pev_pos_of_bern`). Every closed computation is evaluated by the kernel. +-/ + +@[expose] public section + +namespace Sendov + +namespace Batch8To9 + +/-- The common denominator `L` of the moment weights: `j + 4 ∣ L` for every `j < 2k + 1`. -/ +def Lc : ℤ := 840 + +/-- The base `β` at which polynomials in `α` are packed: it exceeds twice the absolute value +of every coefficient of `Nmomc` and of the weighted row sum `wsum Lc 0 (qrow …)`. -/ +def betac : ℤ := 63228481 + +/-- The base `τ` at which the recurrence rows, evaluated at `betac`, are packed into a single +integer exponentiation: it exceeds twice the absolute value of every row entry. -/ +def tauc : ℤ := 304104393583393026770083796931785379693060776623910754345993 + +/-- The moment numerator at `n₀ = 8`, `k = 2`. -/ +def Nmomc : List ℤ := [ + 5292, + 15960, + 40620, + 3056, + 80] + +/-- Bernstein coefficients of `4 ^ 6 * batchP 8 9 2 Lc Nmomc` on `[0, 4]`. -/ +def Bc : List ℤ := [ + 12347209728, + 104771100672, + 74372272128, + 244634492928, + 961027651584, + 931130081280, + 218915880960] + +lemma c_lo {α : ℝ} (hα : 0 ≤ α) : c 8 α = (42 + 1 * α - 2 * α ^ 2) / (14 * (3 + α)) := by + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + rw [c, M] + push_cast + field_simp + ring + +/-- `c` is nonnegative at `n₀` on the batch's `α`-range. This replaces feasibility at `n₀`, +which for `n₀ < 36` does not follow from `α ≤ 17`. -/ +lemma c_lo_nonneg {α : ℝ} (hα : 0 ≤ α) (hU : α ≤ 4) : 0 ≤ c 8 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + rw [c_lo hα] + apply div_nonneg _ (by positivity) + nlinarith [mul_nonneg hα (sub_nonneg.2 hU), sq_nonneg α] + +theorem pev_Nmomc (α : ℝ) : + pev Nmomc α = pev (wsum Lc 0 (qrow (gg0 8) (gg1 8) (gg2 8) 2)) α := + pev_wsum_eq_of_packed (gg0 8) (gg1 8) (gg2 8) 2 7 Lc betac tauc Nmomc + (by decide +kernel) (by decide +kernel) + (rowZ_bound (gg0 8) (gg1 8) (gg2 8) 2 3 betac tauc (by decide +kernel) + (by simp) (by simp) (by simp) (by decide +kernel)) + (by decide +kernel) + (wsum_bound (gg0 8) (gg1 8) (gg2 8) 2 Lc betac (by decide +kernel) (by decide +kernel)) + (by decide +kernel) + (wsum_length_le Lc _ 0 + (qrow_entry_length_le (gg0 8) (gg1 8) (gg2 8) 3 (by simp) (by simp) (by simp) 2)) + (by decide +kernel) α + +theorem integral_lo (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q 8 α t ^ 2) + = pev Nmomc α / ((Lc : ℝ) * (2 * M 8 * (3 + α)) ^ 2) := + integral_moment_packed 8 2 (by norm_num) α hα Lc (by decide +kernel) Nmomc + (by decide +kernel) (pev_Nmomc α) + +/-- The certificate: `batchP 8 9 2 Lc Nmomc` is positive on `[0, 4]`. -/ +lemma P_pos {α : ℝ} (hα : 0 ≤ α) (hU : (1 : ℝ) * α ≤ 4) : + 0 < pev (batchP 8 9 2 Lc Nmomc) α := + pev_pos_of_bern _ Bc 4 1 6 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by exact_mod_cast hU) + +/-- **The batch `8 ≤ n ≤ 9`.** -/ +theorem finite_range {n : ℕ} (h0 : 8 ≤ n) (h1 : n ≤ 9) {α : ℝ} + (hα : 0 ≤ α) (_hα' : α ≤ 17) (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have h2α : 2 * α ≤ (9 : ℝ) - 1 := by + exact_mod_cast two_alpha_le_of_le (by omega) h1 hfeas + refine lt_of_le_of_lt (R_le_batch (n₀ := 8) (n := n) (n₁ := 9) (by norm_num) h0 h1 hα + (c_lo_nonneg hα (by linarith)) hfeas) ?_ + exact batch_lt_one (by norm_num) (by norm_num) (by norm_num) Lc (by decide +kernel) Nmomc hα + (integral_lo α hα) (P_pos hα (by linarith)) + +end Batch8To9 + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Moments.lean b/LeanPool/Sendov/FiniteRange/Moments.lean new file mode 100644 index 0000000000..cef21a1e19 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Moments.lean @@ -0,0 +1,135 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Common.Basic +public import Mathlib.Analysis.SpecialFunctions.Integrals.Basic + +/-! +# Polynomial moments + +The integrals `∫ t in 0..1, t ^ 3 * Q ^ k` appearing in `Sendov.R` are, for natural `k`, +integrals of polynomials, hence exactly computable. This file computes them once and for +all. + +Expanding `Q = 1 + bt + dt²` by the binomial theorem twice gives + + `(1 + bt + dt²) ^ k = ∑ i < k+1, ∑ l < i+1, C(k,i) C(i,l) bˡ d^(i-l) t^(2i-l)` + +(`Sendov.quad_pow`), and integrating `t ^ 3` times this term by term gives + + `∫ t in 0..1, t ^ 3 * Q ^ k = ∑ i < k+1, ∑ l < i+1, C(k,i) C(i,l) bˡ d^(i-l) / (2i-l+4)` + +(`Sendov.integral_moment`), with `b = -2c` and `d = A`. This is formula `(M)` of the +informal plan. Every degree of the finite range reduces to this finite sum: even degrees +use it directly with `k = (n-4)/2`, and odd degrees use it for `k` and `k+1` after +`Sendov.integral_rpow_le` has removed the square root. + +Note that no hypothesis on `c`, `A` or `α` is needed here — the identity is a polynomial +one. Feasibility is required only for the odd-degree reduction, never for the moments. +-/ + +@[expose] public section + +namespace Sendov + +open MeasureTheory Finset + +/-- Every monomial is interval integrable on `[0,1]`. -/ +lemma intervalIntegrable_const_mul_pow (a : ℝ) (m : ℕ) : + IntervalIntegrable (fun t : ℝ => a * t ^ m) volume 0 1 := + (by fun_prop : Continuous fun t : ℝ => a * t ^ m).intervalIntegrable _ _ + +/-- The binomial expansion of a power of a quadratic. -/ +lemma quad_pow (b d t : ℝ) (k : ℕ) : + (1 + b * t + d * t ^ 2) ^ k + = ∑ i ∈ range (k + 1), ∑ l ∈ range (i + 1), + ((k.choose i : ℝ) * (i.choose l) * b ^ l * d ^ (i - l)) * t ^ (2 * i - l) := by + rw [show (1 + b * t + d * t ^ 2) = (b * t + d * t ^ 2) + 1 by ring, add_pow] + refine sum_congr rfl fun i _ => ?_ + rw [one_pow, mul_one, add_pow, sum_mul] + refine sum_congr rfl fun l hl => ?_ + have hl' : l ≤ i := Nat.lt_succ_iff.1 (mem_range.1 hl) + have hexp : l + 2 * (i - l) = 2 * i - l := by omega + rw [mul_pow, mul_pow, ← pow_mul] + calc b ^ l * t ^ l * (d ^ (i - l) * t ^ (2 * (i - l))) * (i.choose l : ℝ) * (k.choose i : ℝ) + = ((k.choose i : ℝ) * (i.choose l) * b ^ l * d ^ (i - l)) * (t ^ l * t ^ (2 * (i - l))) := by + ring + _ = ((k.choose i : ℝ) * (i.choose l) * b ^ l * d ^ (i - l)) * t ^ (2 * i - l) := by + rw [← pow_add, hexp] + +/-- The expansion of the integrand of `Sendov.R` as an explicit polynomial. -/ +lemma t3_mul_Q_pow (n : ℕ) (α t : ℝ) (k : ℕ) : + t ^ 3 * Q n α t ^ k + = ∑ i ∈ range (k + 1), ∑ l ∈ range (i + 1), + ((k.choose i : ℝ) * (i.choose l) * (-2 * c n α) ^ l * A n α ^ (i - l)) + * t ^ (2 * i - l + 3) := by + have hQ : Q n α t = 1 + (-2 * c n α) * t + A n α * t ^ 2 := by simp only [Q]; ring + rw [hQ, quad_pow, mul_sum] + refine sum_congr rfl fun i _ => ?_ + rw [mul_sum] + refine sum_congr rfl fun l hl => ?_ + have hl' : l ≤ i := Nat.lt_succ_iff.1 (mem_range.1 hl) + have hexp : 3 + (2 * i - l) = 2 * i - l + 3 := by omega + calc t ^ 3 * (((k.choose i : ℝ) * (i.choose l) * (-2 * c n α) ^ l * A n α ^ (i - l)) + * t ^ (2 * i - l)) + = ((k.choose i : ℝ) * (i.choose l) * (-2 * c n α) ^ l * A n α ^ (i - l)) + * (t ^ 3 * t ^ (2 * i - l)) := by ring + _ = _ := by rw [← pow_add, hexp] + +/-- The `k`-th moment `∫ t in 0..1, t ^ 3 * Q ^ k`, as an explicit finite double sum. This +is `(M)` of the informal plan. -/ +noncomputable def mom (n : ℕ) (α : ℝ) (k : ℕ) : ℝ := + ∑ i ∈ range (k + 1), ∑ l ∈ range (i + 1), + ((k.choose i : ℝ) * (i.choose l) * (-2 * c n α) ^ l * A n α ^ (i - l)) + / ((2 * i - l + 4 : ℕ) : ℝ) + +/-- **The moment formula.** The integrals appearing in `Sendov.R` are exactly the finite +double sum `Sendov.mom`, for every natural `k`, with no hypotheses at all. -/ +theorem integral_moment (n : ℕ) (α : ℝ) (k : ℕ) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q n α t ^ k) = mom n α k := by + rw [mom] + have hfun : (fun t : ℝ => t ^ 3 * Q n α t ^ k) + = fun t : ℝ => ∑ i ∈ range (k + 1), ∑ l ∈ range (i + 1), + ((k.choose i : ℝ) * (i.choose l) * (-2 * c n α) ^ l * A n α ^ (i - l)) + * t ^ (2 * i - l + 3) := + funext fun t => t3_mul_Q_pow n α t k + rw [hfun, intervalIntegral.integral_finsetSum] + · refine sum_congr rfl fun i _ => ?_ + rw [intervalIntegral.integral_finsetSum] + · refine sum_congr rfl fun l _ => ?_ + rw [intervalIntegral.integral_const_mul, integral_pow] + push_cast + rw [one_pow] + norm_num + ring + · exact fun l _ => intervalIntegrable_const_mul_pow _ _ + · intro i _ + refine (Continuous.intervalIntegrable ?_ _ _) + exact continuous_finsetSum _ fun l _ => by fun_prop + +/-- The moments of a polynomial supported in degrees three to seven, kept as a convenience +for the low degrees. -/ +lemma integral_poly7 (a₀ a₁ a₂ a₃ a₄ : ℝ) : + (∫ t in (0 : ℝ)..1, (a₀ * t ^ 3 + a₁ * t ^ 4 + a₂ * t ^ 5 + a₃ * t ^ 6 + a₄ * t ^ 7)) + = a₀ / 4 + a₁ / 5 + a₂ / 6 + a₃ / 7 + a₄ / 8 := by + have h₀ := intervalIntegrable_const_mul_pow a₀ 3 + have h₁ := intervalIntegrable_const_mul_pow a₁ 4 + have h₂ := intervalIntegrable_const_mul_pow a₂ 5 + have h₃ := intervalIntegrable_const_mul_pow a₃ 6 + have h₄ := intervalIntegrable_const_mul_pow a₄ 7 + rw [intervalIntegral.integral_add (((h₀.add h₁).add h₂).add h₃) h₄, + intervalIntegral.integral_add ((h₀.add h₁).add h₂) h₃, + intervalIntegral.integral_add (h₀.add h₁) h₂, + intervalIntegral.integral_add h₀ h₁, + intervalIntegral.integral_const_mul, intervalIntegral.integral_const_mul, + intervalIntegral.integral_const_mul, intervalIntegral.integral_const_mul, + intervalIntegral.integral_const_mul, + integral_pow, integral_pow, integral_pow, integral_pow, integral_pow] + norm_num + ring + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/OddBound.lean b/LeanPool/Sendov/FiniteRange/OddBound.lean new file mode 100644 index 0000000000..3672bb3122 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/OddBound.lean @@ -0,0 +1,77 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Common.Rpow + +/-! +# The odd-degree bound + +For odd `n` the exponent `(n-4)/2` is the half-integer `k + 1/2` with `k = (n-5)/2`, and +`Sendov.R` involves a genuine square root. Writing `Q ^ (k+1/2) = Q ^ k * √Q` and bounding +`√Q` by a tangent line to the square root replaces it by polynomial moments: + + `∫ t in 0..1, t ^ 3 * Q ^ (k+1/2) ≤ ∫ t in 0..1, t ^ 3 * (Q ^ k * (Q/(2w) + w/2))` + +for any `w > 0` (`Sendov.integral_rpow_le`). This is the only place where `Real.sqrt` +appears; the statement above is already free of it. + +The tangent line `√q ≤ q/(2w) + w/2` touches at `q = w²`, so `w` should be chosen near the +values of `Q` that matter. Taking `w = 1` recovers `2√u ≤ 1 + u`, which is bound `(O)` of +the informal plan and is sharp enough for every odd `n ≥ 7`. Degree five needs a smaller +`w`: there the relevant values of `Q` are small, `w = 1` overshoots (it gives an upper bound +exceeding `1`, so it proves nothing), and `w = 1/3` works comfortably. This is what lets +degree five avoid the chord bound and the substitution `α = 3r²/(1-r²)` proposed in the +plan. + +Note that only `0 ≤ Q` is needed, never `Q ≤ 1`: the tangent-line inequality is just +`(√q - w)² ≥ 0`. +-/ + +@[expose] public section + +namespace Sendov + +open MeasureTheory + +variable {n : ℕ} {α q w : ℝ} + +/-- The tangent line to `√·` at `q = w²`: `√q ≤ q/(2w) + w/2`. -/ +lemma sqrt_le_tangent (hq : 0 ≤ q) (hw : 0 < w) : Real.sqrt q ≤ q / (2 * w) + w / 2 := by + have hrw : q / (2 * w) + w / 2 = (q + w ^ 2) / (2 * w) := by field_simp + rw [hrw, le_div_iff₀ (by positivity)] + nlinarith [sq_nonneg (Real.sqrt q - w), Real.sq_sqrt hq] + +/-- The half-integer power bound `q ^ (k + 1/2) ≤ q ^ k * (q/(2w) + w/2)`. -/ +lemma rpow_add_half_le (hq : 0 ≤ q) (k : ℕ) (hw : 0 < w) : + q ^ ((k : ℝ) + 1 / 2) ≤ q ^ k * (q / (2 * w) + w / 2) := by + rcases hq.lt_or_eq with h | h + · have he : q ^ ((k : ℝ) + 1 / 2) = q ^ k * Real.sqrt q := by + rw [Real.rpow_add h, Real.rpow_natCast, Real.sqrt_eq_rpow] + rw [he] + exact mul_le_mul_of_nonneg_left (sqrt_le_tangent hq hw) (pow_nonneg hq k) + · rw [← h, Real.zero_rpow (by positivity)] + refine mul_nonneg (pow_nonneg le_rfl k) ?_ + rw [zero_div] + linarith + +/-- **The odd-degree bound.** The square root is eliminated in favour of polynomial +moments, at the cost of a free parameter `w > 0`. -/ +lemma integral_rpow_le (hfeas : c n α ^ 2 ≤ A n α) (k : ℕ) + (hk : ((n : ℝ) - 4) / 2 = (k : ℝ) + 1 / 2) (hw : 0 < w) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q n α t ^ (((n : ℝ) - 4) / 2)) + ≤ ∫ t in (0 : ℝ)..1, t ^ 3 * (Q n α t ^ k * (Q n α t / (2 * w) + w / 2)) := by + have he : (0 : ℝ) ≤ ((n : ℝ) - 4) / 2 := by rw [hk]; positivity + refine intervalIntegral.integral_mono_on (by norm_num) + ((continuous_integrand n α he).intervalIntegrable _ _) + ((by simp only [Q]; fun_prop : Continuous fun t : ℝ => + t ^ 3 * (Q n α t ^ k * (Q n α t / (2 * w) + w / 2))).intervalIntegrable _ _) ?_ + intro t ht + refine mul_le_mul_of_nonneg_left ?_ (pow_nonneg ht.1 3) + rw [hk] + exact rpow_add_half_le (Q_nonneg hfeas t) k hw + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Pack.lean b/LeanPool/Sendov/FiniteRange/Pack.lean new file mode 100644 index 0000000000..10eeeb15dc --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Pack.lean @@ -0,0 +1,245 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import Mathlib.Data.List.Basic +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Ring + +/-! +# Kronecker packing of dense polynomials + +`Sendov.qrow` computes the coefficients of `(g₀ + g₁t + g₂t²) ^ k` as a `List (List ℤ)`. +That is correct but the kernel evaluates list recursion by interpretation, which costs +`Θ(k³)` interpreted steps: measured, `k = 24` takes two minutes and `k = 32` over twenty. + +Kernel `Nat` arithmetic, by contrast, is GMP-backed and fast — a 4000-digit multiplication +and a 50th power are milliseconds. So the fix is to change the *representation*, not the +algorithm: pack a dense polynomial into a single natural number by evaluating it at a base +`b = 2 ^ B` larger than every coefficient. Multiplication of polynomials then becomes +multiplication of naturals, and the whole recurrence collapses to `base ^ k`, one +exponentiation. Measured on the real shapes, `k = 46` drops from hours to about half a +second. + +This file provides the arithmetic core: evaluation `Sendov.npev`, the digit extraction +`Sendov.unpackN`, and the round trip `Sendov.unpackN_npev` saying that packing is faithful +exactly when every coefficient is below the base. The bound hypothesis is what the caller +must supply, and it is the only genuinely new obligation the packing introduces. + +Everything here is about `ℕ`; signed coefficients are handled downstream by splitting a +`ℤ`-polynomial into its positive and negative parts. + +## Main statements + +* `Sendov.npev_cons`, `Sendov.npev_append`: how evaluation behaves; +* `Sendov.unpackN_npev`: `unpackN b p.length (npev p b) = p` for coefficients below `b`. +-/ + +@[expose] public section + +namespace Sendov + +/-- Evaluate a dense `ℕ`-polynomial (lowest degree first) at `b`, by Horner's rule. This is +the packing map: `npev p b` is the single natural number representing `p`. -/ +def npev : List ℕ → ℕ → ℕ + | [], _ => 0 + | a :: p, b => a + b * npev p b + +@[simp] lemma npev_nil (b : ℕ) : npev [] b = 0 := rfl + +@[simp] lemma npev_cons (a : ℕ) (p : List ℕ) (b : ℕ) : + npev (a :: p) b = a + b * npev p b := rfl + +/-- Recover the first `m` coefficients of a packed polynomial. -/ +def unpackN (b : ℕ) : ℕ → ℕ → List ℕ + | 0, _ => [] + | m + 1, x => (x % b) :: unpackN b m (x / b) + +@[simp] lemma unpackN_zero (b x : ℕ) : unpackN b 0 x = [] := rfl + +@[simp] lemma unpackN_succ (b m x : ℕ) : + unpackN b (m + 1) x = (x % b) :: unpackN b m (x / b) := rfl + +/-- **Packing is faithful.** If every coefficient is smaller than the base, evaluation at +the base loses nothing: the coefficients can be read back off by division with remainder. + +This is the standard Kronecker-substitution correctness statement, and the hypothesis +`∀ a ∈ p, a < b` is exactly the overflow condition the caller must discharge. -/ +theorem unpackN_npev (b : ℕ) (hb : 0 < b) : + ∀ p : List ℕ, (∀ a ∈ p, a < b) → unpackN b p.length (npev p b) = p := by + intro p + induction p with + | nil => intro _; rfl + | cons a p ih => + intro hlt + have ha : a < b := hlt a (List.mem_cons_self ..) + have hp : ∀ x ∈ p, x < b := fun x hx => hlt x (List.mem_cons_of_mem _ hx) + have hmod : (a + b * npev p b) % b = a := by + rw [Nat.add_mul_mod_self_left, Nat.mod_eq_of_lt ha] + have hdiv : (a + b * npev p b) / b = npev p b := by + rw [Nat.add_mul_div_left _ _ hb, Nat.div_eq_of_lt ha, Nat.zero_add] + simp only [List.length_cons, npev_cons, unpackN_succ, hmod, hdiv, ih hp] + +/-- Evaluation of a concatenation: the second block is shifted by `b ^ (length of the +first)`. This is what makes the two-dimensional packing work. -/ +lemma npev_append (p q : List ℕ) (b : ℕ) : + npev (p ++ q) b = npev p b + b ^ p.length * npev q b := by + induction p with + | nil => simp + | cons a p ih => + simp only [List.cons_append, npev_cons, ih, List.length_cons] + ring + +/-! ### Packing is a ring homomorphism -/ + +/-- Addition of dense `ℕ`-polynomials. -/ +def paddN : List ℕ → List ℕ → List ℕ + | [], q => q + | a :: p, [] => a :: p + | a :: p, c :: q => (a + c) :: paddN p q + +/-- Multiplication of dense `ℕ`-polynomials. -/ +def pmulN : List ℕ → List ℕ → List ℕ + | [], _ => [] + | a :: p, q => paddN (q.map (fun c => a * c)) (0 :: pmulN p q) + +/-- The `k`-th power of a dense `ℕ`-polynomial. -/ +def ppowN (p : List ℕ) : ℕ → List ℕ + | 0 => [1] + | k + 1 => pmulN p (ppowN p k) + +lemma npev_paddN (p q : List ℕ) (b : ℕ) : + npev (paddN p q) b = npev p b + npev q b := by + induction p generalizing q with + | nil => simp [paddN] + | cons a p ih => + cases q with + | nil => simp [paddN] + | cons c q => + simp only [paddN, npev_cons, ih] + ring + +lemma npev_map_mul (a : ℕ) (q : List ℕ) (b : ℕ) : + npev (q.map (fun c => a * c)) b = a * npev q b := by + induction q with + | nil => simp + | cons c q ih => + simp only [List.map_cons, npev_cons, ih] + ring + +lemma npev_pmulN (p q : List ℕ) (b : ℕ) : + npev (pmulN p q) b = npev p b * npev q b := by + induction p with + | nil => simp [pmulN] + | cons a p ih => + simp only [pmulN, npev_paddN, npev_map_mul, npev_cons, ih] + ring + +lemma npev_ppowN (p : List ℕ) (b k : ℕ) : npev (ppowN p k) b = npev p b ^ k := by + induction k with + | zero => simp [ppowN] + | succ k ih => simp only [ppowN, npev_pmulN, ih, pow_succ]; ring + +/-! ### The overflow bound -/ + +/-- Every coefficient is at most the sum of the coefficients, which is the value at `1`. -/ +lemma mem_le_npev_one : ∀ (q : List ℕ) (a : ℕ), a ∈ q → a ≤ npev q 1 := by + intro q + induction q with + | nil => intro a ha; cases ha + | cons c q ih => + intro a ha + rcases List.mem_cons.1 ha with h | h + · subst h; simp + · have := ih a h + simp only [npev_cons, one_mul] + omega + +/-- **Kronecker substitution.** The coefficients of `p ^ k` are recovered from the single +natural number `(npev p b) ^ k`, provided the base `b` exceeds every coefficient of `p ^ k` +— for which `(npev p 1) ^ k < b` suffices, `npev p 1` being the sum of the coefficients. + +This is the statement that lets the kernel replace `Θ(k³)` interpreted list steps by one +GMP-backed exponentiation. -/ +theorem unpackN_pow (b : ℕ) (hb : 0 < b) (p : List ℕ) (k : ℕ) + (hbound : npev p 1 ^ k < b) : + unpackN b (ppowN p k).length (npev p b ^ k) = ppowN p k := by + rw [← npev_ppowN p b k] + refine unpackN_npev b hb _ fun a ha => ?_ + have h1 : a ≤ npev (ppowN p k) 1 := mem_le_npev_one _ a ha + rw [npev_ppowN] at h1 + omega + +/-! ### Signed coefficients + +The recurrence's middle coefficient `g₁ = -2Dc` is negative, so the polynomials that have to +be packed have coefficients in `ℤ`. Packing is still evaluation at the base — the same +homomorphism — but reading the coefficients back needs *balanced* digits: the representative +of `x % b` taken in `(-b/2, b/2)` rather than `[0, b)`. The overflow condition becomes +`2 * |c| < b`. -/ + +/-- Evaluate a dense `ℤ`-polynomial at an integer. This is the signed packing map. -/ +def pevZ : List ℤ → ℤ → ℤ + | [], _ => 0 + | a :: p, b => a + b * pevZ p b + +@[simp] lemma pevZ_nil (b : ℤ) : pevZ [] b = 0 := rfl + +@[simp] lemma pevZ_cons (a : ℤ) (p : List ℤ) (b : ℤ) : + pevZ (a :: p) b = a + b * pevZ p b := rfl + +/-- The balanced representative of `x` modulo `b`, lying in `(-b/2, b/2)` when `b` is +positive and `x` is a balanced digit. -/ +def bdig (b x : ℤ) : ℤ := if 2 * (x % b) < b then x % b else x % b - b + +/-- Recover the first `m` balanced digits of a packed `ℤ`-polynomial. -/ +def unpackZ (b : ℤ) : ℕ → ℤ → List ℤ + | 0, _ => [] + | m + 1, x => bdig b x :: unpackZ b m ((x - bdig b x) / b) + +@[simp] lemma unpackZ_zero (b x : ℤ) : unpackZ b 0 x = [] := rfl + +@[simp] lemma unpackZ_succ (b : ℤ) (m : ℕ) (x : ℤ) : + unpackZ b (m + 1) x = bdig b x :: unpackZ b m ((x - bdig b x) / b) := rfl + +/-- The balanced digit of `c + b * N` is `c`, provided `2 * |c| < b`. -/ +lemma bdig_add_mul (b c N : ℤ) (hb : 0 < b) (hc : 2 * |c| < b) : + bdig b (c + b * N) = c := by + have hmod : (c + b * N) % b = c % b := Int.add_mul_emod_self_left c b N + by_cases h : 0 ≤ c + · rw [abs_of_nonneg h] at hc + have hcb : c < b := by linarith + have hx : (c + b * N) % b = c := by rw [hmod, Int.emod_eq_of_lt h hcb] + simp only [bdig, hx] + split_ifs + omega + · have h' : c < 0 := not_le.1 h + rw [abs_of_neg h'] at hc + have hcb : c % b = c + b := by + have e1 : (c + b) % b = c % b := by simp + have e2 : (c + b) % b = c + b := Int.emod_eq_of_lt (by linarith) (by linarith) + omega + have hx : (c + b * N) % b = c + b := by rw [hmod, hcb] + simp only [bdig, hx] + split_ifs <;> omega + +/-- **Signed packing is faithful.** If `2 * |c| < b` for every coefficient `c`, the +coefficients are recovered from the single integer `pevZ p b` by balanced-digit extraction. -/ +theorem unpackZ_pevZ (b : ℤ) (hb : 0 < b) : + ∀ p : List ℤ, (∀ a ∈ p, 2 * |a| < b) → unpackZ b p.length (pevZ p b) = p := by + intro p + induction p with + | nil => intro _; rfl + | cons a p ih => + intro hlt + have ha : 2 * |a| < b := hlt a (List.mem_cons_self ..) + have hp : ∀ x ∈ p, 2 * |x| < b := fun x hx => hlt x (List.mem_cons_of_mem _ hx) + have hd : bdig b (a + b * pevZ p b) = a := bdig_add_mul b a _ hb ha + have hq : (a + b * pevZ p b - a) / b = pevZ p b := by + rw [add_sub_cancel_left, Int.mul_ediv_cancel_left _ hb.ne'] + simp only [List.length_cons, pevZ_cons, unpackZ_succ, hd, hq, ih hp] + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/PackBridge.lean b/LeanPool/Sendov/FiniteRange/PackBridge.lean new file mode 100644 index 0000000000..444624d347 --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/PackBridge.lean @@ -0,0 +1,643 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Pack +public import LeanPool.Sendov.FiniteRange.Recurrence + +/-! +# Computing the recurrence by a single exponentiation + +`Sendov.rev_qrow` says that `qrow` computes the coefficients of `(g₀ + g₁t + g₂t²) ^ k`. +Evaluating that identity at *integer* points turns it into a statement about packed values, +and the packing is nothing but the same Horner evaluation read in `ℤ` instead of `ℝ`. So the +forward direction needs no new theory at all: `Sendov.pevZ_rowZ_qrow` follows from +`rev_qrow` by casting. + +Two bases are involved: + +* `β` packs a coefficient polynomial in `α` into one integer (`Sendov.pevZ`); +* `τ` packs the resulting row, a polynomial in `t`, into one integer. + +Together they are the two-dimensional Kronecker substitution, and the whole recurrence +becomes `G ^ k` for the single integer `G = pevZ g₀ β + pevZ g₁ β * τ + pevZ g₂ β * τ²`. +`Sendov.unpackZ_pevZ` then reads the row back off, given the overflow bounds — which is where +the numerical parameters `β` and `τ` have to be chosen, one per degree. + +## Main statements + +* `Sendov.pev_intCast`, `Sendov.rev_intCast`: evaluation over `ℝ` at an integer point agrees + with the packed evaluation over `ℤ`; +* `Sendov.pevZ_rowZ_qrow`: the recurrence as one integer exponentiation. +-/ + +@[expose] public section + +namespace Sendov + +/-- The row with each coefficient polynomial packed at the base `β`. -/ +def rowZ (r : List (List ℤ)) (β : ℤ) : List ℤ := r.map (fun p => pevZ p β) + +@[simp] lemma rowZ_nil (β : ℤ) : rowZ [] β = [] := rfl + +@[simp] lemma rowZ_cons (p : List ℤ) (r : List (List ℤ)) (β : ℤ) : + rowZ (p :: r) β = pevZ p β :: rowZ r β := rfl + +@[simp] lemma rowZ_length (r : List (List ℤ)) (β : ℤ) : (rowZ r β).length = r.length := by + simp [rowZ] + +/-- Evaluating a coefficient polynomial over `ℝ` at an integer point is the packed +evaluation over `ℤ`. -/ +lemma pev_intCast (p : List ℤ) (b : ℤ) : pev p (b : ℝ) = (pevZ p b : ℝ) := by + induction p with + | nil => simp [pev] + | cons a p ih => + simp only [pev, pevZ_cons, ih] + push_cast + ring + +/-- Evaluating a row over `ℝ` at integer points is the packed evaluation over `ℤ`. -/ +lemma rev_intCast (r : List (List ℤ)) (β τ : ℤ) : + rev r (β : ℝ) (τ : ℝ) = (pevZ (rowZ r β) τ : ℝ) := by + induction r with + | nil => simp [rev] + | cons p r ih => + simp only [rev_cons, rowZ_cons, pevZ_cons, ih, pev_intCast] + push_cast + ring + +/-- **The recurrence as one exponentiation.** The two-dimensionally packed row is the `k`-th +power of a single integer. In the kernel this replaces `Θ(k³)` interpreted list steps by one +GMP-backed exponentiation; measured at `k = 46`, hours become about half a second. -/ +theorem pevZ_rowZ_qrow (g₀ g₁ g₂ : List ℤ) (k : ℕ) (β τ : ℤ) : + pevZ (rowZ (qrow g₀ g₁ g₂ k) β) τ + = (pevZ g₀ β + pevZ g₁ β * τ + pevZ g₂ β * τ ^ 2) ^ k := by + have h := rev_qrow g₀ g₁ g₂ k (β : ℝ) (τ : ℝ) + rw [rev_intCast, pev_intCast, pev_intCast, pev_intCast] at h + exact_mod_cast h + +/-- Reading the packed row back, given the overflow bound on the packed coefficients. The +bound is a hypothesis: it is discharged per degree from explicit numerical parameters. -/ +theorem rowZ_qrow_eq (g₀ g₁ g₂ : List ℤ) (k : ℕ) (β τ : ℤ) (hτ : 0 < τ) + (hbound : ∀ a ∈ rowZ (qrow g₀ g₁ g₂ k) β, 2 * |a| < τ) : + unpackZ τ (qrow g₀ g₁ g₂ k).length + ((pevZ g₀ β + pevZ g₁ β * τ + pevZ g₂ β * τ ^ 2) ^ k) + = rowZ (qrow g₀ g₁ g₂ k) β := by + rw [← pevZ_rowZ_qrow, ← rowZ_length (qrow g₀ g₁ g₂ k) β] + exact unpackZ_pevZ τ hτ _ hbound + +/-! ### The moment as a single integer polynomial + +`Sendov.irow` has rational weights `1/(j+4)`. Scaling by a common multiple `L` of the +denominators clears them, turning the moment into one `ℤ`-polynomial in `α`. -/ + +/-- `∑ⱼ (L/(i+j+4)) • rⱼ`: the moment numerator, scaled by `L` to clear denominators. -/ +def wsum (L : ℤ) : ℕ → List (List ℤ) → List ℤ + | _, [] => [] + | i, p :: r => padd (p.map (fun c => (L / ((i : ℤ) + 4)) * c)) (wsum L (i + 1) r) + +@[simp] lemma wsum_nil (L : ℤ) (i : ℕ) : wsum L i [] = [] := rfl + +@[simp] lemma wsum_cons (L : ℤ) (i : ℕ) (p : List ℤ) (r : List (List ℤ)) : + wsum L i (p :: r) + = padd (p.map (fun c => (L / ((i : ℤ) + 4)) * c)) (wsum L (i + 1) r) := rfl + +/-- **The scaled moment is an integer polynomial.** Given that `L` clears every denominator +`i+j+4` occurring, `wsum` computes `L` times `Sendov.irow`. -/ +theorem pev_wsum (L : ℤ) : ∀ (r : List (List ℤ)) (i : ℕ) (α : ℝ), + (∀ j, j < r.length → ((i : ℤ) + j + 4) ∣ L) → + pev (wsum L i r) α = (L : ℝ) * irow r i α := by + intro r + induction r with + | nil => intro i α _; simp [irow] + | cons p r ih => + intro i α hdvd + have h0 : ((i : ℤ) + 4) ∣ L := by + have := hdvd 0 (by simp) + simpa using this + obtain ⟨m, hm⟩ := h0 + have hine : ((i : ℤ) + 4) ≠ 0 := by positivity + have hw : L / ((i : ℤ) + 4) = m := by rw [hm, Int.mul_ediv_cancel_left _ hine] + have hcast : ((m : ℤ) : ℝ) * ((i : ℝ) + 4) = (L : ℝ) := by + rw [hm]; push_cast; ring + have hi4 : ((i : ℝ) + 4) ≠ 0 := by positivity + have hrest : ∀ j, j < r.length → (((i + 1 : ℕ) : ℤ) + j + 4) ∣ L := by + intro j hj + have := hdvd (j + 1) (by simpa using Nat.succ_lt_succ hj) + push_cast at this ⊢ + convert this using 2 + ring + rw [wsum_cons, pev_padd, pev_map_mul, hw, ih (i + 1) α hrest] + simp only [irow] + field_simp + linear_combination (pev p α) * hcast + +/-! ### Coefficient bounds + +Injectivity of packing needs a bound on the coefficients of *both* lists compared — including +the true row, which is precisely the object we must not compute. So the bound has to be +proved rather than checked. The `L¹` norm does it: it is submultiplicative, so a coefficient +of the `k`-th power is at most `(l1 g₀ + l1 g₁ + l1 g₂) ^ k`. -/ + +/-- Sum of absolute values of the coefficients. -/ +def l1 : List ℤ → ℤ + | [] => 0 + | a :: p => |a| + l1 p + +@[simp] lemma l1_nil : l1 [] = 0 := rfl + +@[simp] lemma l1_cons (a : ℤ) (p : List ℤ) : l1 (a :: p) = |a| + l1 p := rfl + +lemma l1_nonneg (p : List ℤ) : 0 ≤ l1 p := by + induction p with + | nil => simp + | cons a p ih => have := abs_nonneg a; simp only [l1_cons]; omega + +lemma abs_le_l1 : ∀ (p : List ℤ) (a : ℤ), a ∈ p → |a| ≤ l1 p := by + intro p + induction p with + | nil => intro a ha; cases ha + | cons c p ih => + intro a ha + rcases List.mem_cons.1 ha with h | h + · subst h; have := l1_nonneg p; simp only [l1_cons]; omega + · have := ih a h; have := abs_nonneg c; simp only [l1_cons]; omega + +lemma l1_padd (p q : List ℤ) : l1 (padd p q) ≤ l1 p + l1 q := by + induction p generalizing q with + | nil => simp [padd] + | cons a p ih => + cases q with + | nil => simp [padd] + | cons b q => + have h1 := ih q + have h2 := abs_add_le a b + simp only [padd, l1_cons] + omega + +lemma l1_map_mul (c : ℤ) (q : List ℤ) : l1 (q.map (fun x => c * x)) = |c| * l1 q := by + induction q with + | nil => simp + | cons b q ih => + simp only [List.map_cons, l1_cons, ih, abs_mul] + ring + +lemma l1_pmul (p q : List ℤ) : l1 (pmul p q) ≤ l1 p * l1 q := by + induction p with + | nil => simp [pmul] + | cons a p ih => + have hstep : l1 (padd (q.map (fun c => a * c)) (0 :: pmul p q)) + ≤ |a| * l1 q + l1 (pmul p q) := by + have := l1_padd (q.map (fun c => a * c)) (0 :: pmul p q) + rw [l1_map_mul] at this + simpa using this + have hq := l1_nonneg q + simp only [pmul, l1_cons] + nlinarith [ih, hq, hstep] + +/-- The `L¹` norm of a row: the total of its coefficients' absolute values. -/ +def l1row : List (List ℤ) → ℤ + | [] => 0 + | p :: r => l1 p + l1row r + +@[simp] lemma l1row_nil : l1row [] = 0 := rfl + +@[simp] lemma l1row_cons (p : List ℤ) (r : List (List ℤ)) : + l1row (p :: r) = l1 p + l1row r := rfl + +lemma l1row_nonneg (r : List (List ℤ)) : 0 ≤ l1row r := by + induction r with + | nil => simp + | cons p r ih => have := l1_nonneg p; simp only [l1row_cons]; omega + +lemma l1row_radd (r s : List (List ℤ)) : l1row (radd r s) ≤ l1row r + l1row s := by + induction r generalizing s with + | nil => simp [radd] + | cons p r ih => + cases s with + | nil => simp [radd] + | cons q s => + have h1 := ih s + have h2 := l1_padd p q + simp only [radd, l1row_cons] + omega + +lemma l1row_rscale (g : List ℤ) (r : List (List ℤ)) : + l1row (rscale g r) ≤ l1 g * l1row r := by + induction r with + | nil => simp [rscale] + | cons p r ih => + have := l1_pmul g p + simp only [rscale, List.map_cons, l1row_cons] at * + nlinarith [ih, l1_nonneg g, l1row_nonneg r] + +lemma l1row_qstep (g₀ g₁ g₂ : List ℤ) (r : List (List ℤ)) : + l1row (qstep g₀ g₁ g₂ r) ≤ (l1 g₀ + l1 g₁ + l1 g₂) * l1row r := by + have h0 := l1row_rscale g₀ r + have h1 := l1row_rscale g₁ r + have h2 := l1row_rscale g₂ r + have e1 := l1row_radd (rscale g₀ r) (radd ([] :: rscale g₁ r) ([] :: [] :: rscale g₂ r)) + have e2 := l1row_radd ([] :: rscale g₁ r) ([] :: [] :: rscale g₂ r) + simp only [qstep, l1row_cons, l1_nil] at * + nlinarith [e1, e2, h0, h1, h2] + +/-- The coefficients of the `k`-th power are bounded by the `k`-th power of the `L¹` norm. +This is the bound that the packing base must exceed. -/ +theorem l1row_qrow (g₀ g₁ g₂ : List ℤ) (k : ℕ) : + l1row (qrow g₀ g₁ g₂ k) ≤ (l1 g₀ + l1 g₁ + l1 g₂) ^ k := by + induction k with + | zero => simp [qrow] + | succ k ih => + have hg : 0 ≤ l1 g₀ + l1 g₁ + l1 g₂ := by + have := l1_nonneg g₀; have := l1_nonneg g₁; have := l1_nonneg g₂; omega + calc l1row (qrow g₀ g₁ g₂ (k + 1)) + ≤ (l1 g₀ + l1 g₁ + l1 g₂) * l1row (qrow g₀ g₁ g₂ k) := l1row_qstep _ _ _ _ + _ ≤ (l1 g₀ + l1 g₁ + l1 g₂) * (l1 g₀ + l1 g₁ + l1 g₂) ^ k := by + exact mul_le_mul_of_nonneg_left ih hg + _ = (l1 g₀ + l1 g₁ + l1 g₂) ^ (k + 1) := by ring + +/-! ### Lengths, and the magnitude of a packed value -/ + +lemma padd_length (p q : List ℤ) : (padd p q).length = max p.length q.length := by + induction p generalizing q with + | nil => simp [padd] + | cons a p ih => + cases q with + | nil => simp [padd] + | cons c q => simp [padd, ih] + +lemma radd_length (r s : List (List ℤ)) : + (radd r s).length = max r.length s.length := by + induction r generalizing s with + | nil => simp [radd] + | cons p r ih => + cases s with + | nil => simp [radd] + | cons q s => simp [radd, ih] + +@[simp] lemma rscale_length (g : List ℤ) (r : List (List ℤ)) : + (rscale g r).length = r.length := by + simp [rscale] + +/-- The row of the `k`-th power has `2k+1` entries, whatever the multiplier. -/ +@[simp] lemma qrow_length (g₀ g₁ g₂ : List ℤ) (k : ℕ) : + (qrow g₀ g₁ g₂ k).length = 2 * k + 1 := by + induction k with + | zero => simp [qrow] + | succ k ih => + simp only [qrow, qstep, radd_length, rscale_length, List.length_cons, ih] + omega + +/-- A packed value is bounded by the `L¹` norm times a power of the base. -/ +lemma abs_pevZ_le (b : ℤ) (hb : 1 ≤ b) : + ∀ p : List ℤ, |pevZ p b| ≤ l1 p * b ^ p.length := by + intro p + induction p with + | nil => simp + | cons a p ih => + have hb0 : (0 : ℤ) < b := by omega + have hpow : (1 : ℤ) ≤ b ^ p.length := one_le_pow₀ hb + have hl1 := l1_nonneg p + have habs := abs_nonneg a + calc |pevZ (a :: p) b| = |a + b * pevZ p b| := rfl + _ ≤ |a| + |b * pevZ p b| := abs_add_le _ _ + _ = |a| + b * |pevZ p b| := by rw [abs_mul, abs_of_pos hb0] + _ ≤ |a| + b * (l1 p * b ^ p.length) := by nlinarith [ih] + _ ≤ (|a| + l1 p) * b ^ (p.length + 1) := by + have hbb : (1 : ℤ) ≤ b * b ^ p.length := by nlinarith [hpow, hb0] + have hkey := mul_le_mul_of_nonneg_left hbb habs + ring_nf + nlinarith [hkey, hpow, hl1, hb0] + _ = l1 (a :: p) * b ^ (a :: p).length := by simp [l1_cons] + +/-! ### The verification step + +The generator supplies the moment numerator; Lean checks it with one integer comparison. +Lengths need not match exactly: a shorter list is compared against its zero-padding, which +has the same value as a polynomial. -/ + +/-- Evaluation ignores trailing zeros. -/ +lemma pev_append_zeros (p : List ℤ) (j : ℕ) (α : ℝ) : + pev (p ++ List.replicate j 0) α = pev p α := by + induction p with + | nil => + induction j with + | zero => simp [pev] + | succ j ih => simp only [List.replicate_succ, List.nil_append, pev] at *; simp [ih] + | cons a p ih => simp only [List.cons_append, pev, ih] + +/-- The round trip, tolerating extra room: unpacking to length `m ≥ p.length` returns `p` +zero-padded. -/ +theorem unpackZ_pevZ_le (β : ℤ) (hβ : 0 < β) : + ∀ (m : ℕ) (p : List ℤ), p.length ≤ m → (∀ a ∈ p, 2 * |a| < β) → + unpackZ β m (pevZ p β) = p ++ List.replicate (m - p.length) 0 := by + intro m + induction m with + | zero => + intro p hlen _ + simp [List.length_eq_zero_iff.1 (Nat.le_zero.1 hlen)] + | succ m ih => + intro p hlen hb + cases p with + | nil => + have h0 : bdig β 0 = 0 := by + have : (0 : ℤ) % β = 0 := Int.zero_emod β + simp only [bdig, this] + split_ifs <;> omega + simp only [pevZ_nil, unpackZ_succ, h0, List.nil_append, List.length_nil, + Nat.sub_zero, List.replicate_succ] + have := ih [] (Nat.zero_le m) (by simp) + simpa using this + | cons a p => + have ha : 2 * |a| < β := hb a (List.mem_cons_self ..) + have hp : ∀ x ∈ p, 2 * |x| < β := fun x hx => hb x (List.mem_cons_of_mem _ hx) + have hd : bdig β (a + β * pevZ p β) = a := bdig_add_mul β a _ hβ ha + have hq : (a + β * pevZ p β - a) / β = pevZ p β := by + rw [add_sub_cancel_left, Int.mul_ediv_cancel_left _ hβ.ne'] + simp only [pevZ_cons, unpackZ_succ, hd, hq, List.length_cons] + rw [ih p (by simpa using Nat.le_of_succ_le_succ hlen) hp] + simp + +/-- The weighted sum computed directly on the α-packed row. -/ +def wsumZ (L : ℤ) : ℕ → List ℤ → ℤ + | _, [] => 0 + | i, a :: s => (L / ((i : ℤ) + 4)) * a + wsumZ L (i + 1) s + +@[simp] lemma wsumZ_nil (L : ℤ) (i : ℕ) : wsumZ L i [] = 0 := rfl + +@[simp] lemma wsumZ_cons (L : ℤ) (i : ℕ) (a : ℤ) (s : List ℤ) : + wsumZ L i (a :: s) = (L / ((i : ℤ) + 4)) * a + wsumZ L (i + 1) s := rfl + +lemma pevZ_padd (p q : List ℤ) (b : ℤ) : pevZ (padd p q) b = pevZ p b + pevZ q b := by + induction p generalizing q with + | nil => simp [padd] + | cons a p ih => + cases q with + | nil => simp [padd] + | cons c q => simp only [padd, pevZ_cons, ih]; ring + +lemma pevZ_map_mul (c : ℤ) (q : List ℤ) (b : ℤ) : + pevZ (q.map (fun x => c * x)) b = c * pevZ q b := by + induction q with + | nil => simp + | cons x q ih => simp only [List.map_cons, pevZ_cons, ih]; ring + +/-- The packed weighted sum agrees with packing the weighted sum: this is what makes the +check a single integer comparison. -/ +lemma pevZ_wsum (L : ℤ) : ∀ (r : List (List ℤ)) (i : ℕ) (β : ℤ), + pevZ (wsum L i r) β = wsumZ L i (rowZ r β) := by + intro r + induction r with + | nil => intro i β; simp + | cons p r ih => + intro i β + simp only [wsum_cons, pevZ_padd, pevZ_map_mul, rowZ_cons, wsumZ_cons, ih] + +/-- Packing is injective on lists of the same length with coefficients below `β/2`. -/ +lemma pevZ_inj (β : ℤ) (hβ : 0 < β) (p q : List ℤ) + (hp : ∀ a ∈ p, 2 * |a| < β) (hq : ∀ a ∈ q, 2 * |a| < β) + (hlen : p.length = q.length) (h : pevZ p β = pevZ q β) : p = q := by + have h1 := unpackZ_pevZ β hβ p hp + have h2 := unpackZ_pevZ β hβ q hq + rw [← h1, ← h2, hlen, h] + +/-- **Verification of a supplied moment numerator.** Given the overflow bounds, checking a +generator-supplied `Nmom` is one integer comparison against the packed computation — which is +a single exponentiation and `2k+1` digit extractions. -/ +theorem wsum_eq_of_packed (g₀ g₁ g₂ : List ℤ) (k : ℕ) (L β τ : ℤ) (Nmom : List ℤ) + (hβ : 0 < β) (hτ : 0 < τ) + (hbτ : ∀ a ∈ rowZ (qrow g₀ g₁ g₂ k) β, 2 * |a| < τ) + (hbN : ∀ a ∈ Nmom, 2 * |a| < β) + (hbW : ∀ a ∈ wsum L 0 (qrow g₀ g₁ g₂ k), 2 * |a| < β) + (hlen : Nmom.length = (wsum L 0 (qrow g₀ g₁ g₂ k)).length) + (hcheck : wsumZ L 0 (unpackZ τ (qrow g₀ g₁ g₂ k).length + ((pevZ g₀ β + pevZ g₁ β * τ + pevZ g₂ β * τ ^ 2) ^ k)) = pevZ Nmom β) : + Nmom = wsum L 0 (qrow g₀ g₁ g₂ k) := by + rw [rowZ_qrow_eq g₀ g₁ g₂ k β τ hτ hbτ, ← pevZ_wsum] at hcheck + exact pevZ_inj β hβ _ _ hbN hbW hlen hcheck.symm + +/-! ### Entry lengths + +`qrow_length` counts the entries of a row; bounding the α-packed values also needs each +entry's *length*. Multiplying by a `g` of length at most `G` lengthens an entry by at most +`G`, so after `k` steps an entry has length at most `1 + G*k`. This is what lets the +hypotheses of `wsum_eq_of_packed` be discharged by arithmetic instead of by computing +`qrow`. -/ + +lemma pmul_length_le (p q : List ℤ) : (pmul p q).length ≤ p.length + q.length := by + induction p with + | nil => simp [pmul] + | cons a p ih => + simp only [pmul, padd_length, List.length_map, List.length_cons] + omega + +lemma mem_radd_length_le {m : ℕ} : ∀ (r s : List (List ℤ)), + (∀ p ∈ r, p.length ≤ m) → (∀ q ∈ s, q.length ≤ m) → + ∀ x ∈ radd r s, x.length ≤ m := by + intro r + induction r with + | nil => intro s _ hs x hx; exact hs x (by simpa [radd] using hx) + | cons p r ih => + intro s hr hs x hx + cases s with + | nil => exact hr x (by simpa [radd] using hx) + | cons q s => + rcases List.mem_cons.1 (by simpa [radd] using hx) with h | h + · subst h + have := hr p (List.mem_cons_self ..) + have := hs q (List.mem_cons_self ..) + rw [padd_length] + omega + · exact ih s (fun y hy => hr y (List.mem_cons_of_mem _ hy)) + (fun y hy => hs y (List.mem_cons_of_mem _ hy)) x h + +lemma mem_rscale_length_le {m : ℕ} (g : List ℤ) (r : List (List ℤ)) + (hr : ∀ p ∈ r, p.length ≤ m) : ∀ x ∈ rscale g r, x.length ≤ g.length + m := by + intro x hx + simp only [rscale, List.mem_map] at hx + obtain ⟨p, hp, rfl⟩ := hx + have := pmul_length_le g p + have := hr p hp + omega + +/-- Each entry of the `k`-th row has length at most `1 + G*k`, where `G` bounds the lengths +of the multipliers. -/ +theorem qrow_entry_length_le (g₀ g₁ g₂ : List ℤ) (G : ℕ) + (h0 : g₀.length ≤ G) (h1 : g₁.length ≤ G) (h2 : g₂.length ≤ G) : + ∀ (k : ℕ), ∀ p ∈ qrow g₀ g₁ g₂ k, p.length ≤ 1 + G * k := by + intro k + induction k with + | zero => + intro p hp + simp only [qrow, List.mem_singleton] at hp + subst hp + simp + | succ k ih => + intro p hp + have hGk : G * (k + 1) = G * k + G := by ring + have hb : ∀ q ∈ qrow g₀ g₁ g₂ k, q.length ≤ 1 + G * k := ih + have e0 : ∀ x ∈ rscale g₀ (qrow g₀ g₁ g₂ k), x.length ≤ 1 + G * (k + 1) := by + intro x hx; have := mem_rscale_length_le g₀ _ hb x hx; omega + have e1 : ∀ x ∈ ([] : List ℤ) :: rscale g₁ (qrow g₀ g₁ g₂ k), + x.length ≤ 1 + G * (k + 1) := by + intro x hx + rcases List.mem_cons.1 hx with h | h + · subst h; simp + · have := mem_rscale_length_le g₁ _ hb x h; omega + have e2 : ∀ x ∈ ([] : List ℤ) :: ([] : List ℤ) :: rscale g₂ (qrow g₀ g₁ g₂ k), + x.length ≤ 1 + G * (k + 1) := by + intro x hx + rcases List.mem_cons.1 hx with h | h + · subst h; simp + rcases List.mem_cons.1 h with h' | h' + · subst h'; simp + · have := mem_rscale_length_le g₂ _ hb x h'; omega + exact mem_radd_length_le _ _ e0 (mem_radd_length_le _ _ e1 e2) p hp + +/-- `l1` of an entry is at most `l1row` of the row. -/ +lemma l1_le_l1row : ∀ (r : List (List ℤ)) (p : List ℤ), p ∈ r → l1 p ≤ l1row r := by + intro r + induction r with + | nil => intro p hp; cases hp + | cons q r ih => + intro p hp + rcases List.mem_cons.1 hp with h | h + · subst h; have := l1row_nonneg r; simp only [l1row_cons]; omega + · have := ih p h; have := l1_nonneg q; simp only [l1row_cons]; omega + +/-- The weighted sum is no longer than the entries it combines. -/ +lemma wsum_length_le {m : ℕ} (L : ℤ) : ∀ (r : List (List ℤ)) (i : ℕ), + (∀ p ∈ r, p.length ≤ m) → (wsum L i r).length ≤ m := by + intro r + induction r with + | nil => intro i _; simp + | cons p r ih => + intro i hr + have hp := hr p (List.mem_cons_self ..) + have := ih (i + 1) (fun q hq => hr q (List.mem_cons_of_mem _ hq)) + simp only [wsum_cons, padd_length, List.length_map] + omega + +/-- The weighted sum's `L¹` norm is at most `L` times the row's. -/ +lemma l1_wsum_le (L : ℤ) (hL : 0 ≤ L) : ∀ (r : List (List ℤ)) (i : ℕ), + l1 (wsum L i r) ≤ L * l1row r := by + intro r + induction r with + | nil => intro i; simp + | cons p r ih => + intro i + have hd : (0 : ℤ) < (i : ℤ) + 4 := by positivity + have hw0 : 0 ≤ L / ((i : ℤ) + 4) := Int.ediv_nonneg hL hd.le + have hw1 : L / ((i : ℤ) + 4) ≤ L := Int.ediv_le_self _ hL + have h1 := l1_padd (p.map (fun c => (L / ((i : ℤ) + 4)) * c)) (wsum L (i + 1) r) + rw [l1_map_mul, abs_of_nonneg hw0] at h1 + have h2 := ih (i + 1) + have hp := l1_nonneg p + have hr := l1row_nonneg r + simp only [wsum_cons, l1row_cons] + nlinarith [h1, h2, hw0, hw1, hp, hr] + +/-! ### The bounds in usable form + +Each hypothesis of `Sendov.wsum_eq_of_packed` reduces to an inequality between explicit +numbers, so a degree file never computes `qrow`. -/ + +/-- The `τ` bound: the α-packed row entries are bounded by the `L¹` norm times a power of +`β`, the exponent coming from `Sendov.qrow_entry_length_le`. -/ +theorem rowZ_bound (g₀ g₁ g₂ : List ℤ) (k G : ℕ) (β τ : ℤ) (hβ : 1 ≤ β) + (h0 : g₀.length ≤ G) (h1 : g₁.length ≤ G) (h2 : g₂.length ≤ G) + (hτ : 2 * ((l1 g₀ + l1 g₁ + l1 g₂) ^ k * β ^ (1 + G * k)) < τ) : + ∀ a ∈ rowZ (qrow g₀ g₁ g₂ k) β, 2 * |a| < τ := by + intro a ha + simp only [rowZ, List.mem_map] at ha + obtain ⟨p, hp, rfl⟩ := ha + have hlen : p.length ≤ 1 + G * k := qrow_entry_length_le g₀ g₁ g₂ G h0 h1 h2 k p hp + have hl1p : l1 p ≤ (l1 g₀ + l1 g₁ + l1 g₂) ^ k := + le_trans (l1_le_l1row _ p hp) (l1row_qrow g₀ g₁ g₂ k) + have hpow : β ^ p.length ≤ β ^ (1 + G * k) := pow_le_pow_right₀ hβ hlen + have hbpos : (0 : ℤ) < β ^ p.length := by positivity + have habs := abs_pevZ_le β hβ p + have hl1nn := l1_nonneg p + have : |pevZ p β| ≤ (l1 g₀ + l1 g₁ + l1 g₂) ^ k * β ^ (1 + G * k) := by + calc |pevZ p β| ≤ l1 p * β ^ p.length := habs + _ ≤ (l1 g₀ + l1 g₁ + l1 g₂) ^ k * β ^ (1 + G * k) := by + apply mul_le_mul hl1p hpow hbpos.le + exact le_trans hl1nn hl1p + omega + +/-- The `β` bound for the moment numerator. -/ +theorem wsum_bound (g₀ g₁ g₂ : List ℤ) (k : ℕ) (L β : ℤ) (hL : 0 ≤ L) + (hβ : 2 * (L * (l1 g₀ + l1 g₁ + l1 g₂) ^ k) < β) : + ∀ a ∈ wsum L 0 (qrow g₀ g₁ g₂ k), 2 * |a| < β := by + intro a ha + have h1 : |a| ≤ l1 (wsum L 0 (qrow g₀ g₁ g₂ k)) := abs_le_l1 _ a ha + have h2 := l1_wsum_le L hL (qrow g₀ g₁ g₂ k) 0 + have h3 : L * l1row (qrow g₀ g₁ g₂ k) ≤ L * (l1 g₀ + l1 g₁ + l1 g₂) ^ k := + mul_le_mul_of_nonneg_left (l1row_qrow g₀ g₁ g₂ k) hL + omega + +/-- **Pad-tolerant verification.** Concludes equality of the polynomial *functions*, which +is all the moment needs, and so requires only length *bounds* rather than an exact match. -/ +theorem pev_wsum_eq_of_packed (g₀ g₁ g₂ : List ℤ) (k m : ℕ) (L β τ : ℤ) (Nmom : List ℤ) + (hβ : 0 < β) (hτ : 0 < τ) + (hbτ : ∀ a ∈ rowZ (qrow g₀ g₁ g₂ k) β, 2 * |a| < τ) + (hbN : ∀ a ∈ Nmom, 2 * |a| < β) + (hbW : ∀ a ∈ wsum L 0 (qrow g₀ g₁ g₂ k), 2 * |a| < β) + (hlenN : Nmom.length ≤ m) + (hlenW : (wsum L 0 (qrow g₀ g₁ g₂ k)).length ≤ m) + (hcheck : wsumZ L 0 (unpackZ τ (qrow g₀ g₁ g₂ k).length + ((pevZ g₀ β + pevZ g₁ β * τ + pevZ g₂ β * τ ^ 2) ^ k)) = pevZ Nmom β) + (α : ℝ) : + pev Nmom α = pev (wsum L 0 (qrow g₀ g₁ g₂ k)) α := by + rw [rowZ_qrow_eq g₀ g₁ g₂ k β τ hτ hbτ, ← pevZ_wsum] at hcheck + have hN := unpackZ_pevZ_le β hβ m Nmom hlenN hbN + have hW := unpackZ_pevZ_le β hβ m _ hlenW hbW + rw [hcheck, hN] at hW + have := congrArg (fun l => pev l α) hW + simpa [pev_append_zeros] using this + +/-- **The moment from a verified numerator.** Combining `Sendov.integral_moment_of` with +`Sendov.pev_wsum`, the integral is an explicit integer polynomial over an explicit +denominator. Everything on the right is either supplied by the generator or a kernel +computation on integers. -/ +theorem integral_moment_packed (n k : ℕ) (hn : 2 ≤ n) (α : ℝ) (hα : 0 ≤ α) + (L : ℤ) (hL : 0 < L) (Nmom : List ℤ) + (hdvd : ∀ j, j < 2 * k + 1 → ((0 : ℕ) + j + 4 : ℤ) ∣ L) + (hNmom : pev Nmom α = pev (wsum L 0 (qrow (gg0 n) (gg1 n) (gg2 n) k)) α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q n α t ^ k) + = pev Nmom α / ((L : ℝ) * (2 * M n * (3 + α)) ^ k) := by + have hM : 0 < M n := M_pos hn + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + have hD : (0 : ℝ) < 2 * M n * (3 + α) := by positivity + have hLR : (0 : ℝ) < (L : ℝ) := by exact_mod_cast hL + have hdvd' : ∀ j, j < (qrow (gg0 n) (gg1 n) (gg2 n) k).length → + ((0 : ℕ) + j + 4 : ℤ) ∣ L := by + intro j hj + rw [qrow_length] at hj + exact hdvd j hj + have hw := pev_wsum L (qrow (gg0 n) (gg1 n) (gg2 n) k) 0 α hdvd' + rw [integral_moment_of n k hn α hα, hNmom, hw] + field_simp + +/-- Every coefficient of every entry of a row is bounded by the row's `L¹` norm. -/ +lemma abs_le_l1row : ∀ (r : List (List ℤ)) (p : List ℤ), p ∈ r → ∀ a ∈ p, |a| ≤ l1row r := by + intro r + induction r with + | nil => intro p hp; cases hp + | cons q r ih => + intro p hp a ha + rcases List.mem_cons.1 hp with h | h + · subst h + have := abs_le_l1 p a ha + have := l1row_nonneg r + simp only [l1row_cons] + omega + · have := ih p h a ha + have := l1_nonneg q + simp only [l1row_cons] + omega + +end Sendov diff --git a/LeanPool/Sendov/FiniteRange/Recurrence.lean b/LeanPool/Sendov/FiniteRange/Recurrence.lean new file mode 100644 index 0000000000..3043e6b31d --- /dev/null +++ b/LeanPool/Sendov/FiniteRange/Recurrence.lean @@ -0,0 +1,266 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Common.Basic +public import Mathlib.Analysis.SpecialFunctions.Integrals.Basic + +/-! +# Moments by a verified recurrence + +`Sendov.integral_moment` computes `∫ t in 0..1, t ^ 3 * Q ^ k` as the multinomial double +sum `(M)`. That formula is correct but has `Θ(k²)` terms, and expanding it with `simp` +becomes impossible around `k = 20`: at `n = 53` the 676-term expansion exhausts two million +heartbeats. + +This file computes the same integral by a recurrence instead. Clearing denominators with +`D = 2 (n-1) (3+α)`, the quadratic `D * Q` has *integer* coefficients as a polynomial in +`α`: + + `D * Q t = g₀ + g₁ t + g₂ t²`, `g₀ = D`, `g₁ = -2Dc`, `g₂ = DA`, + +so the coefficients of `(D * Q t) ^ k` in `t` satisfy + + `Rec (k+1) j = g₀ * Rec k j + g₁ * Rec k (j-1) + g₂ * Rec k (j-2)`, + +which is just multiplication of the previous row by a fixed quadratic. Integrating term by +term against `t ^ 3` then gives the moment. This replaces `Θ(k²)` summands by `k` steps on +vectors of length `≤ 2k+1`. + +The essential point is that the coefficients are held as *integers*, not as real +expressions: a recurrence carried out symbolically over `ℝ` would grow its terms by a factor +of three per step and reproduce the blow-up in another form. So polynomials in `α` are +represented here by `List ℤ` (dense, lowest degree first) with their own arithmetic, and +`Sendov.pev` is the evaluation homomorphism into `ℝ`. Everything a degree needs is then a +kernel computation on integer data. + +## Main statements + +* `Sendov.pev_padd`, `Sendov.pev_pmul`: evaluation is a ring homomorphism; +* `Sendov.rev_qrow`: `qrow` computes the coefficients of `(g₀ + g₁t + g₂t²) ^ k`; +* `Sendov.integral_irow`: integrating a row against `t ^ (i+3)` gives `irow`; +* `Sendov.integral_moment_rec`: the moment, via the recurrence. +-/ + +@[expose] public section + +namespace Sendov + +open MeasureTheory + +/-! ### Integer polynomials in `α`, densely represented, lowest degree first -/ + +/-- Evaluation of a dense integer polynomial at a real point, by Horner's rule. -/ +def pev : List ℤ → ℝ → ℝ + | [], _ => 0 + | a :: p, x => (a : ℝ) + x * pev p x + +/-- Addition of dense integer polynomials. -/ +def padd : List ℤ → List ℤ → List ℤ + | [], q => q + | a :: p, [] => a :: p + | a :: p, b :: q => (a + b) :: padd p q + +/-- Multiplication of dense integer polynomials. -/ +def pmul : List ℤ → List ℤ → List ℤ + | [], _ => [] + | a :: p, q => padd (q.map (fun b => a * b)) (0 :: pmul p q) + +@[simp] lemma pev_nil (x : ℝ) : pev [] x = 0 := rfl + +@[simp] lemma pev_cons (a : ℤ) (p : List ℤ) (x : ℝ) : + pev (a :: p) x = (a : ℝ) + x * pev p x := rfl + +lemma pev_padd (p q : List ℤ) (x : ℝ) : pev (padd p q) x = pev p x + pev q x := by + induction p generalizing q with + | nil => simp [padd] + | cons a p ih => + cases q with + | nil => simp [padd] + | cons b q => + simp only [padd, pev_cons, ih] + push_cast + ring + +lemma pev_map_mul (a : ℤ) (q : List ℤ) (x : ℝ) : + pev (q.map (fun b => a * b)) x = (a : ℝ) * pev q x := by + induction q with + | nil => simp + | cons b q ih => + simp only [List.map_cons, pev_cons, ih] + push_cast + ring + +lemma pev_pmul (p q : List ℤ) (x : ℝ) : pev (pmul p q) x = pev p x * pev q x := by + induction p with + | nil => simp [pmul] + | cons a p ih => + simp only [pmul, pev_padd, pev_map_mul, pev_cons, ih] + push_cast + ring + +/-! ### Rows: polynomials in `t` whose coefficients are polynomials in `α` -/ + +/-- Evaluation of a row at `α` (coefficientwise) and `t` (by Horner's rule). -/ +def rev : List (List ℤ) → ℝ → ℝ → ℝ + | [], _, _ => 0 + | p :: r, α, t => pev p α + t * rev r α t + +/-- Addition of rows. -/ +def radd : List (List ℤ) → List (List ℤ) → List (List ℤ) + | [], s => s + | p :: r, [] => p :: r + | p :: r, q :: s => padd p q :: radd r s + +/-- Multiply every coefficient of a row by a fixed polynomial in `α`. -/ +def rscale (g : List ℤ) (r : List (List ℤ)) : List (List ℤ) := r.map (pmul g) + +@[simp] lemma rev_nil (α t : ℝ) : rev [] α t = 0 := rfl + +@[simp] lemma rev_cons (p : List ℤ) (r : List (List ℤ)) (α t : ℝ) : + rev (p :: r) α t = pev p α + t * rev r α t := rfl + +lemma rev_radd (r s : List (List ℤ)) (α t : ℝ) : + rev (radd r s) α t = rev r α t + rev s α t := by + induction r generalizing s with + | nil => simp [radd] + | cons p r ih => + cases s with + | nil => simp [radd] + | cons q s => + simp only [radd, rev_cons, pev_padd, ih] + ring + +lemma rev_rscale (g : List ℤ) (r : List (List ℤ)) (α t : ℝ) : + rev (rscale g r) α t = pev g α * rev r α t := by + induction r with + | nil => simp [rscale] + | cons p r ih => + simp only [rscale, List.map_cons, rev_cons, pev_pmul] at * + rw [ih] + ring + +lemma rev_shift (r : List (List ℤ)) (α t : ℝ) : + rev (([] : List ℤ) :: r) α t = t * rev r α t := by + simp + +/-! ### The recurrence -/ + +/-- One step of the recurrence: multiply a row by `g₀ + g₁ t + g₂ t²`. -/ +def qstep (g₀ g₁ g₂ : List ℤ) (r : List (List ℤ)) : List (List ℤ) := + radd (rscale g₀ r) (radd ([] :: rscale g₁ r) ([] :: [] :: rscale g₂ r)) + +/-- The coefficients of `(g₀ + g₁ t + g₂ t²) ^ k`, as a polynomial in `t` whose +coefficients are integer polynomials in `α`. -/ +def qrow (g₀ g₁ g₂ : List ℤ) : ℕ → List (List ℤ) + | 0 => [[1]] + | k + 1 => qstep g₀ g₁ g₂ (qrow g₀ g₁ g₂ k) + +lemma rev_qrow (g₀ g₁ g₂ : List ℤ) (k : ℕ) (α t : ℝ) : + rev (qrow g₀ g₁ g₂ k) α t = (pev g₀ α + pev g₁ α * t + pev g₂ α * t ^ 2) ^ k := by + induction k with + | zero => simp [qrow] + | succ k ih => + simp only [qrow, qstep, rev_radd, rev_rscale, rev_shift, ih, pow_succ] + ring + +/-! ### Integration -/ + +/-- `irow r i α = ∑ⱼ (coefficient j of r, at α) / (i + j + 4)`, the value of +`∫ t in 0..1, t ^ (i+3) * rev r α t`. -/ +noncomputable def irow : List (List ℤ) → ℕ → ℝ → ℝ + | [], _, _ => 0 + | p :: r, i, α => pev p α / (i + 4) + irow r (i + 1) α + +lemma continuous_rev (r : List (List ℤ)) (α : ℝ) : Continuous fun t : ℝ => rev r α t := by + induction r with + | nil => simpa using continuous_const + | cons p r ih => + simp only [rev_cons] + exact continuous_const.add (continuous_id.mul ih) + +lemma integral_irow (r : List (List ℤ)) (i : ℕ) (α : ℝ) : + (∫ t in (0 : ℝ)..1, t ^ (i + 3) * rev r α t) = irow r i α := by + induction r generalizing i with + | nil => simp [irow] + | cons p r ih => + have hfun : (fun t : ℝ => t ^ (i + 3) * rev (p :: r) α t) + = fun t : ℝ => pev p α * t ^ (i + 3) + t ^ (i + 1 + 3) * rev r α t := by + funext t + simp only [rev_cons] + ring + have h1 : IntervalIntegrable (fun t : ℝ => pev p α * t ^ (i + 3)) volume 0 1 := + (by fun_prop : Continuous fun t : ℝ => pev p α * t ^ (i + 3)).intervalIntegrable _ _ + have h2 : IntervalIntegrable (fun t : ℝ => t ^ (i + 1 + 3) * rev r α t) volume 0 1 := + ((continuous_pow _).mul (continuous_rev r α)).intervalIntegrable _ _ + rw [hfun, intervalIntegral.integral_add h1 h2, intervalIntegral.integral_const_mul, + integral_pow, ih] + simp only [irow] + push_cast + ring + +/-- **The moment, by the recurrence.** If `D * Q t` has the integer coefficient +polynomials `g₀, g₁, g₂` in `α`, then the moment is a kernel computation on those integers. +No hypothesis beyond `D ≠ 0` is needed: this is a polynomial identity. -/ +theorem integral_moment_rec {n k : ℕ} {α D : ℝ} {g₀ g₁ g₂ : List ℤ} (hD : D ≠ 0) + (hQ : ∀ t : ℝ, D * Q n α t = pev g₀ α + pev g₁ α * t + pev g₂ α * t ^ 2) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q n α t ^ k) = irow (qrow g₀ g₁ g₂ k) 0 α / D ^ k := by + have hpow : ∀ t : ℝ, t ^ 3 * Q n α t ^ k + = (t ^ (0 + 3) * rev (qrow g₀ g₁ g₂ k) α t) / D ^ k := by + intro t + rw [rev_qrow, ← hQ t, mul_pow] + field_simp + ring + simp only [hpow] + rw [intervalIntegral.integral_div, integral_irow] + +/-! ### The coefficients for a given degree + +With `D = 2 (n-1) (3+α)` one has `D * Q t = g₀ + g₁ t + g₂ t²` where, as polynomials in `α` +with integer coefficients, + + `g₀ = 6(n-1) + 2(n-1) α`, + `g₁ = -12(n-1) + (12 - 2(n-1)) α + 4 α²`, + `g₂ = 6(n-1) + (2(n-1) - 12) α - 4 α²`. -/ + +/-- `D` itself, as an integer polynomial in `α`. -/ +def gg0 (n : ℕ) : List ℤ := [6 * ((n : ℤ) - 1), 2 * ((n : ℤ) - 1)] + +/-- `-2 D c`, as an integer polynomial in `α`. -/ +def gg1 (n : ℕ) : List ℤ := [-12 * ((n : ℤ) - 1), 12 - 2 * ((n : ℤ) - 1), 4] + +/-- `D A`, as an integer polynomial in `α`. -/ +def gg2 (n : ℕ) : List ℤ := [6 * ((n : ℤ) - 1), 2 * ((n : ℤ) - 1) - 12, -4] + +@[simp] lemma gg0_length (n : ℕ) : (gg0 n).length = 2 := rfl + +@[simp] lemma gg1_length (n : ℕ) : (gg1 n).length = 3 := rfl + +@[simp] lemma gg2_length (n : ℕ) : (gg2 n).length = 3 := rfl + +lemma DQ_eq (n : ℕ) (hn : 2 ≤ n) (α t : ℝ) (hα : 0 ≤ α) : + (2 * M n * (3 + α)) * Q n α t + = pev (gg0 n) α + pev (gg1 n) α * t + pev (gg2 n) α * t ^ 2 := by + have hM : ((n : ℝ) - 1) ≠ 0 := by + have h := M_pos hn + simp only [M] at h + linarith + have h3 : (3 : ℝ) + α ≠ 0 := (three_add_pos hα).ne' + simp only [gg0, gg1, gg2, pev_cons, pev_nil, Q, c, A, M] + push_cast + field_simp + ring + +/-- **The moment for a given degree, by the recurrence.** Every ingredient on the right is +a kernel computation on integers, apart from the final evaluation at `α`. -/ +theorem integral_moment_of (n k : ℕ) (hn : 2 ≤ n) (α : ℝ) (hα : 0 ≤ α) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q n α t ^ k) + = irow (qrow (gg0 n) (gg1 n) (gg2 n) k) 0 α / (2 * M n * (3 + α)) ^ k := by + have hM : 0 < M n := M_pos hn + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + exact integral_moment_rec (n := n) (k := k) (by positivity) (fun t => DQ_eq n hn α t hα) + +end Sendov diff --git a/LeanPool/Sendov/Interior.lean b/LeanPool/Sendov/Interior.lean new file mode 100644 index 0000000000..2acbe9bd9f --- /dev/null +++ b/LeanPool/Sendov/Interior.lean @@ -0,0 +1,175 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Analytic.OriginExact +public import LeanPool.Sendov.Analytic.Polar +public import LeanPool.Sendov.Analytic.LowDegree +public import LeanPool.Sendov.Analytic.Jsum +public import LeanPool.Sendov.Counterexample.Factor +public import LeanPool.Sendov.Reduction.Main + +/-! +# Sendov's conjecture for a real interior zero + +This file assembles everything: if `p` has degree `n ≥ 2`, all zeroes in the closed unit disk, +and a zero at a real `a` with `0 < a < 1`, then `p'` has a zero within distance `1` of `a`. + +The proof is by contradiction. Suppose not; then every critical point `w` satisfies +`‖w - a‖ ≥ 1`, so `Sendov.exists_crit_multiset` writes `p'` over points `qⱼ` of the closed unit +disk, and `Sendov.exists_root_multiset` writes `p` over the other zeroes `zⱼ`. Setting +`x + iy = (∑ⱼ qⱼ)/(n-1)`, the two channels are: + +* **polar**: the polar identity and `p'(a)` two ways feed the branch point `(⋆)`. + +From `(⋆)` the argument branches on the degree. + +* For `n ≥ 5`, AM–GM relaxes `(⋆)` to the raw polar inequality `(1Q)`, the centroid identity and + the two origin identities give `(origin-exact)`, and `Sendov.polar_origin_incompatible` says + the two cannot hold together. +* For `n ≤ 5`, `Sendov.low_degree_contradiction` shows `(⋆)` is already contradictory on its own, + with no recourse to the origin channel. The two branches overlap at degree five. + +The zero `a = 0` is excluded above (the polar identity divides by `a`) but needs none of this +machinery: `p'(a)` two ways already says `(∏ⱼ qⱼ)(∏ⱼ (a - zⱼ)) = n`, and at `a = 0` both factors +have norm at most one. + +## Main statements + +* `Sendov.sendov_interior`: the conjecture for a real zero `0 < a < 1`, every degree `n ≥ 2`; +* `Sendov.sendov_center`: the conjecture at `a = 0`; +* `Sendov.sendov_interior_real`: the two combined, `0 ≤ a < 1`. +-/ + +@[expose] public section + +namespace Sendov + +open Polynomial +open Complex (I) + +/-- **Sendov's conjecture for a real interior zero.** If every zero of `p` lies in the +closed unit disk and `p(a) = 0` for a real `a` with `0 < a < 1`, then some zero of `p'` lies +within distance `1` of `a`. -/ +theorem sendov_interior {n : ℕ} (hn : 2 ≤ n) {p : ℂ[X]} (hdeg : p.natDegree = n) + (hroots : ∀ w ∈ p.roots, ‖w‖ ≤ 1) {a : ℝ} (ha0 : 0 < a) (ha1 : a < 1) + (hpa : p.eval (a : ℂ) = 0) : + ∃ ζ : ℂ, (derivative p).eval ζ = 0 ∧ ‖ζ - (a : ℂ)‖ < 1 := by + by_contra hcon + have hcrit : ∀ w : ℂ, (derivative p).eval w = 0 → 1 ≤ ‖w - (a : ℂ)‖ := by + intro w hw + by_contra hlt + exact hcon ⟨w, hw, not_le.1 hlt⟩ + -- the two factorizations + obtain ⟨z, hzcard, hz1, hpz⟩ := exists_root_multiset (by omega : 1 ≤ n) hdeg hroots hpa + obtain ⟨q, hqcard, hq1, hq0, hpq⟩ := exists_crit_multiset hn hdeg hcrit + have hp0 : p ≠ 0 := by + intro h + rw [h, natDegree_zero] at hdeg + omega + have hc0 : p.leadingCoeff ≠ 0 := leadingCoeff_ne_zero.2 hp0 + have hpq' : derivative p = C ((n : ℂ) * p.leadingCoeff) + * ((q.map (fun v => (a : ℂ) - v⁻¹)).map (fun w => X - C w)).prod := by + simp only [Multiset.map_map, Function.comp_def] + exact hpq + -- basic numerology + have hne : ((n : ℂ) - 1) ≠ 0 := by + intro h + have h1 : (n : ℂ) = 1 := by linear_combination h + have h2 : n = 1 := by exact_mod_cast h1 + omega + have hqne : q ≠ 0 := by + intro h + rw [h, Multiset.card_zero] at hqcard + omega + have haC0 : ((a : ℝ) : ℂ) ≠ 0 := by + simpa using ne_of_gt ha0 + have haC2 : ((a : ℝ) : ℂ) ^ 2 ≠ 1 := by + intro h + have : (a : ℂ) ^ 2 = ((a ^ 2 : ℝ) : ℂ) := by push_cast; ring + rw [this] at h + have h1 : a ^ 2 = 1 := by exact_mod_cast h + nlinarith [h1, ha0, ha1] + have hstar := one_le_integral_prod_norm hn (a := a) + (by rw [abs_of_nonneg (le_of_lt ha0)]; linarith) hz1 + (polar_identity (c := p.leadingCoeff) (a := ((a : ℝ) : ℂ)) (n := n) (z := z) (q := q) (p := p) + hc0 haC0 haC2 hzcard hqcard hq0 hpa hpz hpq') + (prod_sub_mul_prod (c := p.leadingCoeff) (a := ((a : ℝ) : ℂ)) (n := n) (z := z) (q := q) + (p := p) hc0 hq0 hpz hpq') + -- the branch: low degree needs nothing further + rcases (by omega : n < 5 ∨ 5 ≤ n) with hn5 | hn5 + · exact low_degree_contradiction hn (by omega) ha0 ha1 hqcard hq1 hstar + have hnR : (5 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn5 + have hn1 : (0 : ℝ) < (n : ℝ) - 1 := by linarith + -- `x + iy` is the centroid of the `qⱼ` + obtain ⟨x, y, hxy⟩ : ∃ x y : ℝ, q.sum = ((n : ℂ) - 1) * ((x : ℂ) + (y : ℂ) * I) := by + refine ⟨(q.sum / ((n : ℂ) - 1)).re, (q.sum / ((n : ℂ) - 1)).im, ?_⟩ + rw [Complex.re_add_im, mul_div_cancel₀ _ hne] + obtain ⟨hxre, hx2⟩ := xy_bounds hn hqcard hq1 hxy + have hpolar := one_le_integral_Ppolar hn (a := a) (x := x) hqcard hq1 hxre hstar + -- the origin channel + have hcent := centroid_identity (c := p.leadingCoeff) (a := ((a : ℝ) : ℂ)) (n := n) + (z := z) (q := q) (p := p) hn hc0 hzcard hqcard hpz hpq' + have hfirst := first_origin_identity (c := p.leadingCoeff) (a := ((a : ℝ) : ℂ)) (n := n) + (z := z) (q := q) (p := p) hc0 haC0 hzcard hq0 hpa hpz hpq' + have hsecond := second_origin_identity (c := p.leadingCoeff) (a := ((a : ℝ) : ℂ)) (n := n) + (z := z) (q := q) (p := p) hc0 hzcard hq0 hpz hpq' + have horigin := origin_exact (n := n) (α := M n * (1 - a ^ 2) / 2) hn5 ha0 ha1 hqcard hqne + hz1 hq1 hxy hcent hfirst hsecond rfl + -- the two are incompatible + exact polar_origin_incompatible hn5 ha0 ha1 (by nlinarith [hx2, sq_nonneg y]) rfl hpolar + horigin + +/-- **The conjecture at `a = 0`.** `p'(a)` two ways gives `(∏ⱼ qⱼ)(∏ⱼ (a - zⱼ)) = n`. At +`a = 0` the second factor is `∏ⱼ zⱼ` up to sign, so both factors have norm at most one and +`n ≤ 1` — impossible for `n ≥ 2`. No polar or origin estimate is involved. -/ +theorem sendov_center {n : ℕ} (hn : 2 ≤ n) {p : ℂ[X]} (hdeg : p.natDegree = n) + (hroots : ∀ w ∈ p.roots, ‖w‖ ≤ 1) (hp0 : p.eval 0 = 0) : + ∃ ζ : ℂ, (derivative p).eval ζ = 0 ∧ ‖ζ‖ < 1 := by + by_contra hcon + have hcrit : ∀ w : ℂ, (derivative p).eval w = 0 → 1 ≤ ‖w - (0 : ℂ)‖ := by + intro w hw + rw [sub_zero] + by_contra hlt + exact hcon ⟨w, hw, not_le.1 hlt⟩ + obtain ⟨z, hzcard, hz1, hpz⟩ := exists_root_multiset (by omega : 1 ≤ n) hdeg hroots hp0 + obtain ⟨q, hqcard, hq1, hq0, hpq⟩ := exists_crit_multiset hn hdeg hcrit + have hpne : p ≠ 0 := by + intro h + rw [h, natDegree_zero] at hdeg + omega + have hc0 : p.leadingCoeff ≠ 0 := leadingCoeff_ne_zero.2 hpne + have hpq' : derivative p = C ((n : ℂ) * p.leadingCoeff) + * ((q.map (fun v => (0 : ℂ) - v⁻¹)).map (fun w => X - C w)).prod := by + simp only [Multiset.map_map, Function.comp_def] + exact hpq + -- `p'(0)` two ways + have hkey := prod_sub_mul_prod (c := p.leadingCoeff) (a := (0 : ℂ)) (n := n) (z := z) (q := q) + (p := p) hc0 hq0 hpz hpq' + have hnorm := congrArg norm hkey + rw [norm_mul] at hnorm + have h1 : ‖q.prod‖ ≤ 1 := norm_prod_le_one q hq1 + have h2 : ‖(z.map (fun w => (0 : ℂ) - w)).prod‖ ≤ 1 := by + refine norm_prod_le_one _ ?_ + intro u hu + obtain ⟨w, hw, rfl⟩ := Multiset.mem_map.1 hu + simpa using hz1 w hw + have h3 : ‖(n : ℂ)‖ = (n : ℝ) := by simp + rw [h3] at hnorm + have h4 : (2 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + nlinarith [hnorm, h1, h2, norm_nonneg q.prod, norm_nonneg (z.map (fun w => (0 : ℂ) - w)).prod] + +/-- **The conjecture for a real zero in `[0,1)`**, every degree `n ≥ 2`. -/ +theorem sendov_interior_real {n : ℕ} (hn : 2 ≤ n) {p : ℂ[X]} (hdeg : p.natDegree = n) + (hroots : ∀ w ∈ p.roots, ‖w‖ ≤ 1) {a : ℝ} (ha0 : 0 ≤ a) (ha1 : a < 1) + (hpa : p.eval (a : ℂ) = 0) : + ∃ ζ : ℂ, (derivative p).eval ζ = 0 ∧ ‖ζ - (a : ℂ)‖ < 1 := by + rcases eq_or_lt_of_le ha0 with hz | hz + · obtain ⟨ζ, hζ, hlt⟩ := sendov_center hn hdeg hroots (by rw [← hz] at hpa; simpa using hpa) + exact ⟨ζ, hζ, by rw [← hz]; simpa using hlt⟩ + · exact sendov_interior hn hdeg hroots hz ha1 hpa + +end Sendov diff --git a/LeanPool/Sendov/LargeDegree/Endgame.lean b/LeanPool/Sendov/LargeDegree/Endgame.lean new file mode 100644 index 0000000000..f9ad96e435 --- /dev/null +++ b/LeanPool/Sendov/LargeDegree/Endgame.lean @@ -0,0 +1,203 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.LargeDegree.Monotone +public import LeanPool.Sendov.FiniteRange.Certificate + +/-! +# The large-degree claim + +`Sendov.U_le_Ut` removed the degree from the bound; what is left is the single inequality +`Ut α < 1` on `0 ≤ α ≤ 17`, and then `R n α < 1` for every `n ≥ 101`. + +`Ut` is a rational function of `α` times `(α/(3+α)) ^ 48`, so multiplying by + + `D = 865200 · (3+α) ^ 49 · γ ^ 4`, `γ = 300 + 47α - α²`, + +which is positive on `[0,17]`, turns the claim into positivity of the single polynomial +`F = D (1 - Ut)` of degree `58`. The two closed forms used are + + `c 101 α = γ / (100 (3+α))`, + `T1 101 α = 1600000 (100-2α)² (3+α)³ / (721 γ⁴)`. + +A Bernstein certificate on `[0,17]` settles it: all 59 coefficients of `F` in the basis +`α^m (17-α)^(58-m)` are positive, so no subdivision of the `α`-range is needed. (The +informal write-up splits at `α = 16` and estimates the two pieces separately; that is not +necessary once the sharp Beta constant is used, which is what leaves the margin — `Ut` peaks +at `α = 17` with value `0.9229`.) + +## How the identity is checked + +`D` and `D · Ut` are written as coefficient lists (`Sendov.endD`, `Sendov.endN`), using the +polynomial arithmetic of `Sendov.FiniteRange.Certificate`, so that `F = endD - endN` is a +list the kernel can compute, and the Bernstein certificate `Sendov.endB` is a decidable +equality of lists (`Sendov.pev_pos_of_bern`). The only identity proved by `ring` is +`pev endN α = Ut α · pev endD α` (`Sendov.endN_eq`): each of the six terms of `Ut` cancels +against the matching factor of `D` separately, and `(3+α) ^ 48` and `γ ^ 4` are generalized +away before `field_simp`, so nothing of degree `48` is ever expanded. Upstream, this identity +and the certificate were closed by `ring` under a twentyfold heartbeat budget. + +## Main statements + +* `Sendov.Ut_lt_one`: `Ut α < 1` on `0 ≤ α ≤ 17`; +* `Sendov.large_degree`: `R n α < 1` for `n ≥ 101`. +-/ + +@[expose] public section + +namespace Sendov + +variable {α : ℝ} + +/-- `γ = 300 + 47α - α²`, which is `100 (3+α) · c 101 α`. -/ +def gam : List ℤ := [300, 47, -1] + +lemma pev_gam (x : ℝ) : pev gam x = 300 + 47 * x - x ^ 2 := by + simp [gam, pev] + ring + +/-- The denominator `D = 865200 (3+α)^49 γ⁴`. -/ +def endD : List ℤ := pscale 865200 (pmul (ppow [3, 1] 49) (ppow gam 4)) + +/-- The numerator `D · Ut`: the six terms of `Ut`, each multiplied by `D`. -/ +def endN : List ℤ := + padd (pscale 144200 (pmul (ppow [3, 1] 49) (ppow gam 4))) + (padd (pscale 216300 (pmul (ppow [3, 1] 48) (ppow gam 4))) + (padd (pscale 4326 (pmul (ppow [3, 1] 49) (ppow gam 4))) + (padd (pscale 2163 (pmul (ppow [3, 1] 48) (ppow gam 4))) + (padd (pscale 1939200000 (pmul (ppow [100, -2] 2) (ppow [3, 1] 52))) + (pscale 21627837 (pmul (pmul (ppow [50, -1] 2) (ppow [0, 1] 48)) (ppow gam 4))))))) + +/-- `F = D (1 - Ut)`, the polynomial certified positive. -/ +def endF : List ℤ := psub endD endN + +/-- The Bernstein coefficients of `17 ^ 58 * F` on `[0, 17]`. -/ +def endB : List ℤ := [ + 1122702787291394736448332031899900000000, + 388904288083346622931025909215729068000000, + 66095616740335374779150673987010161532260000, + 7345821640480281350499142140546658776321841200, + 600398748030850807066041679815685800572608040199, + 38479987967757849353019399973163199134827376858856, + 2013648131786096177205150562840212460891734276215217, + 88459088337848664272764574750756035751708812314589560, + 3328752627388631431253304215842302161184427248710824200, + 108955148579598077254581984889507974501857717600550300000, + 3139320986827193043298955183356728835782414071606732250000, + 80389849002074687648105368735226451202772917094058768000000, + 1843869779817877110104286469976591396926664444962705440000000, + 38126021284745149595963616317393007484187425284263404800000000, + 714519722771974812940511821448225512188719319523829280000000000, + 12192162072496626088921760868440507818256588279501222400000000000, + 190149195298252798424521646382266997826378949113808102400000000000, + 2719453325782140875058402865898661993411332371079473152000000000000, + 35765156781668343145270939254204039481078844597447447040000000000000, + 433581369383490123337920330591320005197369743601113088000000000000000, + 4855120840322429070915669670313005676027625016591872000000000000000000, + 50303800927352895844904371767120477621293024508175810560000000000000000, + 482953904720497092819809519030958414936076990756461772800000000000000000, + 4301697515309799266557277840727716853246295229412212736000000000000000000, + 35582005974740842580199098139010545771216816653126860800000000000000000000, + 273535549248031302586908863638264651412739231630163968000000000000000000000, + 1955426273644204648009173651834541693843095232637140992000000000000000000000, + 13004222926412994888311248631808734105341900865415413760000000000000000000000, + 80470387643773112884644249468688475191473557588882227200000000000000000000000, + 463355476918012102672652719197790300193712035699097600000000000000000000000000, + 2482344082055683113128185595725000998635940934141870080000000000000000000000000, + 12369353793584370842106405783534323328114720329863004160000000000000000000000000, + 57300834405504520484711032055319485636127102860053708800000000000000000000000000, + 246613403330189144932245957910378250136137902552252416000000000000000000000000000, + 985246695411671462829426238732411673050896371023872000000000000000000000000000000, + 3649974776445129628396257437653948413551102593597440000000000000000000000000000000, + 12522828085409243337307923676013931236910302987550720000000000000000000000000000000, + 39731340789062838384502107867195079108983927708057600000000000000000000000000000000, + 116365100653574128528674694068315721419971773857792000000000000000000000000000000000, + 313971050757264181615490913824916376724876505907200000000000000000000000000000000000, + 778602881203434272472350446775468799876667539456000000000000000000000000000000000000, + 1769823234178269115425193251412793044953817153536000000000000000000000000000000000000, + 3676061908648613727975384722760757591726652129280000000000000000000000000000000000000, + 6952202666310032877475473290777345311129573785600000000000000000000000000000000000000, + 11922241592723733002313059523572394705939333120000000000000000000000000000000000000000, + 18450845478651168634684539530259247984017408000000000000000000000000000000000000000000, + 25626302281194153741004424813630605199042150400000000000000000000000000000000000000000, + 31735356381499745521943376637135285074788352000000000000000000000000000000000000000000, + 34773986078859125604170241648646078618789153800477215677912265790935664780750000000000, + 33406510810664082686608872230111026353099051641531587806834322064288344554180000000000, + 27820946523539616021999756980494999341031737804699133246948994617042670678045550000000, + 19791944456596303161181417657916215477628661862047060146272089595047078222827061000000, + 11779484527176566489160923853925282151874607361320815965499241151163816336970531507500, + 5685451710206041407628952698706724254113808400301600724661558108213464738446593549500, + 2124220422337628714954562682925792634155465583908214661397004639843167881489238854787, + 572909076732572616057605734230328840239193993814061157407956440967916397115623518120, + 99530623246032452139763064572679576747235355843313027086842616874975359183988464200, + 8820861539641882551843091227900257872626927159038875775406157756108783934565132000, + 161598081294237579548393327166198311182821276785721838823669379905701080186270000] + +/-- The Bernstein certificate: `F` is positive on `[0,17]`. -/ +lemma F_pos (hα : 0 ≤ α) (hα' : α ≤ 17) : 0 < pev endF α := + pev_pos_of_bern endF endB 17 1 58 (by norm_num) (by norm_num) (by decide +kernel) + (by decide +kernel) (by decide +kernel) hα (by push_cast; linarith) + +lemma gam_pos (hα : 0 ≤ α) (hα' : α ≤ 17) : (0 : ℝ) < 300 + 47 * α - α ^ 2 := by + nlinarith + +lemma endD_pos (hα : 0 ≤ α) (hα' : α ≤ 17) : 0 < pev endD α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + have hg := gam_pos hα hα' + rw [endD, pev_pscale, pev_pmul, pev_ppow, pev_ppow, pev_three_add, pev_gam] + push_cast + positivity + +/-- `D · Ut = N`, with `(3+α) ^ 48` and `γ ^ 4` generalized away before clearing +denominators. -/ +lemma endN_eq (hα : 0 ≤ α) (hα' : α ≤ 17) : pev endN α = Ut α * pev endD α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + have hg := gam_pos hα hα' + have hc : c 101 α = (300 + 47 * α - α ^ 2) / (100 * (3 + α)) := by + simp only [c, M] + norm_num + field_simp + ring + have hT1 : T1 101 α + = 1600000 * (100 - 2 * α) ^ 2 * (3 + α) ^ 3 / (721 * (300 + 47 * α - α ^ 2) ^ 4) := by + simp only [T1, hc] + norm_num + field_simp + ring + rw [Ut, hT1, endN, endD] + simp only [pev_padd, pev_pscale, pev_pmul, pev_ppow, pev_three_add, pev_gam, pev_lin, pev_X] + push_cast + rw [show (3 + α) ^ 49 = (3 + α) ^ 48 * (3 + α) from pow_succ _ _, + show (3 + α) ^ 52 = (3 + α) ^ 48 * (3 + α) ^ 4 from by rw [← pow_add], div_pow] + have hX : (0 : ℝ) < (3 + α) ^ 48 := pow_pos h3 48 + have hG : (0 : ℝ) < (300 + 47 * α - α ^ 2) ^ 4 := pow_pos hg 4 + generalize (3 + α) ^ 48 = X at hX ⊢ + generalize (300 + 47 * α - α ^ 2) ^ 4 = G at hG ⊢ + field_simp + ring + +/-- **The bound in `α` alone is below `1`.** -/ +theorem Ut_lt_one (hα : 0 ≤ α) (hα' : α ≤ 17) : Ut α < 1 := by + have hD := endD_pos hα hα' + have hF := F_pos hα hα' + rw [endF, pev_psub, endN_eq hα hα'] at hF + rcases lt_or_ge (Ut α) 1 with h | h + · exact h + · exfalso + nlinarith [mul_le_mul_of_nonneg_right h hD.le] + +/-- **The large-degree claim.** Every degree `n ≥ 101`. -/ +theorem large_degree {n : ℕ} (hn : 101 ≤ n) (hα : 0 ≤ α) (hα' : α ≤ 17) + (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + have hcpos : (0 : ℝ) < c n α := by + have := c_ge_of_large hn hα hα' + linarith + exact lt_of_le_of_lt + (le_trans (R_le_U (by omega) hα hfeas hcpos) (U_le_Ut hn hα hα')) + (Ut_lt_one hα hα') + +end Sendov diff --git a/LeanPool/Sendov/LargeDegree/Monotone.lean b/LeanPool/Sendov/LargeDegree/Monotone.lean new file mode 100644 index 0000000000..a45cc409a4 --- /dev/null +++ b/LeanPool/Sendov/LargeDegree/Monotone.lean @@ -0,0 +1,365 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.LargeDegree.Tail + +/-! +# Monotonicity of the elementary bound in the degree + +`Sendov.U` bounds `Sendov.R` for every `n ≥ 5`. Here it is reduced to a single inequality +in `α` alone, by showing that `U n α` is essentially decreasing in `n` on `n ≥ 101`. + +Two features of the bound make this cheaper than it looks. + +First, the sharp Beta constant collapses. The exponent is `r = (n-4)/2`, so + + `(r+1)(r+2)(r+3)(r+4) = (n-2) n (n+2) (n+4) / 16`, + +and the `n (n-2)` in it cancels the `n (n-2)` in the prefactor of `Sendov.R` exactly. The +first tail term is therefore the *rational function* + + `T1 n α = 24 (n-1-2α)² / ((3+α) c⁴ (n-1)(n+2)(n+4))`, + +with no factorial-like growth left to control. (Had the cruder constant `6/r⁴` of the +informal write-up been used, no such cancellation would occur and the corresponding step +would need the degree-8 positivity certificate recorded there.) + +Second, the surviving real power is a square: writing `b = √B`, the second tail term is +`T2 n α = A² n (n-1)(n-2)/(16(3+α)) · b ^ (n-4)` with a *natural* exponent, so the geometric +decay can be run as an ordinary induction on `n` rather than as an estimate on `rpow`. + +## The two certificates + +`T1` is not monotone in `n` by itself — at `α = 17` the factor +`(n-1-2α)²/((n-1)(n+2)(n+4))` increases up to `n ≈ 108` — so it is bounded by its value at +`n = 101` only after a `1%` allowance, which the `c⁴` in the denominator more than pays for. +That allowance is `Sendov.tail1_poly`, a Bernstein certificate on `0 ≤ α ≤ 17`. Its top +coefficient is the only one in this development that is *not* a positive combination of +powers of the degree offset; it is handled by completing the square, its quadratic part +having negative discriminant. + +`Sendov.tail2_poly` is the geometric step, and is an ordinary all-positive certificate. + +## Main statements + +* `Sendov.U_eq`: `U` in closed form, `T1 + T2` plus four elementary terms; +* `Sendov.T1_le`, `Sendov.T2_le`: the two tail bounds at `n = 101`; +* `Sendov.U_le_Ut`: `U n α ≤ Ut α` for `n ≥ 101`, where `Ut` involves no `n` and no `rpow`. +-/ + +@[expose] public section + +namespace Sendov + +variable {n : ℕ} {α : ℝ} + +/-- The first tail term of `Sendov.U`, in closed form. -/ +noncomputable def T1 (n : ℕ) (α : ℝ) : ℝ := + 24 * ((n : ℝ) - 1 - 2 * α) ^ 2 / + ((3 + α) * c n α ^ 4 * ((n : ℝ) - 1) * ((n : ℝ) + 2) * ((n : ℝ) + 4)) + +/-- The second tail term of `Sendov.U`, with the real power of `B` replaced by a natural +power of `√B`. -/ +noncomputable def T2 (n : ℕ) (α : ℝ) : ℝ := + A n α ^ 2 * n * M n * ((n : ℝ) - 2) / (16 * (3 + α)) * Real.sqrt (α / (3 + α)) ^ (n - 4) + +/-! ### The two polynomial certificates -/ + +/-- The allowance for the first tail term: on `0 ≤ α ≤ 17` and `N = 100 + j ≥ 100`, + + `(N-2α)² / (N (N+3)(N+5)) ≤ (101/100) (100-2α)² / (100 · 103 · 105)`. + +A Bernstein certificate in `α` on `[0,17]`, whose coefficients are polynomials in `j`. The +top one, `439956 j³ + 27356448 j² - 366591060 j + 4711014000`, has a negative linear +coefficient; it is nonnegative because its quadratic part has negative discriminant. -/ +lemma tail1_poly {j α : ℝ} (hj : 0 ≤ j) (hα : 0 ≤ α) (hα' : α ≤ 17) : + 108150000 * (100 + j - 2 * α) ^ 2 + ≤ 101 * (100 - 2 * α) ^ 2 * ((100 + j) * (103 + j) * (105 + j)) := by + have hu : (0 : ℝ) ≤ 17 - α := by linarith + have hj2 : (0 : ℝ) ≤ j ^ 2 := sq_nonneg j + have hj3 : (0 : ℝ) ≤ j ^ 3 := pow_nonneg hj 3 + have h0 : (0 : ℝ) ≤ 1010000 * j ^ 3 + 202930000 * j ^ 2 + 10301150000 * j + 10815000000 := by + linarith + have h1 : (0 : ℝ) ≤ 1333200 * j ^ 3 + 194325600 * j ^ 2 + 6243318000 * j + 14275800000 := by + linarith + have h2 : (0 : ℝ) ≤ 439956 * j ^ 3 + 27356448 * j ^ 2 - 366591060 * j + 4711014000 := by + nlinarith [sq_nonneg (4559408 * j - 30549255), hj3] + have hid : (17 : ℝ) ^ 2 * + (101 * (100 - 2 * α) ^ 2 * ((100 + j) * (103 + j) * (105 + j)) + - 108150000 * (100 + j - 2 * α) ^ 2) + = (1010000 * j ^ 3 + 202930000 * j ^ 2 + 10301150000 * j + 10815000000) * (17 - α) ^ 2 + + (1333200 * j ^ 3 + 194325600 * j ^ 2 + 6243318000 * j + 14275800000) + * (α * (17 - α)) + + (439956 * j ^ 3 + 27356448 * j ^ 2 - 366591060 * j + 4711014000) * α ^ 2 := by + ring + nlinarith [mul_nonneg h0 (sq_nonneg (17 - α)), mul_nonneg h1 (mul_nonneg hα hu), + mul_nonneg h2 (sq_nonneg α)] + +/-- The geometric step for the second tail term: on `0 ≤ α ≤ 17` and `n = 101 + k ≥ 101`, + + `12 A_{n+1}² (n+1) n (n-1) ≤ 13 A_n² n (n-1)(n-2)`, + +after clearing the denominators `n²` and `(n-1)²` of `A_{n+1}` and `A_n`. Together with +`√B ≤ 12/13` this makes the step ratio less than one. A Bernstein certificate in `α` on +`[0,17]` with all coefficients positive combinations of powers of `k`. -/ +lemma tail2_poly {k α : ℝ} (hk : 0 ≤ k) (hα : 0 ≤ α) (hα' : α ≤ 17) : + 12 * (101 + k - 2 * α) ^ 2 * (102 + k) * (100 + k) ^ 2 + ≤ 13 * (100 + k - 2 * α) ^ 2 * (99 + k) * (101 + k) ^ 2 := by + have hu : (0 : ℝ) ≤ 17 - α := by linarith + have hk2 : (0 : ℝ) ≤ k ^ 2 := sq_nonneg k + have hk3 : (0 : ℝ) ≤ k ^ 3 := pow_nonneg hk 3 + have hk4 : (0 : ℝ) ≤ k ^ 4 := pow_nonneg hk 4 + have hk5 : (0 : ℝ) ≤ k ^ 5 := pow_nonneg hk 5 + have h0 : (0 : ℝ) ≤ k ^ 5 + 465 * k ^ 4 + 85927 * k ^ 3 + 7878063 * k ^ 2 + + 357802600 * k + 6426630000 := by linarith + have h1 : (0 : ℝ) ≤ 2 * k ^ 5 + 862 * k ^ 4 + 146218 * k ^ 3 + 12147842 * k ^ 2 + + 491029284 * k + 7642508400 := by linarith + have h2 : (0 : ℝ) ≤ k ^ 5 + 397 * k ^ 4 + 61447 * k ^ 3 + 4603863 * k ^ 2 + + 165348456 * k + 2243200572 := by linarith + have hid : (17 : ℝ) ^ 2 * + (13 * (100 + k - 2 * α) ^ 2 * (99 + k) * (101 + k) ^ 2 + - 12 * (101 + k - 2 * α) ^ 2 * (102 + k) * (100 + k) ^ 2) + = (k ^ 5 + 465 * k ^ 4 + 85927 * k ^ 3 + 7878063 * k ^ 2 + 357802600 * k + 6426630000) + * (17 - α) ^ 2 + + (2 * k ^ 5 + 862 * k ^ 4 + 146218 * k ^ 3 + 12147842 * k ^ 2 + 491029284 * k + + 7642508400) * (α * (17 - α)) + + (k ^ 5 + 397 * k ^ 4 + 61447 * k ^ 3 + 4603863 * k ^ 2 + 165348456 * k + + 2243200572) * α ^ 2 := by + ring + nlinarith [mul_nonneg h0 (sq_nonneg (17 - α)), mul_nonneg h1 (mul_nonneg hα hu), + mul_nonneg h2 (sq_nonneg α)] + +/-! ### The closed form of `U` -/ + +/-- `c` increases with `n`: raising the degree moves `c` towards `1 - B/2`. -/ +lemma c_mono {m n : ℕ} (hm : 2 ≤ m) (h : m ≤ n) (hα : 0 ≤ α) : c m α ≤ c n α := by + have hMm : 0 < M m := M_pos hm + have hMle : M m ≤ M n := by + simp only [M] + have : (m : ℝ) ≤ (n : ℝ) := by exact_mod_cast h + linarith + have : α / M n ≤ α / M m := div_le_div_of_nonneg_left hα hMm hMle + simp only [c] + linarith + +/-- The real power of `B` in `Sendov.U` is a natural power of `√B`. -/ +lemma rpow_B_eq (hn : 4 ≤ n) (hα : 0 ≤ α) : + (α / (3 + α)) ^ (((n : ℝ) - 4) / 2) = Real.sqrt (α / (3 + α)) ^ (n - 4) := by + have hB : (0 : ℝ) ≤ α / (3 + α) := div_nonneg hα (by linarith) + have hcast : ((n - 4 : ℕ) : ℝ) = (n : ℝ) - 4 := by + push_cast [Nat.cast_sub hn] + ring + rw [Real.sqrt_eq_rpow, ← Real.rpow_natCast ((α / (3 + α)) ^ ((1 : ℝ) / 2)) (n - 4), + ← Real.rpow_mul hB, hcast] + congr 1 + ring + +/-- The sharp Beta constant, factored. This is the cancellation that makes `T1` rational: +`(r+1)(r+2)(r+3)(r+4) = (n-2) n (n+2)(n+4)/16` at `r = (n-4)/2`. -/ +lemma beta_prod (n : ℕ) : + (((n : ℝ) - 4) / 2 + 1) * (((n : ℝ) - 4) / 2 + 2) * (((n : ℝ) - 4) / 2 + 3) + * (((n : ℝ) - 4) / 2 + 4) + = ((n : ℝ) - 2) * (n : ℝ) * ((n : ℝ) + 2) * ((n : ℝ) + 4) / 16 := by + ring + +/-- **`U` in closed form.** The `n (n-2)` of the prefactor cancels against the same factor +in the sharp Beta constant, leaving a rational function plus a natural power of `√B`. -/ +lemma U_eq (hn : 5 ≤ n) (hα : 0 ≤ α) (hc : c n α ≠ 0) : + U n α = 1 / 6 + 1 / (4 * (3 + α)) + 1 / (2 * M n) + 1 / (4 * M n * (3 + α)) + + T1 n α + T2 n α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + have hnR : (5 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + have h1 : (n : ℝ) - 1 ≠ 0 := by linarith + have h2 : (n : ℝ) - 2 ≠ 0 := by linarith + have h0 : (n : ℝ) ≠ 0 := by linarith + have hp2 : (n : ℝ) + 2 ≠ 0 := by linarith + have hp4 : (n : ℝ) + 4 ≠ 0 := by linarith + simp only [U, beta_prod, T1, T2, M, A, rpow_B_eq (show 4 ≤ n by omega) hα] + field_simp + ring + +/-! ### The first tail term -/ + +/-- `T1` is bounded by its value at `n = 101`, up to `1%`. -/ +lemma T1_le (hn : 101 ≤ n) (hα : 0 ≤ α) (hα' : α ≤ 17) : + T1 n α ≤ 101 / 100 * T1 101 α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + have hnR : (101 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + have hc1 : (0 : ℝ) < c 101 α := by + have := c_ge_of_large (n := 101) le_rfl hα hα' + linarith + have hcn : c 101 α ≤ c n α := c_mono (by omega) hn hα + have hcnp : (0 : ℝ) < c n α := lt_of_lt_of_le hc1 hcn + have hc4 : c 101 α ^ 4 ≤ c n α ^ 4 := by + exact pow_le_pow_left₀ hc1.le hcn 4 + have hN : (0 : ℝ) < (n : ℝ) - 1 := by linarith + have hN2 : (0 : ℝ) < (n : ℝ) + 2 := by linarith + have hN4 : (0 : ℝ) < (n : ℝ) + 4 := by linarith + have hprod : (0 : ℝ) ≤ ((n : ℝ) - 1) * ((n : ℝ) + 2) * ((n : ℝ) + 4) := + mul_nonneg (mul_nonneg hN.le hN2.le) hN4.le + have hD1 : (0 : ℝ) < (3 + α) * c 101 α ^ 4 * ((n : ℝ) - 1) * ((n : ℝ) + 2) * ((n : ℝ) + 4) := + mul_pos (mul_pos (mul_pos (mul_pos h3 (pow_pos hc1 4)) hN) hN2) hN4 + have hDle : (3 + α) * c 101 α ^ 4 * ((n : ℝ) - 1) * ((n : ℝ) + 2) * ((n : ℝ) + 4) + ≤ (3 + α) * c n α ^ 4 * ((n : ℝ) - 1) * ((n : ℝ) + 2) * ((n : ℝ) + 4) := by + have hd : (0 : ℝ) ≤ (3 + α) * (c n α ^ 4 - c 101 α ^ 4) * + (((n : ℝ) - 1) * ((n : ℝ) + 2) * ((n : ℝ) + 4)) := + mul_nonneg (mul_nonneg h3.le (by linarith)) hprod + nlinarith [hd] + -- step A: enlarge the denominator's `c` from `c n` down to `c 101` + have stepA : T1 n α + ≤ 24 * ((n : ℝ) - 1 - 2 * α) ^ 2 / + ((3 + α) * c 101 α ^ 4 * ((n : ℝ) - 1) * ((n : ℝ) + 2) * ((n : ℝ) + 4)) := by + rw [T1] + exact div_le_div_of_nonneg_left (by positivity) hD1 hDle + refine stepA.trans ?_ + -- step B: the certificate, with the same `c 101` on both sides + have hT101 : T1 101 α = 24 * (100 - 2 * α) ^ 2 / ((3 + α) * c 101 α ^ 4 * 1081500) := by + simp only [T1] + norm_num + ring_nf + have hD2 : (0 : ℝ) < 100 * ((3 + α) * c 101 α ^ 4 * 1081500) := by + have h4 := pow_pos hc1 4 + positivity + have hRHS : 101 / 100 * T1 101 α + = 101 * (24 * (100 - 2 * α) ^ 2) / (100 * ((3 + α) * c 101 α ^ 4 * 1081500)) := by + rw [hT101] + field_simp + rw [hRHS, div_le_div_iff₀ hD1 hD2] + have hj : (0 : ℝ) ≤ (n : ℝ) - 101 := by linarith + have hcert := tail1_poly (j := (n : ℝ) - 101) hj hα hα' + have hscale : (0 : ℝ) ≤ 24 * (3 + α) * c 101 α ^ 4 := by positivity + nlinarith [mul_le_mul_of_nonneg_left hcert hscale] + +/-! ### The second tail term -/ + +/-- `√B ≤ 12/13` on `0 ≤ α ≤ 17`, since `B ≤ 17/20 ≤ (12/13)²`. A rational bound is enough +here, and avoids carrying a square root into the step ratio. -/ +lemma sqrtB_le (hα : 0 ≤ α) (hα' : α ≤ 17) : Real.sqrt (α / (3 + α)) ≤ 12 / 13 := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + have hB : α / (3 + α) ≤ 144 / 169 := by + rw [div_le_div_iff₀ h3 (by norm_num)] + linarith + calc Real.sqrt (α / (3 + α)) ≤ Real.sqrt (144 / 169) := Real.sqrt_le_sqrt hB + _ = 12 / 13 := by + rw [show (144 : ℝ) / 169 = (12 / 13) ^ 2 by norm_num, + Real.sqrt_sq (by norm_num : (0 : ℝ) ≤ 12 / 13)] + +/-- One step of the geometric decay: `T2` decreases with `n` on `n ≥ 101`. -/ +lemma T2_step (hn : 101 ≤ n) (hα : 0 ≤ α) (hα' : α ≤ 17) : T2 (n + 1) α ≤ T2 n α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + have hnR : (101 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + have hn0 : (0 : ℝ) < (n : ℝ) := by linarith + have hn1 : (0 : ℝ) < (n : ℝ) - 1 := by linarith + have hb0 : (0 : ℝ) ≤ Real.sqrt (α / (3 + α)) := Real.sqrt_nonneg _ + have hb1 : Real.sqrt (α / (3 + α)) ≤ 12 / 13 := sqrtB_le hα hα' + have hA1 : A (n + 1) α = ((n : ℝ) - 2 * α) / (n : ℝ) := by + simp only [A, M] + push_cast + rw [show ((n : ℝ) + 1 - 1) = (n : ℝ) from by ring] + field_simp + have hA2 : A n α = ((n : ℝ) - 1 - 2 * α) / ((n : ℝ) - 1) := by + simp only [A, M] + field_simp + have hk : (0 : ℝ) ≤ (n : ℝ) - 101 := by linarith + have hcert := tail2_poly (k := (n : ℝ) - 101) hk hα hα' + have hCn1 : (0 : ℝ) ≤ A (n + 1) α ^ 2 * ((n + 1 : ℕ) : ℝ) * M (n + 1) + * (((n + 1 : ℕ) : ℝ) - 2) / (16 * (3 + α)) := by + have hM : (0 : ℝ) ≤ M (n + 1) := by simp only [M]; push_cast; linarith + have h2 : (0 : ℝ) ≤ ((n + 1 : ℕ) : ℝ) - 2 := by push_cast; linarith + have h1 : (0 : ℝ) ≤ ((n + 1 : ℕ) : ℝ) := by positivity + positivity + -- the coefficient inequality + have hstep : A (n + 1) α ^ 2 * ((n + 1 : ℕ) : ℝ) * M (n + 1) * (((n + 1 : ℕ) : ℝ) - 2) + / (16 * (3 + α)) * Real.sqrt (α / (3 + α)) + ≤ A n α ^ 2 * (n : ℝ) * M n * ((n : ℝ) - 2) / (16 * (3 + α)) := by + refine le_trans (mul_le_mul_of_nonneg_left hb1 hCn1) ?_ + rw [← sub_nonneg] + have key : A n α ^ 2 * (n : ℝ) * M n * ((n : ℝ) - 2) / (16 * (3 + α)) + - A (n + 1) α ^ 2 * ((n + 1 : ℕ) : ℝ) * M (n + 1) * (((n + 1 : ℕ) : ℝ) - 2) + / (16 * (3 + α)) * (12 / 13) + = (13 * ((n : ℝ) - 1 - 2 * α) ^ 2 * ((n : ℝ) - 2) * (n : ℝ) ^ 2 + - 12 * ((n : ℝ) - 2 * α) ^ 2 * ((n : ℝ) + 1) * ((n : ℝ) - 1) ^ 2) + / (208 * (3 + α) * (n : ℝ) * ((n : ℝ) - 1)) := by + simp only [hA1, hA2, M] + push_cast + field_simp + ring + rw [key] + refine div_nonneg ?_ (by positivity) + nlinarith [hcert] + have hexp : n + 1 - 4 = (n - 4) + 1 := by omega + calc T2 (n + 1) α + = A (n + 1) α ^ 2 * ((n + 1 : ℕ) : ℝ) * M (n + 1) * (((n + 1 : ℕ) : ℝ) - 2) + / (16 * (3 + α)) * Real.sqrt (α / (3 + α)) + * Real.sqrt (α / (3 + α)) ^ (n - 4) := by + rw [T2, hexp, pow_succ] + ring + _ ≤ A n α ^ 2 * (n : ℝ) * M n * ((n : ℝ) - 2) / (16 * (3 + α)) + * Real.sqrt (α / (3 + α)) ^ (n - 4) := + mul_le_mul_of_nonneg_right hstep (pow_nonneg hb0 _) + _ = T2 n α := by rw [T2] + +/-- `T2` is bounded by its value at `n = 101`. -/ +lemma T2_le (hn : 101 ≤ n) (hα : 0 ≤ α) (hα' : α ≤ 17) : T2 n α ≤ T2 101 α := by + induction n, hn using Nat.le_induction with + | base => exact le_rfl + | succ m hm ih => exact (T2_step hm hα hα').trans ih + +/-! ### The bound with no degree left in it -/ + +/-- The elementary bound at `n = 101`, with `√B` removed and `α` the only variable. -/ +noncomputable def Ut (α : ℝ) : ℝ := + 1 / 6 + 1 / (4 * (3 + α)) + 1 / 200 + 1 / (400 * (3 + α)) + 101 / 100 * T1 101 α + + (100 - 2 * α) ^ 2 / 100 * 101 * 99 / (16 * (3 + α)) * (α / (3 + α)) ^ 48 + +/-- **`U` is bounded by an expression in `α` alone**, for every `n ≥ 101`. This is where the +degree leaves the argument. -/ +theorem U_le_Ut (hn : 101 ≤ n) (hα : 0 ≤ α) (hα' : α ≤ 17) : U n α ≤ Ut α := by + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + have hnR : (101 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + have hM : (100 : ℝ) ≤ M n := by simp only [M]; linarith + have hcpos : (0 : ℝ) < c n α := by + have := c_ge_of_large hn hα hα' + linarith + rw [U_eq (by omega) hα (ne_of_gt hcpos), Ut] + have e1 : 1 / (2 * M n) ≤ 1 / 200 := by + rw [div_le_div_iff₀ (by linarith) (by norm_num)] + linarith + have e2 : 1 / (4 * M n * (3 + α)) ≤ 1 / (400 * (3 + α)) := by + rw [div_le_div_iff₀ (by positivity) (by positivity)] + nlinarith + have e3 := T1_le hn hα hα' + have hB : (0 : ℝ) ≤ α / (3 + α) := div_nonneg hα (by linarith) + have hb0 : (0 : ℝ) ≤ Real.sqrt (α / (3 + α)) := Real.sqrt_nonneg _ + have hb1 : Real.sqrt (α / (3 + α)) ≤ 1 := by + have hle : α / (3 + α) ≤ 1 := by rw [div_le_one h3]; linarith + calc Real.sqrt (α / (3 + α)) ≤ Real.sqrt 1 := Real.sqrt_le_sqrt hle + _ = 1 := Real.sqrt_one + have hpow : Real.sqrt (α / (3 + α)) ^ (101 - 4) ≤ (α / (3 + α)) ^ 48 := by + have h97 : Real.sqrt (α / (3 + α)) ^ (101 - 4) + = (α / (3 + α)) ^ 48 * Real.sqrt (α / (3 + α)) := by + rw [show (101 : ℕ) - 4 = 2 * 48 + 1 by norm_num, pow_succ, pow_mul, Real.sq_sqrt hB] + rw [h97] + nlinarith [pow_nonneg hB 48] + have e4 : T2 101 α + ≤ (100 - 2 * α) ^ 2 / 100 * 101 * 99 / (16 * (3 + α)) * (α / (3 + α)) ^ 48 := by + have hA101 : A 101 α = (100 - 2 * α) / 100 := by + simp only [A, M] + norm_num + ring + have hT2 : T2 101 α = (100 - 2 * α) ^ 2 / 100 * 101 * 99 / (16 * (3 + α)) + * Real.sqrt (α / (3 + α)) ^ (101 - 4) := by + simp only [T2, hA101, M] + norm_num + ring_nf + tauto + rw [hT2] + exact mul_le_mul_of_nonneg_left hpow (by positivity) + have e5 := (T2_le hn hα hα').trans e4 + linarith + +end Sendov diff --git a/LeanPool/Sendov/LargeDegree/Tail.lean b/LeanPool/Sendov/LargeDegree/Tail.lean new file mode 100644 index 0000000000..2f21c4feff --- /dev/null +++ b/LeanPool/Sendov/LargeDegree/Tail.lean @@ -0,0 +1,98 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Common.Chord + +/-! +# The tail bound + +The large-degree argument replaces the integral in `Sendov.R` by an elementary expression: + + `∫₀¹ t³ Q^r dt ≤ 6 / (c⁴ (r+1)(r+2)(r+3)(r+4)) + Bʳ / 4`. + +This is the only part of the large-degree argument that touches integration; everything after +it is elementary inequalities in `α` and `n`. + +The work is done by `Sendov.integral_le_tail_cube` in `Sendov.Common.Chord`, which proves the +same split for the general quadratic `QQ c A` and an arbitrary weight `t^k` — the `α ≤ 17` +argument needs the `k = 1` instance of it. All that is left here is to read that bound +through `Q n α t = QQ (c n α) (A n α) t` and `Q n α 1 = α/(3+α)`. + +## Main statements + +* `Sendov.c_le_one`: `c ≤ 1`, so the chord's zero `1/c` is at least `1`; +* `Sendov.integral_le_tail`: the bound above. +-/ + +@[expose] public section + +namespace Sendov + +open MeasureTheory + +variable {n : ℕ} {α t : ℝ} + +/-- `c ≤ 1`, so the chord's zero `1/c` is at least `1`. -/ +lemma c_le_one (hn : 2 ≤ n) (hα : 0 ≤ α) : c n α ≤ 1 := by + have hM : 0 < M n := M_pos hn + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + simp only [c] + have h1 : 0 ≤ α / M n := by positivity + have h2 : 0 ≤ α / (2 * (3 + α)) := by positivity + linarith + +/-- **The tail bound**, read off from `Sendov.integral_le_tail_cube`. -/ +theorem integral_le_tail (hn : 2 ≤ n) (hα : 0 ≤ α) (hfeas : c n α ^ 2 ≤ A n α) + (hc : 0 < c n α) {r : ℝ} (hr : 0 < r) : + (∫ t in (0 : ℝ)..1, t ^ 3 * Q n α t ^ r) + ≤ 6 / (c n α ^ 4 * ((r + 1) * (r + 2) * (r + 3) * (r + 4))) + + (α / (3 + α)) ^ r / 4 := by + have h := integral_le_tail_cube hfeas hc (c_le_one hn hα) hr + rw [← Q_one hn hα] + simpa only [Q_eq_QQ] using h + +/-! ### The elementary upper bound `U` + +Everything after this point in the large-degree argument is an inequality in `α` and `n` +alone; no integral survives. -/ + +/-- The elementary bound replacing `Sendov.R`: `(11)` of the informal write-up, but with the +sharper Beta constant `6/((r+1)(r+2)(r+3)(r+4))` in place of `6/r⁴`. -/ +noncomputable def U (n : ℕ) (α : ℝ) : ℝ := + 1 / 6 + 1 / (4 * (3 + α)) + 1 / (2 * M n) + 1 / (4 * M n * (3 + α)) + + A n α ^ 2 * n * M n * ((n : ℝ) - 2) / (4 * (3 + α)) + * (6 / (c n α ^ 4 * + ((((n : ℝ) - 4) / 2 + 1) * (((n : ℝ) - 4) / 2 + 2) * (((n : ℝ) - 4) / 2 + 3) + * (((n : ℝ) - 4) / 2 + 4))) + + (α / (3 + α)) ^ (((n : ℝ) - 4) / 2) / 4) + +/-- On the large-degree range `c` is bounded below, hence positive. For `n ≥ 101` and +`α ≤ 17` this gives `c ≥ 81/200`, which is `(3)` of the write-up. -/ +lemma c_ge_of_large (hn : 101 ≤ n) (hα : 0 ≤ α) (hα' : α ≤ 17) : 81 / 200 ≤ c n α := by + have hM : (100 : ℝ) ≤ M n := by + have : (101 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + simp only [M]; linarith + have hM0 : (0 : ℝ) < M n := by linarith + have h3 : (0 : ℝ) < 3 + α := three_add_pos hα + simp only [c] + have h1 : α / M n ≤ 17 / 100 := by + rw [div_le_iff₀ hM0] + nlinarith + have h2 : α / (2 * (3 + α)) ≤ 17 / 40 := by + rw [div_le_iff₀ (by positivity : (0:ℝ) < 2 * (3 + α))] + nlinarith + linarith + +/-- **`R` is bounded by the elementary expression `U`.** This is the bridge out of +integration: from here the large-degree argument is elementary. -/ +theorem R_le_U (hn : 5 ≤ n) (hα : 0 ≤ α) (hfeas : c n α ^ 2 ≤ A n α) (hc : 0 < c n α) : + R n α ≤ U n α := by + have hnR : (5 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + have hr : (0 : ℝ) < ((n : ℝ) - 4) / 2 := by linarith + exact R_le_of_integral_le (by omega) hα (integral_le_tail (by omega) hα hfeas hc hr) + +end Sendov diff --git a/LeanPool/Sendov/Main.lean b/LeanPool/Sendov/Main.lean new file mode 100644 index 0000000000..0c4c85b180 --- /dev/null +++ b/LeanPool/Sendov/Main.lean @@ -0,0 +1,57 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.FiniteRange.Cover +public import LeanPool.Sendov.LargeDegree.Endgame + +/-! +# The numerical claim, for every degree + +This is the top of the development. `Sendov.Defs` fixes the notation of equation `stat` +of the blog post; everything else establishes that its right-hand side `R n α` is below `1`. +Two arguments meet here. + +* `Sendov.finite_range_le_100` certifies `5 ≤ n ≤ 100` by explicit polynomial arithmetic: + the integral is a finite sum of moments, the moments come from a packed recurrence, and + each of 31 batches of degrees carries one Bernstein certificate in `α`. +* `Sendov.large_degree` covers `n ≥ 101` analytically: the integral is bounded by a Beta + integral plus a geometric tail, the resulting elementary bound `U` is shown decreasing in + the degree, and its value at `n = 101` is below `1` by one more Bernstein certificate. + +The two ranges overlap in intent but not in method, and the seam is at `100/101` rather than +at the `97/98` of the blog post: the finite side was pushed three degrees further so that the +analytic side would start with margin `0.122` instead of `0.048`. + +## Main statements + +* `Sendov.stat_lt_one`: `R n α < 1` for every `n ≥ 5`, `0 ≤ α ≤ 17` with `c ^ 2 ≤ A`; +* `Sendov.stat_contradiction`: equation `stat` of the blog post is therefore unsatisfiable. +-/ + +@[expose] public section + +namespace Sendov + +variable {α : ℝ} + +/-- **The numerical claim.** The right-hand side of equation `stat` of the blog post is +strictly less than `1` for every degree `n ≥ 5` and every `0 ≤ α ≤ 17` satisfying the +feasibility constraint `c ^ 2 ≤ A`. -/ +theorem stat_lt_one {n : ℕ} (hn : 5 ≤ n) (hα : 0 ≤ α) (hα' : α ≤ 17) + (hfeas : c n α ^ 2 ≤ A n α) : R n α < 1 := by + rcases Nat.lt_or_ge n 101 with h | h + · exact finite_range_le_100 hn (by omega) hα hα' hfeas + · exact large_degree h hα hα' hfeas + +/-- **Equation `stat` is unsatisfiable.** This is the form in which the blog post uses the +claim: the polynomial argument there produces `1 ≤ R n α` under exactly these hypotheses, so +the assumed counterexample to Sendov's conjecture cannot exist. -/ +theorem stat_contradiction {n : ℕ} (hn : 5 ≤ n) (hα : 0 ≤ α) (hα' : α ≤ 17) + (hfeas : c n α ^ 2 ≤ A n α) (hstat : 1 ≤ R n α) : False := + absurd hstat (not_le.2 (stat_lt_one hn hα hα' hfeas)) + +end Sendov diff --git a/LeanPool/Sendov/Reduction/Alpha17.lean b/LeanPool/Sendov/Reduction/Alpha17.lean new file mode 100644 index 0000000000..c8c11d80c4 --- /dev/null +++ b/LeanPool/Sendov/Reduction/Alpha17.lean @@ -0,0 +1,285 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Reduction.Simplified +public import Mathlib.Analysis.Complex.ExponentialBounds + +/-! +# The bound `α ≤ 17` + +This is `(beta-bound) + (origin-exact) ⟹ (17)`, the last link of the chain. Suppose `α > 17`. +Feasibility gives `n - 1 ≥ 2α > 34`, so `n ≥ 36`, and after discarding `ax > 0` and bounding +`1 - x² ≤ 1`, `(origin-exact)` reads + + `2α ≤ 1/(2(n-1)) + a² n (n-1) ∫₀¹ t β(t)^((n-2)/2) dt`. + +The integral is split by `Sendov.integral_le_tail_lin` — the `k = 1` instance of the chord +bound — into a Beta value plus `β(1)^((n-2)/2)/2`. Both halves of `(beta-bound)` are then +used, and this is the only place where the logarithmic half is needed: + +* `x² ≥ 1 - β(1) ≥ log α / α` turns the Beta term into `4α/log α`; +* `β(1) ≤ e^{β(1)-1} ≤ α^{-1/α}` makes the second term decay geometrically. + +Dividing by `α` leaves `2 ≤ 1/(2(n-1)α) + 4/log α + T`, and the substitution +`v := (n-1)/(2α) - 1` (the write-up's `u = a²/(1-a²)`) turns `T` into +`v(2(v+1) + 1/α) α^{-v} · α^{1/(2α)}`, which is bounded by an ordinary polynomial inequality +after four terms of the exponential series. The three pieces come to `0.0009 + 1.4135 + +0.5054 = 1.920 < 2`. + +The write-up uses `∫₀^∞ t e^{-ct} dt` here and reaches `1.948`; the Beta route used instead +reaches `1.817`, and the extra room is what pays for the crude constants below. + +## Main statements + +* `Sendov.log_seventeen_ge`, `Sendov.log_le_div_exp_one`: the two facts about `log` needed; +* `Sendov.alpha_le_seventeen`: `(beta-bound) + (origin-exact) ⟹ α ≤ 17`. +-/ + +@[expose] public section + +namespace Sendov + +open MeasureTheory Real + +/-! ### Elementary estimates -/ + +/-- Four terms of the exponential series. -/ +lemma quartic_le_exp {z : ℝ} (hz : 0 ≤ z) : 1 + z + z ^ 2 / 2 + z ^ 3 / 6 ≤ exp z := by + have h := Real.sum_le_exp_of_nonneg hz 4 + simp [Finset.sum_range_succ, Nat.factorial] at h + linarith + +/-- `log t ≤ t / e`, the tangent bound at `t = e`. -/ +lemma log_le_div_exp_one {t : ℝ} (ht : 0 < t) : Real.log t ≤ t / exp 1 := by + have h := Real.log_le_sub_one_of_pos (x := t / exp 1) (by positivity) + rw [Real.log_div ht.ne' (Real.exp_pos 1).ne', Real.log_exp] at h + linarith + +/-- `exp z ≤ 1/(1-z)` for `z < 1`, from `1 - z ≤ e^{-z}`. -/ +lemma exp_le_one_div_one_sub {z : ℝ} (hz : z < 1) : exp z ≤ 1 / (1 - z) := by + have hpos := Real.exp_pos z + have h1 : (0 : ℝ) < 1 - z := by linarith + have h := Real.add_one_le_exp (-z) + rw [Real.exp_neg] at h + have h2 : (1 - z) * exp z ≤ 1 := by + have := mul_le_mul_of_nonneg_right h hpos.le + rw [inv_mul_cancel₀ hpos.ne'] at this + linarith + rw [le_div_iff₀ h1] + linarith + +/-- `2.83 ≤ log 17`, via `log 16 + log(17/16) ≥ 4 log 2 + 1/17`. -/ +lemma log_seventeen_ge : (2.83 : ℝ) ≤ Real.log 17 := by + have h2 : (0.6931471803 : ℝ) < Real.log 2 := Real.log_two_gt_d9 + have h16 : Real.log 16 = 4 * Real.log 2 := by + rw [show (16 : ℝ) = 2 ^ 4 by norm_num, Real.log_pow] + norm_num + have hfrac : (1 : ℝ) - 16 / 17 ≤ Real.log (17 / 16) := by + have h := Real.log_le_sub_one_of_pos (x := (16 : ℝ) / 17) (by norm_num) + rw [show (16 : ℝ) / 17 = ((17 : ℝ) / 16)⁻¹ by norm_num, Real.log_inv] at h + linarith + have hsplit : Real.log 17 = Real.log 16 + Real.log (17 / 16) := by + rw [← Real.log_mul (by norm_num) (by norm_num)] + norm_num + rw [hsplit, h16] + linarith + +/-- The polynomial bound behind the geometric term: `v(2v + 2 + 1/17) e^{-2.83 v} ≤ 0.4118` +for `v ≥ 0`. Four terms of the exponential series suffice; the true maximum is `0.3722`. -/ +lemma tail_poly_bound {v : ℝ} (hv : 0 ≤ v) : + v * (2 * (v + 1) + 1 / 17) * exp (-(2.83 * v)) ≤ 0.4118 := by + have hz : (0 : ℝ) ≤ 2.83 * v := by linarith + have hexp := quartic_le_exp hz + have hpos : (0 : ℝ) < exp (2.83 * v) := Real.exp_pos _ + have hneg : exp (-(2.83 * v)) = (exp (2.83 * v))⁻¹ := Real.exp_neg _ + rw [hneg, mul_inv_le_iff₀ hpos] + refine le_trans ?_ (mul_le_mul_of_nonneg_left hexp (by norm_num : (0:ℝ) ≤ 0.4118)) + nlinarith [hv, sq_nonneg v, sq_nonneg (v - 1 / 2), pow_nonneg hv 3] + +/-! ### The bound -/ + +-- one long proof rather than several: the `v`-substitution ties the integral bound, the two +-- exponential factors and the final arithmetic together, and splitting it would mean carrying +-- a dozen hypotheses across the boundary. Every nonlinear step is closed from one explicit +-- product hint, so the proof stays within the default heartbeat budget. +/-- **`(beta-bound) + (origin-exact) ⟹ α ≤ 17`.** -/ +theorem alpha_le_seventeen {n : ℕ} {a x α : ℝ} (hn : 5 ≤ n) + (ha : 0 < a) (ha1 : a < 1) (hx : x ^ 2 ≤ 1) + (hα : α = M n * (1 - a ^ 2) / 2) + (hbeta : QQ (a * x) (a ^ 2) 1 ≤ α / (3 + α)) + (hlogb : Real.log α ≤ α * (1 - QQ (a * x) (a ^ 2) 1)) + (horigin : 2 * α + a * x ≤ (1 - x ^ 2) / (2 * M n) + + a ^ 2 * n * M n * ∫ t in (0 : ℝ)..1, t * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2)) : + α ≤ 17 := by + by_contra hcon + rw [not_le] at hcon + have hn2 : 2 ≤ n := by omega + have hM : (0 : ℝ) < M n := M_pos hn2 + have hα0 : (0 : ℝ) < α := by linarith + -- feasibility forces `n - 1 ≥ 2α > 34` + have hMge : 2 * α ≤ M n := by linarith [alpha_le_half hn2 hα] + have hM34 : (34 : ℝ) < M n := by linarith + have hMn : M n = (n : ℝ) - 1 := rfl + -- the standing facts about `β(1)` + set B1 : ℝ := QQ (a * x) (a ^ 2) 1 with hB1def + set r : ℝ := ((n : ℝ) - 2) / 2 with hrdef + have hfeas : (a * x) ^ 2 ≤ a ^ 2 := by + have := mul_le_mul_of_nonneg_left hx (sq_nonneg a) + nlinarith only [this] + have hB0 : 0 ≤ B1 := QQ_nonneg hfeas 1 + have h3 : (0 : ℝ) < 3 + α := by linarith + have hB1lt : B1 < 1 := by + have : α / (3 + α) < 1 := by rw [div_lt_one h3]; linarith + linarith + have hB1eq : B1 = 1 - 2 * (a * x) + a ^ 2 := by rw [hB1def, QQ_one] + have hax : 0 < a * x := by nlinarith [sq_nonneg a] + have haxle : a * x ≤ 1 := by nlinarith [sq_nonneg (x - 1), sq_nonneg (x + 1), ha.le] + have hxpos : 0 < x := by nlinarith [hax, ha] + have hr : (0 : ℝ) < r := by rw [hrdef]; rw [hMn] at hM34; linarith + -- `log α ≥ 2.83` + have hlog17 : (2.83 : ℝ) ≤ Real.log α := + le_trans log_seventeen_ge (Real.log_le_log (by norm_num) hcon.le) + have hlogpos : (0 : ℝ) < Real.log α := by linarith + -- `x² ≥ 1 - β(1) ≥ log α / α` + have hxsq : Real.log α / α ≤ x ^ 2 := by + have h1 : 1 - B1 ≤ x ^ 2 := by rw [hB1eq]; nlinarith [sq_nonneg (x - a)] + rw [div_le_iff₀ hα0] + nlinarith [hlogb, h1] + -- the chord split of the integral + have hI1 := integral_le_tail_lin hfeas hax haxle hr + set I1 : ℝ := ∫ t in (0 : ℝ)..1, t * QQ (a * x) (a ^ 2) t ^ r with hI1def + have hprod : (r + 1) * (r + 2) = (n : ℝ) * ((n : ℝ) + 2) / 4 := by rw [hrdef]; ring + have hane : (a : ℝ) ≠ 0 := ha.ne' + have hxne : (x : ℝ) ≠ 0 := hxpos.ne' + have hnpos : (0 : ℝ) < (n : ℝ) := by rw [hMn] at hM34; linarith + have hbeta_term : a ^ 2 * n * M n * (1 / ((a * x) ^ 2 * ((r + 1) * (r + 2)))) + = 4 * M n / (x ^ 2 * ((n : ℝ) + 2)) := by + rw [hprod] + have hn0 : (n : ℝ) ≠ 0 := hnpos.ne' + have hn2' : (n : ℝ) + 2 ≠ 0 := by linarith + field_simp + have hcoefnn : (0 : ℝ) ≤ a ^ 2 * n * M n := by positivity + have hstep : a ^ 2 * n * M n * I1 + ≤ 4 * M n / (x ^ 2 * ((n : ℝ) + 2)) + a ^ 2 * n * M n * (B1 ^ r / 2) := by + calc a ^ 2 * n * M n * I1 + ≤ a ^ 2 * n * M n * (1 / ((a * x) ^ 2 * ((r + 1) * (r + 2))) + B1 ^ r / 2) := + mul_le_mul_of_nonneg_left hI1 hcoefnn + _ = 4 * M n / (x ^ 2 * ((n : ℝ) + 2)) + a ^ 2 * n * M n * (B1 ^ r / 2) := by + rw [mul_add, hbeta_term] + -- `4M/(x²(n+2)) ≤ 4/x² ≤ 4α/log α` + have hfourx : 4 * M n / (x ^ 2 * ((n : ℝ) + 2)) ≤ 4 * α / Real.log α := by + have h1 : 4 * M n / (x ^ 2 * ((n : ℝ) + 2)) ≤ 4 / x ^ 2 := by + rw [div_le_div_iff₀ (by positivity) (by positivity)] + have : M n ≤ (n : ℝ) + 2 := by rw [hMn]; linarith + nlinarith only [mul_le_mul_of_nonneg_left this (sq_nonneg x)] + have h2 : (4 : ℝ) / x ^ 2 ≤ 4 * α / Real.log α := by + rw [div_le_div_iff₀ (by positivity) hlogpos] + have := hxsq + rw [div_le_iff₀ hα0] at this + linarith [this] + linarith + have hfirst : (1 - x ^ 2) / (2 * M n) ≤ 1 / (2 * M n) := by + have hD : (0 : ℝ) < 2 * M n := by linarith + rw [div_le_div_iff₀ hD hD] + nlinarith only [mul_nonneg (sq_nonneg x) hD.le] + have hmain : 2 * α ≤ 1 / (2 * M n) + 4 * α / Real.log α + a ^ 2 * n * M n * (B1 ^ r / 2) := by + linarith [horigin, hstep, hfourx, hfirst, hax] + -- the substitution `v = M/(2α) - 1` + -- `obtain` rather than `set`: a `set` binding is a local *definition*, which `linarith` + -- zeta-reduces back into `M n / (2 * α) - 1`, making its goals nonlinear in `α` + obtain ⟨v, hvdef⟩ : ∃ w : ℝ, w = M n / (2 * α) - 1 := ⟨_, rfl⟩ + have h2α : (0 : ℝ) < 2 * α := by linarith + have hv0 : 0 ≤ v := by + rw [hvdef, sub_nonneg, le_div_iff₀ h2α] + linarith + have hMv : M n = 2 * α * (v + 1) := by + rw [hvdef] + field_simp + ring + have ha2 : a ^ 2 = 1 - 2 * α / M n := by + rw [hα] + field_simp + ring + have hav : a ^ 2 * M n / (2 * α) = v := by + rw [ha2, hvdef] + field_simp + -- `β(1) ≤ exp(-log α/α)`, hence `β(1)^r ≤ exp(-(v+1)log α) exp(log α/(2α))` + have hB1exp : B1 ≤ exp (-(Real.log α / α)) := by + have h1 : B1 ≤ exp (B1 - 1) := by linarith [Real.add_one_le_exp (B1 - 1)] + refine h1.trans (Real.exp_le_exp.2 ?_) + have : Real.log α / α ≤ 1 - B1 := by rw [div_le_iff₀ hα0]; linarith + linarith + have hrM : r = (M n - 1) / 2 := by rw [hrdef, hMn]; ring + have hB1r : B1 ^ r ≤ exp (-(v * Real.log α)) / α * exp (Real.log α / (2 * α)) := by + have h1 : B1 ^ r ≤ exp (-(Real.log α / α) * r) := by + calc B1 ^ r ≤ exp (-(Real.log α / α)) ^ r := Real.rpow_le_rpow hB0 hB1exp hr.le + _ = exp (-(Real.log α / α) * r) := by rw [← Real.exp_mul] + refine h1.trans_eq ?_ + have hexpo : -(Real.log α / α) * r + = (-(v * Real.log α) + -Real.log α) + Real.log α / (2 * α) := by + rw [hrM, hMv] + field_simp + ring + have hinv : exp (-Real.log α) = 1 / α := by + rw [Real.exp_neg, Real.exp_log hα0] + ring + rw [hexpo, Real.exp_add, Real.exp_add, hinv] + ring + -- the two exponential factors + have hvexp : exp (-(v * Real.log α)) ≤ exp (-(2.83 * v)) := + Real.exp_le_exp.2 (by nlinarith only [mul_le_mul_of_nonneg_left hlog17 hv0]) + have he1 : (2.7 : ℝ) < exp 1 := by linarith [Real.exp_one_gt_d9] + have hsecexp : exp (Real.log α / (2 * α)) ≤ 1 / (1 - 0.1852) := by + refine le_trans (Real.exp_le_exp.2 ?_) (exp_le_one_div_one_sub (by norm_num)) + have h := log_le_div_exp_one hα0 + have h27 : α / exp 1 ≤ α / 2.7 := + div_le_div_of_nonneg_left hα0.le (by norm_num) he1.le + rw [div_le_iff₀ h2α] + have hlast : α / 2.7 ≤ 0.1852 * (2 * α) := by + rw [div_le_iff₀ (by norm_num : (0 : ℝ) < 2.7)] + nlinarith only [hα0] + linarith [h, h27, hlast] + -- assemble the geometric term + have hnv : (n : ℝ) = 2 * α * (v + 1) + 1 := by + rw [← hMv, hMn] + ring + have hthird : a ^ 2 * n * M n * (B1 ^ r / 2) ≤ 0.50543 * α := by + have hexpnn : (0 : ℝ) ≤ exp (-(2.83 * v)) := (Real.exp_pos _).le + have hkey : a ^ 2 * n * M n * (B1 ^ r / 2) = (n : ℝ) * α * v * B1 ^ r := by + rw [← hav] + field_simp + rw [hkey] + have hstep1 : (n : ℝ) * α * v * B1 ^ r + ≤ (n : ℝ) * α * v * (exp (-(2.83 * v)) / α * (1 / (1 - 0.1852))) := by + refine mul_le_mul_of_nonneg_left (hB1r.trans ?_) (by positivity) + refine mul_le_mul ?_ hsecexp (Real.exp_pos _).le (by positivity) + gcongr + refine hstep1.trans ?_ + have hfinal : (n : ℝ) * α * v * (exp (-(2.83 * v)) / α * (1 / (1 - 0.1852))) + = α * (v * (2 * (v + 1) + 1 / α) * exp (-(2.83 * v))) * (1 / (1 - 0.1852)) := by + rw [hnv] + field_simp + rw [hfinal] + have hbound : v * (2 * (v + 1) + 1 / α) * exp (-(2.83 * v)) ≤ 0.4118 := by + refine le_trans ?_ (tail_poly_bound hv0) + have hinv : (1 : ℝ) / α ≤ 1 / 17 := by + rw [div_le_div_iff₀ hα0 (by norm_num)]; linarith + have hprod : (0 : ℝ) ≤ v * exp (-(2.83 * v)) := mul_nonneg hv0 hexpnn + nlinarith only [mul_le_mul_of_nonneg_left hinv hprod] + have hscale : α * (v * (2 * (v + 1) + 1 / α) * exp (-(2.83 * v))) ≤ α * 0.4118 := + mul_le_mul_of_nonneg_left hbound hα0.le + linarith [hscale] + -- the numeric contradiction + have hlogterm : 4 * α / Real.log α ≤ 1.41343 * α := by + rw [div_le_iff₀ hlogpos] + nlinarith only [mul_le_mul_of_nonneg_left hlog17 hα0.le, hα0] + have hMterm : 1 / (2 * M n) ≤ 1 / 68 := by + rw [div_le_div_iff₀ (by positivity) (by norm_num)] + linarith + linarith [hmain, hlogterm, hMterm, hthird, hcon] + +end Sendov diff --git a/LeanPool/Sendov/Reduction/BetaBound.lean b/LeanPool/Sendov/Reduction/BetaBound.lean new file mode 100644 index 0000000000..b09f0d003e --- /dev/null +++ b/LeanPool/Sendov/Reduction/BetaBound.lean @@ -0,0 +1,159 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Reduction.Polar +public import LeanPool.Sendov.Common.Sinh + +/-! +# The simplified polar inequality `β(1) ≤ α/(3+α)` + +This is `(lt) ⟹ (beta-bound)`. Evaluating the integral, + + `∫₀¹ exp(α(-1 + (2-B)t)) dt = e^{-u} · sinh h / h`, `u = αB/2`, `h = α(2-B)/2`, + +so `(lt)` says `e^u ≤ sinh h / h`, and `Sendov.log_sinh_div_le` turns that into +`u ≤ √(h²+9) - 3`. Since `h = α - u`, squaring `u + 3 ≤ √((α-u)² + 9)` gives +`u(6 + 2α) ≤ α²`, that is `B ≤ α/(3+α)`. + +The constant `3` is optimal: at `B = α/(3+α)` the slack in `(lt)` is `-α⁵/540 + α⁶/648`, so +the bound is tight to three orders at `α = 0`. This is the one link of the chain with no room +in it anywhere. + +One degenerate case has to be cleared first, and `(lt)` clears it: if `B ≥ 2` then the +integrand is at most `e^{-α} < 1` throughout, so the integral is below `1`. Hence `B < 2` and +`h > 0`, which is what the `sinh` estimate needs. + +## Main statements + +* `Sendov.integral_exp_eq`: the closed form of the integral in `(lt)`; +* `Sendov.beta_lt_two`: `(lt)` forces `B < 2`; +* `Sendov.beta_le`: `(lt) ⟹ B ≤ α/(3+α)`. +-/ + +@[expose] public section + +namespace Sendov + +open MeasureTheory Real + +variable {α B c : ℝ} + +/-- `∫ₐᵇ exp(ct) dt = (exp(cb) - exp(ca))/c`. -/ +lemma integral_exp_mul (hc : c ≠ 0) (a b : ℝ) : + (∫ t in a..b, exp (c * t)) = (exp (c * b) - exp (c * a)) / c := by + have h := intervalIntegral.integral_comp_mul_left (a := a) (b := b) (fun y : ℝ => exp y) hc + rw [h, integral_exp] + simp only [smul_eq_mul] + field_simp + +/-- The closed form of the integral in `(lt)`. -/ +lemma integral_exp_eq (hα : 0 < α) (hB : B < 2) : + (∫ t in (0 : ℝ)..1, exp (α * (-1 + (2 - B) * t))) + = exp (-(α * B / 2)) * (sinh (α * (2 - B) / 2) / (α * (2 - B) / 2)) := by + have hkpos : 0 < α * (2 - B) := by + have : 0 < 2 - B := by linarith + positivity + have hrw : ∀ t : ℝ, α * (-1 + (2 - B) * t) = -α + α * (2 - B) * t := by + intro t; ring + simp only [hrw, Real.exp_add] + rw [intervalIntegral.integral_const_mul, integral_exp_mul hkpos.ne' 0 1] + simp only [mul_zero, Real.exp_zero] + have hEF : exp (-(α * B / 2)) = exp (-α) * exp (α * (2 - B) / 2) := by + rw [← Real.exp_add]; congr 1; ring + have hsq : exp (α * (2 - B) * 1) = exp (α * (2 - B) / 2) * exp (α * (2 - B) / 2) := by + rw [← Real.exp_add]; congr 1; ring + have hneg : exp (-(α * (2 - B) / 2)) = (exp (α * (2 - B) / 2))⁻¹ := Real.exp_neg _ + have hF : exp (α * (2 - B) / 2) ≠ 0 := (Real.exp_pos _).ne' + rw [Real.sinh_eq, hEF, hsq, hneg] + field_simp + +/-- The same integral, in the form the logarithmic half of `(beta-bound)` uses. -/ +lemma integral_exp_eq' (hα : 0 < α) (hB : B < 2) : + (∫ t in (0 : ℝ)..1, exp (α * (-1 + (2 - B) * t))) + = (exp (α * (1 - B)) - exp (-α)) / (α * (2 - B)) := by + have hkpos : 0 < α * (2 - B) := by + have : 0 < 2 - B := by linarith + positivity + have hrw : ∀ t : ℝ, α * (-1 + (2 - B) * t) = -α + α * (2 - B) * t := by + intro t; ring + simp only [hrw, Real.exp_add] + rw [intervalIntegral.integral_const_mul, integral_exp_mul hkpos.ne' 0 1] + simp only [mul_zero, Real.exp_zero] + have hsum : exp (-α) * exp (α * (2 - B) * 1) = exp (α * (1 - B)) := by + rw [← Real.exp_add]; congr 1; ring + rw [← hsum] + field_simp + +/-- `(lt)` forces `B < 2`: otherwise the integrand never exceeds `e^{-α} < 1`. -/ +lemma beta_lt_two (hα : 0 < α) + (hlt : 1 ≤ ∫ t in (0 : ℝ)..1, exp (α * (-1 + (2 - B) * t))) : B < 2 := by + by_contra hcon + rw [not_lt] at hcon + have hmono : (∫ t in (0 : ℝ)..1, exp (α * (-1 + (2 - B) * t))) + ≤ ∫ _t in (0 : ℝ)..1, exp (-α) := by + refine intervalIntegral.integral_mono_on (by norm_num) + ((by fun_prop : Continuous fun t : ℝ => + exp (α * (-1 + (2 - B) * t))).intervalIntegrable _ _) + ((by fun_prop : Continuous fun _ : ℝ => exp (-α)).intervalIntegrable _ _) ?_ + intro u hu + refine Real.exp_le_exp.2 ?_ + nlinarith [mul_nonneg (mul_nonneg hα.le hu.1) (sub_nonneg.2 hcon)] + have hval : (∫ _t in (0 : ℝ)..1, exp (-α)) = exp (-α) := by simp + have hone : exp (-α) < 1 := by + rw [Real.exp_lt_one_iff]; linarith + rw [hval] at hmono + linarith + +/-- **`(lt) ⟹ (beta-bound)`.** The `α/(3+α)` of the blog post. -/ +theorem beta_le (hα : 0 < α) (hB0 : 0 ≤ B) + (hlt : 1 ≤ ∫ t in (0 : ℝ)..1, exp (α * (-1 + (2 - B) * t))) : B ≤ α / (3 + α) := by + have hB2 : B < 2 := beta_lt_two hα hlt + rw [integral_exp_eq hα hB2] at hlt + set u : ℝ := α * B / 2 with hudef + set h : ℝ := α * (2 - B) / 2 with hhdef + have hhpos : 0 < h := by + rw [hhdef] + have : 0 < 2 - B := by linarith + positivity + have hu0 : 0 ≤ u := by rw [hudef]; positivity + -- `1 ≤ e^{-u} sinh h / h` is `e^u ≤ sinh h / h` + have h1 : exp u ≤ sinh h / h := by + rw [Real.exp_neg, inv_mul_eq_div, le_div_iff₀ (Real.exp_pos u)] at hlt + linarith + have h2 : u ≤ Real.log (sinh h / h) := by + rw [← Real.log_exp u] + exact Real.log_le_log (Real.exp_pos u) h1 + have h3 : u ≤ Real.sqrt (h ^ 2 + 9) - 3 := h2.trans (log_sinh_div_le hhpos) + -- square; `h = α - u` + have hhu : h = α - u := by rw [hhdef, hudef]; ring + have hsq : Real.sqrt (h ^ 2 + 9) ^ 2 = h ^ 2 + 9 := Real.sq_sqrt (by positivity) + have h4 : (u + 3) ^ 2 ≤ h ^ 2 + 9 := by + have hnn : (0 : ℝ) ≤ u + 3 := by linarith + nlinarith [h3, hsq, Real.sqrt_nonneg (h ^ 2 + 9)] + have h5 : u * (6 + 2 * α) ≤ α ^ 2 := by rw [hhu] at h4; nlinarith [h4] + rw [le_div_iff₀ (by linarith : (0 : ℝ) < 3 + α)] + rw [hudef] at h5 + nlinarith [h5, hα] + +/-- **The logarithmic half of `(beta-bound)`:** `log α ≤ α(1 - β(1))`. From `(lt)`, +`e^{α(1-B)} ≥ α(2-B) + e^{-α} > α`, since `B ≤ 1` makes `2 - B ≥ 1`. -/ +theorem log_le_alpha_mul (hα : 0 < α) (hB1 : B ≤ 1) + (hlt : 1 ≤ ∫ t in (0 : ℝ)..1, exp (α * (-1 + (2 - B) * t))) : + Real.log α ≤ α * (1 - B) := by + have hB2 : B < 2 := by linarith + rw [integral_exp_eq' hα hB2] at hlt + have hden : (0 : ℝ) < α * (2 - B) := by + have : (0 : ℝ) < 2 - B := by linarith + positivity + rw [le_div_iff₀ hden, one_mul] at hlt + have hge : α ≤ α * (2 - B) := by nlinarith + have hlt' : α < exp (α * (1 - B)) := by + have := Real.exp_pos (-α) + linarith + exact (Real.log_le_iff_le_exp hα).2 hlt'.le + +end Sendov diff --git a/LeanPool/Sendov/Reduction/Main.lean b/LeanPool/Sendov/Reduction/Main.lean new file mode 100644 index 0000000000..dec21f2326 --- /dev/null +++ b/LeanPool/Sendov/Reduction/Main.lean @@ -0,0 +1,93 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Reduction.Alpha17 +public import LeanPool.Sendov.Main + +/-! +# The polar and origin inequalities are incompatible + +This is the top of the development. The blog post's argument, after the complex-analytic part +that is not formalized here, produces two inequalities about a degree `n`, a zero `0 < a < 1` +and the real part `x` of the mean of the reciprocal critical-point data: + +* the **raw polar inequality** `(1Q)`, `1 ≤ ∫₀¹ P(t)^((n-1)/2) dt`; +* the **raw origin inequality** `(origin-exact)`. + +`Sendov.polar_origin_incompatible` says they cannot both hold for `n ≥ 5`. Neither statement +mentions a polynomial or a complex number, so the theorem is a self-contained assertion about +two real numbers. + +## The chain + +``` + polar_exp beta_le + (1Q) ─────────────────────▶ (lt) ─────────────────▶ β(1) ≤ α/(3+α) + │ │ + │ log_le_alpha_mul │ + ▼ │ + log α ≤ α(1-β(1)) │ + │ │ + (origin-exact) ────────────────────────────────────▶ α ≤ 17 │ + │ alpha_le_seventeen │ + │ one_le_of_origin │ + ▼ ▼ + (1le) ───────────────────────────────────────────▶ 1 ≤ R n α + stat_of_one_le │ + │ stat_lt_one + ▼ + False +``` + +Both halves of `(beta-bound)` are needed, and each is used exactly once: the rational half +`β(1) ≤ α/(3+α)` by `Sendov.stat_of_one_le`, to substitute for `β(1)` in `(1le)`, and the +logarithmic half by `Sendov.alpha_le_seventeen`, to bound `1/x²`. + +## Main statements + +* `Sendov.polar_origin_incompatible`: the two raw inequalities have no common solution. +-/ + +@[expose] public section + +namespace Sendov + +open MeasureTheory + +/-- **The polar and origin inequalities are incompatible.** For `n ≥ 5` there is no +`0 < a < 1` and `|x| ≤ 1` satisfying both the raw polar inequality `(1Q)` and the raw origin +inequality `(origin-exact)`. -/ +theorem polar_origin_incompatible {n : ℕ} (hn : 5 ≤ n) {a x α : ℝ} + (ha : 0 < a) (ha1 : a < 1) (hx : x ^ 2 ≤ 1) + (hα : α = M n * (1 - a ^ 2) / 2) + (hpolar : 1 ≤ ∫ t in (0 : ℝ)..1, Ppolar a x t ^ (((n : ℝ) - 1) / 2)) + (horigin : 2 * α + a * x ≤ (1 - x ^ 2) / (2 * M n) + + a ^ 2 * n * M n * ∫ t in (0 : ℝ)..1, t * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2)) : + False := by + have hn2 : 2 ≤ n := by omega + have hα0 : 0 < α := alpha_pos hn2 ha1 ha.le hα + have h3 : (0 : ℝ) < 3 + α := by linarith + have hfeas : (a * x) ^ 2 ≤ a ^ 2 := by nlinarith [sq_nonneg a, sq_nonneg x] + have hB0 : 0 ≤ QQ (a * x) (a ^ 2) 1 := QQ_nonneg hfeas 1 + -- `(1Q) ⟹ (lt) ⟹ (beta-bound)`, both halves + have hlt := polar_exp hn2 hx hα hpolar + have hbeta : QQ (a * x) (a ^ 2) 1 ≤ α / (3 + α) := beta_le hα0 hB0 hlt + have hB1lt : QQ (a * x) (a ^ 2) 1 < 1 := by + have : α / (3 + α) < 1 := by rw [div_lt_one h3]; linarith + linarith + have hlogb : Real.log α ≤ α * (1 - QQ (a * x) (a ^ 2) 1) := + log_le_alpha_mul hα0 hB1lt.le hlt + -- `α ≤ 17` + have h17 : α ≤ 17 := alpha_le_seventeen hn ha ha1 hx hα hbeta hlogb horigin + -- `(origin-exact) ⟹ (1le) ⟹ stat` + have h1le := one_le_of_origin hn ha ha1 hx hα hα0 hB1lt horigin + have hstat : 1 ≤ R n α := stat_of_one_le hn hx hα hα0 hbeta h1le + -- but `stat` is false + exact absurd hstat + (not_le.2 (stat_lt_one hn hα0.le h17 (feasible_of_beta hn2 hx hα hα0 hbeta))) + +end Sendov diff --git a/LeanPool/Sendov/Reduction/Polar.lean b/LeanPool/Sendov/Reduction/Polar.lean new file mode 100644 index 0000000000..5ad30055f0 --- /dev/null +++ b/LeanPool/Sendov/Reduction/Polar.lean @@ -0,0 +1,92 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Reduction.Setup + +/-! +# From the raw polar inequality to its `α`, `β(1)` form + +This is `(1Q) ⟹ (lt)` of the blog post: the raw polar inequality + + `1 ≤ ∫₀¹ (a² + 2atx(1-a²) + t²(1-a²)²)^((n-1)/2) dt` + +implies + + `1 ≤ ∫₀¹ exp(α(-1 + (2-β(1))t)) dt`. + +The step is pointwise, and it is remarkably tight. Writing `β(1) = 1 - 2ax + a²` and +`α = (n-1)(1-a²)/2`, one has the *identity* + + `1 + (1-a²)(-1 + (2-β(1))t) - P(t) = (1-a²)² (t - t²)`, + +so the only inequality used in the whole implication is `t² ≤ t` on `[0,1]` — with equality at +both endpoints — followed by `1 + y ≤ exp y`. Raising to the power `(n-1)/2` then turns +`(1-a²)/2 · (n-1)` into `α`. + +The blog post states `(lt)` with a strict inequality. Nothing downstream needs that: every +later use of `(beta-bound)` is non-strict, so this file proves the non-strict form and avoids +having to argue that the integrand is strictly smaller on a set of positive measure. + +## Main statements + +* `Sendov.Ppolar_le_lin`: the pointwise identity-with-`t² ≤ t`; +* `Sendov.polar_exp`: `(1Q) ⟹ (lt)`. +-/ + +@[expose] public section + +namespace Sendov + +open MeasureTheory + +variable {n : ℕ} {a x t α : ℝ} + +/-- The pointwise bound `(at)`. An identity apart from `t² ≤ t`. -/ +lemma Ppolar_le_lin (a x : ℝ) (ht0 : 0 ≤ t) (ht1 : t ≤ 1) : + Ppolar a x t ≤ 1 + (1 - a ^ 2) * (-1 + (2 - QQ (a * x) (a ^ 2) 1) * t) := by + have hid : 1 + (1 - a ^ 2) * (-1 + (2 - QQ (a * x) (a ^ 2) 1) * t) - Ppolar a x t + = (1 - a ^ 2) ^ 2 * (t - t ^ 2) := by + simp only [Ppolar, QQ]; ring + nlinarith [mul_nonneg (sq_nonneg (1 - a ^ 2)) (mul_nonneg ht0 (sub_nonneg.2 ht1))] + +/-- The pointwise bound after raising to the power `(n-1)/2`. -/ +lemma Ppolar_rpow_le (hn : 2 ≤ n) (hx : x ^ 2 ≤ 1) (hα : α = M n * (1 - a ^ 2) / 2) + (ht0 : 0 ≤ t) (ht1 : t ≤ 1) : + Ppolar a x t ^ (((n : ℝ) - 1) / 2) + ≤ Real.exp (α * (-1 + (2 - QQ (a * x) (a ^ 2) 1) * t)) := by + have hM : (0 : ℝ) < M n := M_pos hn + have he : (0 : ℝ) ≤ ((n : ℝ) - 1) / 2 := by simp only [M] at hM; linarith + set y : ℝ := (1 - a ^ 2) * (-1 + (2 - QQ (a * x) (a ^ 2) 1) * t) with hy + have h1 : Ppolar a x t ≤ Real.exp y := by + refine le_trans (Ppolar_le_lin a x ht0 ht1) ?_ + have := Real.add_one_le_exp y + linarith + have h2 : Ppolar a x t ^ (((n : ℝ) - 1) / 2) ≤ Real.exp y ^ (((n : ℝ) - 1) / 2) := + Real.rpow_le_rpow (Ppolar_nonneg hx a t) h1 he + refine h2.trans_eq ?_ + rw [← Real.exp_mul] + congr 1 + simp only [M] at hα + rw [hy, hα] + ring + +/-- **`(1Q) ⟹ (lt)`.** -/ +theorem polar_exp (hn : 2 ≤ n) (hx : x ^ 2 ≤ 1) (hα : α = M n * (1 - a ^ 2) / 2) + (hpolar : 1 ≤ ∫ t in (0 : ℝ)..1, Ppolar a x t ^ (((n : ℝ) - 1) / 2)) : + 1 ≤ ∫ t in (0 : ℝ)..1, Real.exp (α * (-1 + (2 - QQ (a * x) (a ^ 2) 1) * t)) := by + have hM : (0 : ℝ) < M n := M_pos hn + have he : (0 : ℝ) ≤ ((n : ℝ) - 1) / 2 := by simp only [M] at hM; linarith + have hc1 : Continuous fun t : ℝ => Ppolar a x t ^ (((n : ℝ) - 1) / 2) := + (continuous_rpow_const he).comp (continuous_Ppolar a x) + have hc2 : Continuous fun t : ℝ => + Real.exp (α * (-1 + (2 - QQ (a * x) (a ^ 2) 1) * t)) := by fun_prop + refine hpolar.trans (intervalIntegral.integral_mono_on (by norm_num) + (hc1.intervalIntegrable _ _) (hc2.intervalIntegrable _ _) ?_) + intro u hu + exact Ppolar_rpow_le hn hx hα hu.1 hu.2 + +end Sendov diff --git a/LeanPool/Sendov/Reduction/Setup.lean b/LeanPool/Sendov/Reduction/Setup.lean new file mode 100644 index 0000000000..cd5b3ee4b0 --- /dev/null +++ b/LeanPool/Sendov/Reduction/Setup.lean @@ -0,0 +1,81 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Common.Chord + +/-! +# The raw inequalities, and the dictionary between them and `Sendov.R` + +`Sendov.stat_lt_one` refutes equation `stat` of the blog post. `stat` is itself deduced there +from two inequalities that come out of the complex-analytic part of the argument: + +* the **raw polar inequality** `(1Q)`, `1 ≤ ∫₀¹ P(t)^((n-1)/2) dt` with + `P(t) = a² + 2atx(1-a²) + t²(1-a²)²`; +* the **raw origin inequality** `(origin-exact)`, + `2α + ax ≤ (1-x²)/(2(n-1)) + a²n(n-1) ∫₀¹ t β(t)^((n-2)/2) dt`. + +Both are statements about two real numbers `a ∈ (0,1)` and `x ∈ [-1,1]` and a degree `n`; no +polynomial, no complex number and no `q_j` survives into them. That is what makes the next +target — that the two are not simultaneously satisfiable for `n ≥ 5` — a self-contained +real-variable statement. + +This file fixes `P` and records the dictionary. The key entry is that `α` and `a` determine +each other: with `α = (n-1)(1-a²)/2` one has `A n α = a²` *exactly*, so the `A` of +`Sendov.Defs` and the `a²` of the blog post are the same thing, and `β(t)` is +`Sendov.QQ (a*x) (a^2) t` while `Q n α t` is `Sendov.QQ (c n α) (A n α) t`. + +## Main statements + +* `Sendov.Ppolar_eq`: `P` as a sum of squares, hence nonnegative for `|x| ≤ 1`; +* `Sendov.A_eq_sq`: `A n α = a²`; +* `Sendov.alpha_pos`, `Sendov.alpha_le_half`: the range of `α`. +-/ + +@[expose] public section + +namespace Sendov + +/-- The integrand of the raw polar inequality `(1Q)`. -/ +noncomputable def Ppolar (a x t : ℝ) : ℝ := + a ^ 2 + 2 * a * t * x * (1 - a ^ 2) + t ^ 2 * (1 - a ^ 2) ^ 2 + +variable {n : ℕ} {a x t α : ℝ} + +/-- `P` is a sum of squares once `|x| ≤ 1`; this is the same computation that makes +`Sendov.QQ_nonneg` work. -/ +lemma Ppolar_eq (a x t : ℝ) : + Ppolar a x t = (a + t * (1 - a ^ 2) * x) ^ 2 + t ^ 2 * (1 - a ^ 2) ^ 2 * (1 - x ^ 2) := by + simp only [Ppolar]; ring + +lemma Ppolar_nonneg (hx : x ^ 2 ≤ 1) (a t : ℝ) : 0 ≤ Ppolar a x t := by + rw [Ppolar_eq] + exact add_nonneg (sq_nonneg _) (mul_nonneg (by positivity) (by linarith)) + +lemma continuous_Ppolar (a x : ℝ) : Continuous fun t : ℝ => Ppolar a x t := by + simp only [Ppolar]; fun_prop + +/-- With `α = (n-1)(1-a²)/2`, the `A` of `Sendov.Defs` is exactly `a²`. -/ +lemma A_eq_sq (hn : 2 ≤ n) (hα : α = M n * (1 - a ^ 2) / 2) : A n α = a ^ 2 := by + have hM : M n ≠ 0 := (M_pos hn).ne' + simp only [A, hα] + field_simp + ring + +lemma alpha_pos (hn : 2 ≤ n) (ha1 : a < 1) (_ha0 : 0 ≤ a) + (hα : α = M n * (1 - a ^ 2) / 2) : 0 < α := by + have hM : 0 < M n := M_pos hn + rw [hα] + have : 0 < 1 - a ^ 2 := by nlinarith + positivity + +lemma alpha_le_half (hn : 2 ≤ n) (hα : α = M n * (1 - a ^ 2) / 2) : + α ≤ M n / 2 := by + have hM : 0 < M n := M_pos hn + rw [hα] + nlinarith [sq_nonneg a] + +end Sendov diff --git a/LeanPool/Sendov/Reduction/Simplified.lean b/LeanPool/Sendov/Reduction/Simplified.lean new file mode 100644 index 0000000000..4c4e43c231 --- /dev/null +++ b/LeanPool/Sendov/Reduction/Simplified.lean @@ -0,0 +1,271 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Reduction.Stat + +/-! +# From the raw origin inequality to its `α`, `β(1)` form + +This is `(origin-exact) + (beta-bound) ⟹ (1le)`. The work is in replacing + + `∫₀¹ t β(t)^((n-2)/2) dt` + +by a Beta value plus the `t³` integral that `stat` is stated with. Writing `β` as a sum of +squares, `β(t) = (1-axt)² + a²t²(1-x²)`, the blog post applies the mean value theorem to +`s ↦ ((1-axt)² + s)^((n-2)/2)`. Here that step is Bernoulli's inequality instead: dividing + + `(P+Q)^p ≤ P^p + p Q (P+Q)^(p-1)` + +through by `(P+Q)^p` turns it into `1 ≤ θ^p + p(1-θ)` at `θ = P/(P+Q)`, which is exactly +`one_add_mul_self_le_rpow_one_add`. No derivative and no mean value theorem is needed. + +After that, `∫₀¹ t (1-axt)^(n-2) dt` is enlarged to `[0, 1/ax]` — legitimate since `ax ≤ 1` and +the integrand stays nonnegative — and evaluated by `Sendov.integral_chord_lin`, the `k = 1` +Beta integral of `Sendov.Common.Chord`. What is left is algebra in `α` and `β(1)`, using +`1 - x² ≤ β(1)` (which is `(x-a)² ≥ 0`) and `ax = 1 - β(1)/2 - α/(n-1)`. + +`(beta-bound)` enters only through `β(1) < 1`, which is what makes `x > a/2 > 0`, hence `1/x²` +finite and `1/(ax) ≥ 1`. + +## Main statements + +* `Sendov.rpow_add_le_of_one_le`: the Bernoulli form of the mean-value step; +* `Sendov.beta_split`: the pointwise consequence for `β`; +* `Sendov.one_le_of_origin`: `(origin-exact) + (beta-bound) ⟹ (1le)`. +-/ + +@[expose] public section + +namespace Sendov + +open MeasureTheory + +variable {n : ℕ} {a x t α : ℝ} + +/-- `(P+Q)^p ≤ P^p + p Q (P+Q)^(p-1)` for `p ≥ 1`. This is the blog post's mean-value step, +obtained from Bernoulli's inequality after dividing by `(P+Q)^p`. -/ +lemma rpow_add_le_of_one_le {P Q p : ℝ} (hP : 0 ≤ P) (hPQ : 0 < P + Q) (hp : 1 ≤ p) : + (P + Q) ^ p ≤ P ^ p + p * Q * (P + Q) ^ (p - 1) := by + have hθ : (0 : ℝ) ≤ P / (P + Q) := div_nonneg hP hPQ.le + have hb := one_add_mul_self_le_rpow_one_add (s := P / (P + Q) - 1) (by linarith) hp + rw [show (1 : ℝ) + (P / (P + Q) - 1) = P / (P + Q) by ring] at hb + have hpow : (0 : ℝ) < (P + Q) ^ p := Real.rpow_pos_of_pos hPQ p + have hfrac : (P / (P + Q)) ^ p * (P + Q) ^ p = P ^ p := by + rw [← Real.mul_rpow hθ hPQ.le] + congr 1 + field_simp + have hsub : (P + Q) ^ (p - 1) = (P + Q) ^ p / (P + Q) := by + rw [Real.rpow_sub hPQ, Real.rpow_one] + have key : (P + Q) ^ p - p * Q * ((P + Q) ^ p / (P + Q)) ≤ P ^ p := by + calc (P + Q) ^ p - p * Q * ((P + Q) ^ p / (P + Q)) + = (1 + p * (P / (P + Q) - 1)) * (P + Q) ^ p := by + field_simp + ring + _ ≤ (P / (P + Q)) ^ p * (P + Q) ^ p := mul_le_mul_of_nonneg_right hb hpow.le + _ = P ^ p := hfrac + rw [hsub] + linarith + +/-- `ax t < 1` on `[0,1]`, so the chord `1 - axt` is positive. -/ +lemma one_sub_mul_pos (ha : 0 < a) (ha1 : a < 1) (hx : x ^ 2 ≤ 1) + (ht0 : 0 ≤ t) (ht1 : t ≤ 1) : 0 < 1 - a * x * t := by + rcases le_or_gt x 0 with h | h + · nlinarith [mul_nonneg ht0 (mul_nonneg ha.le (neg_nonneg.2 h))] + · have hx1 : x ≤ 1 := by nlinarith + have h1 : a * x * t ≤ a * x * 1 := + mul_le_mul_of_nonneg_left ht1 (mul_pos ha h).le + nlinarith [h1] + +/-- The pointwise step: `β^((n-2)/2)` split into a chord power and a `β^((n-4)/2)` remainder. -/ +lemma beta_split (hn : 5 ≤ n) (ha : 0 < a) (ha1 : a < 1) (hx : x ^ 2 ≤ 1) + (ht0 : 0 ≤ t) (ht1 : t ≤ 1) : + QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2) + ≤ (1 - a * x * t) ^ ((n : ℝ) - 2) + + ((n : ℝ) - 2) / 2 * (a ^ 2 * t ^ 2 * (1 - x ^ 2)) + * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 4) / 2) := by + have hnR : (5 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + have hy : (0 : ℝ) < 1 - a * x * t := one_sub_mul_pos ha ha1 hx ht0 ht1 + have hP : (0 : ℝ) ≤ (1 - a * x * t) ^ 2 := sq_nonneg _ + have hQ : (0 : ℝ) ≤ a ^ 2 * t ^ 2 * (1 - x ^ 2) := by + have : (0 : ℝ) ≤ 1 - x ^ 2 := by linarith + positivity + have hsum : QQ (a * x) (a ^ 2) t + = (1 - a * x * t) ^ 2 + a ^ 2 * t ^ 2 * (1 - x ^ 2) := by + rw [QQ_eq]; ring + have hPQ : (0 : ℝ) < (1 - a * x * t) ^ 2 + a ^ 2 * t ^ 2 * (1 - x ^ 2) := by positivity + have hp : (1 : ℝ) ≤ ((n : ℝ) - 2) / 2 := by linarith + have hb := rpow_add_le_of_one_le hP hPQ hp + rw [← hsum] at hb + -- `((1-axt)²)^((n-2)/2) = (1-axt)^(n-2)` + have hchord : ((1 - a * x * t) ^ 2 : ℝ) ^ (((n : ℝ) - 2) / 2) + = (1 - a * x * t) ^ ((n : ℝ) - 2) := by + rw [← Real.rpow_natCast (1 - a * x * t) 2, ← Real.rpow_mul hy.le] + congr 1 + push_cast + ring + -- `(n-2)/2 - 1 = (n-4)/2` + have hexp : ((n : ℝ) - 2) / 2 - 1 = ((n : ℝ) - 4) / 2 := by ring + rw [hchord, hexp] at hb + exact hb + +/-- The integral form of the split, with the chord piece evaluated by the Beta integral. -/ +lemma integral_beta_split (hn : 5 ≤ n) (ha : 0 < a) (ha1 : a < 1) (hx : x ^ 2 ≤ 1) + (hax : 0 < a * x) : + (∫ t in (0 : ℝ)..1, t * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2)) + ≤ 1 / ((a * x) ^ 2 * (((n : ℝ) - 1) * (n : ℝ))) + + ((n : ℝ) - 2) / 2 * (a ^ 2 * (1 - x ^ 2)) + * ∫ t in (0 : ℝ)..1, t ^ 3 * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 4) / 2) := by + have hnR : (5 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + have hs : (0 : ℝ) < (n : ℝ) - 2 := by linarith + have hr2 : (0 : ℝ) ≤ ((n : ℝ) - 2) / 2 := by linarith + have hr4 : (0 : ℝ) ≤ ((n : ℝ) - 4) / 2 := by linarith + have haxle : a * x ≤ 1 := by nlinarith [sq_nonneg (x - 1), sq_nonneg (x + 1), ha.le] + -- the three continuous integrands + have hc1 : Continuous fun t : ℝ => t * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2) := by + simpa using continuous_pow_mul_QQ (a * x) (a ^ 2) 1 hr2 + have hc2 : Continuous fun t : ℝ => t * (1 - a * x * t) ^ ((n : ℝ) - 2) := + (by fun_prop : Continuous fun t : ℝ => t).mul + ((continuous_rpow_const hs.le).comp (by fun_prop)) + have hc3 : Continuous fun t : ℝ => + ((n : ℝ) - 2) / 2 * (a ^ 2 * (1 - x ^ 2)) + * (t ^ 3 * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 4) / 2)) := + (continuous_pow_mul_QQ (a * x) (a ^ 2) 3 hr4).const_mul _ + -- integrate the pointwise bound + have hstep : (∫ t in (0 : ℝ)..1, t * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2)) + ≤ (∫ t in (0 : ℝ)..1, t * (1 - a * x * t) ^ ((n : ℝ) - 2)) + + ∫ t in (0 : ℝ)..1, ((n : ℝ) - 2) / 2 * (a ^ 2 * (1 - x ^ 2)) + * (t ^ 3 * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 4) / 2)) := by + rw [← intervalIntegral.integral_add (hc2.intervalIntegrable _ _) + (hc3.intervalIntegrable _ _)] + refine intervalIntegral.integral_mono_on (by norm_num) (hc1.intervalIntegrable _ _) + ((hc2.add hc3).intervalIntegrable _ _) ?_ + intro u hu + have h := beta_split hn ha ha1 hx hu.1 hu.2 + have hu0 : (0 : ℝ) ≤ u := hu.1 + nlinarith [h, hu0, Real.rpow_nonneg (QQ_nonneg (by nlinarith [sq_nonneg a] : + (a * x) ^ 2 ≤ a ^ 2) u) (((n : ℝ) - 4) / 2)] + refine hstep.trans ?_ + rw [intervalIntegral.integral_const_mul] + gcongr + -- the chord piece: enlarge to `[0, 1/(ax)]` and evaluate + have hrest : (∫ t in (0 : ℝ)..1, t * (1 - a * x * t) ^ ((n : ℝ) - 2)) + ≤ ∫ t in (0 : ℝ)..1 / (a * x), t * (1 - a * x * t) ^ ((n : ℝ) - 2) := by + have hone : (1 : ℝ) ≤ 1 / (a * x) := by rw [le_div_iff₀ hax]; linarith + have hadd : (∫ t in (0 : ℝ)..1, t * (1 - a * x * t) ^ ((n : ℝ) - 2)) + + (∫ t in (1 : ℝ)..1 / (a * x), t * (1 - a * x * t) ^ ((n : ℝ) - 2)) + = ∫ t in (0 : ℝ)..1 / (a * x), t * (1 - a * x * t) ^ ((n : ℝ) - 2) := + intervalIntegral.integral_add_adjacent_intervals + (hc2.intervalIntegrable _ _) (hc2.intervalIntegrable _ _) + have hnn : (0 : ℝ) ≤ ∫ t in (1 : ℝ)..1 / (a * x), t * (1 - a * x * t) ^ ((n : ℝ) - 2) := by + refine intervalIntegral.integral_nonneg hone ?_ + intro u hu + have : (0 : ℝ) ≤ 1 - a * x * u := by + have := hu.2 + rw [le_div_iff₀ hax] at this + linarith + exact mul_nonneg (by linarith [hu.1]) (Real.rpow_nonneg this _) + linarith + refine hrest.trans_eq ?_ + rw [integral_chord_lin hs hax] + congr 1 + ring + +/-- **`(origin-exact) + (beta-bound) ⟹ (1le)`.** `(beta-bound)` enters only as `β(1) < 1`. -/ +theorem one_le_of_origin (hn : 5 ≤ n) (ha : 0 < a) (ha1 : a < 1) (hx : x ^ 2 ≤ 1) + (hα : α = M n * (1 - a ^ 2) / 2) (hα0 : 0 < α) + (hB1lt : QQ (a * x) (a ^ 2) 1 < 1) + (horigin : 2 * α + a * x ≤ (1 - x ^ 2) / (2 * M n) + + a ^ 2 * n * M n * ∫ t in (0 : ℝ)..1, t * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2)) : + 1 ≤ QQ (a * x) (a ^ 2) 1 / (2 * α * (1 - QQ (a * x) (a ^ 2) 1)) + + QQ (a * x) (a ^ 2) 1 / (4 * α) + + 1 / (2 * M n) + + QQ (a * x) (a ^ 2) 1 / (4 * α * M n) + + (a ^ 2) ^ 2 * n * M n * ((n : ℝ) - 2) * QQ (a * x) (a ^ 2) 1 / (4 * α) + * ∫ t in (0 : ℝ)..1, t ^ 3 * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 4) / 2) := by + have hn2 : 2 ≤ n := by omega + have hnR : (5 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + have hM : (0 : ℝ) < M n := M_pos hn2 + have hMn : M n = (n : ℝ) - 1 := rfl + set B1 : ℝ := QQ (a * x) (a ^ 2) 1 with hB1def + set I3 : ℝ := ∫ t in (0 : ℝ)..1, t ^ 3 * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 4) / 2) with hI3def + -- `1 - β(1) = 2ax - a²`, so `β(1) < 1` gives `ax > 0` + have hB1eq : B1 = 1 - 2 * (a * x) + a ^ 2 := by rw [hB1def, QQ_one] + have hax : 0 < a * x := by nlinarith [sq_nonneg a] + have hxpos : 0 < x := by nlinarith [hax, ha] + -- `x² ≥ 1 - β(1)`, which is `(x-a)² ≥ 0` + have hxsq : 1 - B1 ≤ x ^ 2 := by rw [hB1eq]; nlinarith [sq_nonneg (x - a)] + have hx2pos : (0 : ℝ) < x ^ 2 := by positivity + have hinv : 1 / x ^ 2 ≤ 1 / (1 - B1) := by + apply one_div_le_one_div_of_le (by linarith) hxsq + have hone_sub : 1 - x ^ 2 ≤ B1 := by linarith + -- the integral bound + have hsplit := integral_beta_split hn ha ha1 hx hax + have hI3nn : (0 : ℝ) ≤ I3 := by + rw [hI3def] + refine intervalIntegral.integral_nonneg (by norm_num) ?_ + intro u hu + have hfe : (a * x) ^ 2 ≤ a ^ 2 := by nlinarith [sq_nonneg a] + exact mul_nonneg (pow_nonneg hu.1 3) (Real.rpow_nonneg (QQ_nonneg hfe u) _) + -- multiply the split by `a² n M` and simplify the Beta term to `1/x²` + have hcoef : (0 : ℝ) ≤ a ^ 2 * n * M n := by positivity + have hbeta_simp : a ^ 2 * (n : ℝ) * M n + * (1 / ((a * x) ^ 2 * (((n : ℝ) - 1) * (n : ℝ)))) = 1 / x ^ 2 := by + have hane : (a : ℝ) ≠ 0 := ha.ne' + have hxne : (x : ℝ) ≠ 0 := hxpos.ne' + have hn1 : ((n : ℝ) - 1) ≠ 0 := by linarith + have hn0 : (n : ℝ) ≠ 0 := by linarith + rw [hMn] + field_simp + have hkey : a ^ 2 * n * M n + * (∫ t in (0 : ℝ)..1, t * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 2) / 2)) + ≤ 1 / x ^ 2 + (a ^ 2) ^ 2 * n * M n * ((n : ℝ) - 2) * (1 - x ^ 2) / 2 * I3 := by + refine (mul_le_mul_of_nonneg_left hsplit hcoef).trans_eq ?_ + rw [mul_add, hbeta_simp] + congr 1 + ring + -- assemble + have hax_eq : a * x = 1 - B1 / 2 - α / M n := mul_eq_c hn2 hα + have hmain : 2 * α ≤ B1 / (1 - B1) + B1 / 2 + α / M n + B1 / (2 * M n) + + (a ^ 2) ^ 2 * n * M n * ((n : ℝ) - 2) * B1 / 2 * I3 := by + have hlast : (a ^ 2) ^ 2 * n * M n * ((n : ℝ) - 2) * (1 - x ^ 2) / 2 * I3 + ≤ (a ^ 2) ^ 2 * n * M n * ((n : ℝ) - 2) * B1 / 2 * I3 := by + have hc : (0 : ℝ) ≤ (a ^ 2) ^ 2 * n * M n * ((n : ℝ) - 2) / 2 := by + have : (0 : ℝ) ≤ (n : ℝ) - 2 := by linarith + positivity + nlinarith [mul_nonneg (mul_nonneg hc (sub_nonneg.2 hone_sub)) hI3nn] + have hfirst : (1 - x ^ 2) / (2 * M n) ≤ B1 / (2 * M n) := by + apply div_le_div_of_nonneg_right hone_sub (by positivity) + have hne1 : (1 : ℝ) - B1 ≠ 0 := by linarith + have hrec : 1 / (1 - B1) = 1 + B1 / (1 - B1) := by + field_simp + ring + have hinv' : 1 / x ^ 2 ≤ 1 + B1 / (1 - B1) := by rw [← hrec]; exact hinv + -- do NOT rewrite `hax_eq` into `horigin`: it would also rewrite the `a * x` inside the + -- integral, and the resulting atom would no longer match `hkey` + linarith [horigin, hkey, hinv', hfirst, hlast, hax_eq] + -- divide by `2α` + have h2α : (0 : ℝ) < 2 * α := by linarith + have hne : (1 : ℝ) - B1 ≠ 0 := by linarith + have h1 : 2 * α * (B1 / (2 * α * (1 - B1))) = B1 / (1 - B1) := by + field_simp + have h2 : 2 * α * (B1 / (4 * α)) = B1 / 2 := by + field_simp + ring + have h3 : 2 * α * (1 / (2 * M n)) = α / M n := by + field_simp + have h4 : 2 * α * (B1 / (4 * α * M n)) = B1 / (2 * M n) := by + field_simp + ring + have h5 : 2 * α * ((a ^ 2) ^ 2 * (n : ℝ) * M n * ((n : ℝ) - 2) * B1 / (4 * α) * I3) + = (a ^ 2) ^ 2 * (n : ℝ) * M n * ((n : ℝ) - 2) * B1 / 2 * I3 := by + field_simp + ring + refine le_of_mul_le_mul_left ?_ h2α + rw [mul_one, mul_add, mul_add, mul_add, mul_add, h1, h2, h3, h4, h5] + exact hmain + +end Sendov diff --git a/LeanPool/Sendov/Reduction/Stat.lean b/LeanPool/Sendov/Reduction/Stat.lean new file mode 100644 index 0000000000..c0bc569f4d --- /dev/null +++ b/LeanPool/Sendov/Reduction/Stat.lean @@ -0,0 +1,141 @@ +/- +Copyright (c) 2026 Terence Tao. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Terence Tao +-/ +module + +public import LeanPool.Sendov.Reduction.BetaBound + +/-! +# From `(1le)` to `stat` + +This is `(1le) + (beta-bound) ⟹ stat`. The right-hand side of `(1le)`, + + `β(1)/(2α(1-β(1))) + β(1)/(4α) + 1/(2(n-1)) + β(1)/(4α(n-1))` + `+ a⁴ n(n-1)(n-2) β(1)/(4α) ∫₀¹ t³ β(t)^((n-4)/2) dt`, + +is monotone increasing in `β(1)`, so `(beta-bound)` lets `β(1)` be replaced throughout by +`α/(3+α)`. Under that substitution every term becomes the corresponding term of `Sendov.R`: +`β(1)/(2α(1-β(1)))` becomes `1/6`, `β(1)/(4α)` becomes `1/(4(3+α))`, and `ax`, which is +`1 - β(1)/2 - α/(n-1)`, becomes exactly `Sendov.c n α`. + +Monotonicity of the integral term is the only part that is not immediate. `ax` *decreases* as +`β(1)` grows, and `Sendov.QQ` decreases in its first argument on `[0,1]`, so the integrand +grows — `Sendov.integral_QQ_anti`. Nonnegativity of `β(t)` is needed only at the actual value +`ax`, where it is `(ax)² ≤ a²`, i.e. `x² ≤ 1`; at the substituted value it comes free from the +pointwise comparison, the same way `Sendov.integral_anti` gets it in the batching argument. + +## Main statements + +* `Sendov.mul_eq_c`: `ax = 1 - β(1)/2 - α/(n-1)`, and hence `c n α ≤ ax` under `(beta-bound)`; +* `Sendov.stat_of_one_le`: `(1le) + (beta-bound) ⟹ 1 ≤ R n α`. +-/ + +@[expose] public section + +namespace Sendov + +open MeasureTheory + +variable {n : ℕ} {a x α : ℝ} + +/-- `ax = 1 - β(1)/2 - α/(n-1)`: the blog post's rearrangement of `β(1) = 1 - 2ax + a²`. -/ +lemma mul_eq_c (hn : 2 ≤ n) (hα : α = M n * (1 - a ^ 2) / 2) : + a * x = 1 - QQ (a * x) (a ^ 2) 1 / 2 - α / M n := by + have hM : M n ≠ 0 := (M_pos hn).ne' + simp only [QQ, hα] + field_simp + ring + +/-- Under `(beta-bound)`, `Sendov.c n α ≤ ax`: the substitution only ever lowers `ax`. -/ +lemma c_le_mul (hn : 2 ≤ n) (hα : α = M n * (1 - a ^ 2) / 2) (hα0 : 0 < α) + (hbeta : QQ (a * x) (a ^ 2) 1 ≤ α / (3 + α)) : c n α ≤ a * x := by + rw [mul_eq_c hn hα] + simp only [c] + have h3 : (0 : ℝ) < 3 + α := by linarith + have : α / (2 * (3 + α)) = (α / (3 + α)) / 2 := by field_simp + rw [this] + linarith + +/-- `(beta-bound)` supplies the feasibility constraint `c² ≤ A` that `Sendov.stat_lt_one` +requires. It is `c ≤ ax` squared, together with `x² ≤ 1`: the substitution can only lower +`ax`, and `ax` is already at most `a`. -/ +lemma feasible_of_beta (hn : 2 ≤ n) (hx : x ^ 2 ≤ 1) + (hα : α = M n * (1 - a ^ 2) / 2) (hα0 : 0 < α) + (hbeta : QQ (a * x) (a ^ 2) 1 ≤ α / (3 + α)) : c n α ^ 2 ≤ A n α := by + have hcpos : 0 < c n α := c_pos_of_le_half_M hn hα0.le (alpha_le_half hn hα) + have hcle : c n α ≤ a * x := c_le_mul hn hα hα0 hbeta + rw [A_eq_sq hn hα] + nlinarith [hcpos, hcle, sq_nonneg a, sq_nonneg x] + +/-- **`(1le) + (beta-bound) ⟹ stat`.** -/ +theorem stat_of_one_le (hn : 5 ≤ n) (hx : x ^ 2 ≤ 1) + (hα : α = M n * (1 - a ^ 2) / 2) (hα0 : 0 < α) + (hbeta : QQ (a * x) (a ^ 2) 1 ≤ α / (3 + α)) + (h1le : 1 ≤ QQ (a * x) (a ^ 2) 1 / (2 * α * (1 - QQ (a * x) (a ^ 2) 1)) + + QQ (a * x) (a ^ 2) 1 / (4 * α) + + 1 / (2 * M n) + + QQ (a * x) (a ^ 2) 1 / (4 * α * M n) + + (a ^ 2) ^ 2 * n * M n * ((n : ℝ) - 2) * QQ (a * x) (a ^ 2) 1 / (4 * α) + * ∫ t in (0 : ℝ)..1, t ^ 3 * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 4) / 2)) : + 1 ≤ R n α := by + have hn2 : 2 ≤ n := by omega + have hM : (0 : ℝ) < M n := M_pos hn2 + have h3 : (0 : ℝ) < 3 + α := by linarith + have hA : A n α = a ^ 2 := A_eq_sq hn2 hα + set B1 : ℝ := QQ (a * x) (a ^ 2) 1 with hB1 + -- the standing facts about `β(1)` + have hfeas : (a * x) ^ 2 ≤ a ^ 2 := by nlinarith [sq_nonneg a, sq_nonneg x] + have hB0 : 0 ≤ B1 := QQ_nonneg hfeas 1 + have hkey : B1 * (3 + α) ≤ α := by + rw [← le_div_iff₀ h3]; exact hbeta + have hB1lt : B1 < 1 := by nlinarith [hα0, hB0] + -- the four elementary terms + have t1 : B1 / (2 * α * (1 - B1)) ≤ 1 / 6 := by + rw [div_le_div_iff₀ (by nlinarith) (by norm_num)] + nlinarith [hkey, hB0, hα0] + have t2 : B1 / (4 * α) ≤ 1 / (4 * (3 + α)) := by + rw [div_le_div_iff₀ (by linarith) (by linarith)] + nlinarith [hkey] + have t4 : B1 / (4 * α * M n) ≤ 1 / (4 * M n * (3 + α)) := by + rw [div_le_div_iff₀ (by positivity) (by positivity)] + nlinarith [hkey, hM] + -- the integral term + have hcle : c n α ≤ a * x := c_le_mul hn2 hα hα0 hbeta + have hr : (0 : ℝ) ≤ ((n : ℝ) - 4) / 2 := by + have : (5 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + linarith + have hI : (∫ t in (0 : ℝ)..1, t ^ 3 * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 4) / 2)) + ≤ ∫ t in (0 : ℝ)..1, t ^ 3 * QQ (c n α) (a ^ 2) t ^ (((n : ℝ) - 4) / 2) := + integral_QQ_anti hcle hfeas hr 3 + have hInn : (0 : ℝ) ≤ ∫ t in (0 : ℝ)..1, t ^ 3 * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 4) / 2) := by + refine intervalIntegral.integral_nonneg (by norm_num) ?_ + intro u hu + exact mul_nonneg (pow_nonneg hu.1 3) (Real.rpow_nonneg (QQ_nonneg hfeas u) _) + have hpre : (0 : ℝ) ≤ (a ^ 2) ^ 2 * n * M n * ((n : ℝ) - 2) := by + have : (5 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + have h2 : (0 : ℝ) ≤ (n : ℝ) - 2 := by linarith + positivity + have t5 : (a ^ 2) ^ 2 * n * M n * ((n : ℝ) - 2) * B1 / (4 * α) + * (∫ t in (0 : ℝ)..1, t ^ 3 * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 4) / 2)) + ≤ A n α ^ 2 * n * M n * ((n : ℝ) - 2) / (4 * (3 + α)) + * ∫ t in (0 : ℝ)..1, t ^ 3 * Q n α t ^ (((n : ℝ) - 4) / 2) := by + have hcoef : (a ^ 2) ^ 2 * n * M n * ((n : ℝ) - 2) * B1 / (4 * α) + ≤ A n α ^ 2 * n * M n * ((n : ℝ) - 2) / (4 * (3 + α)) := by + rw [hA, div_le_div_iff₀ (by linarith) (by linarith)] + nlinarith [hkey, hpre] + have hstep1 : (a ^ 2) ^ 2 * n * M n * ((n : ℝ) - 2) * B1 / (4 * α) + * (∫ t in (0 : ℝ)..1, t ^ 3 * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 4) / 2)) + ≤ A n α ^ 2 * n * M n * ((n : ℝ) - 2) / (4 * (3 + α)) + * (∫ t in (0 : ℝ)..1, t ^ 3 * QQ (a * x) (a ^ 2) t ^ (((n : ℝ) - 4) / 2)) := + mul_le_mul_of_nonneg_right hcoef hInn + refine hstep1.trans ?_ + have hcnn : (0 : ℝ) ≤ A n α ^ 2 * n * M n * ((n : ℝ) - 2) / (4 * (3 + α)) := by + rw [hA]; positivity + refine mul_le_mul_of_nonneg_left ?_ hcnn + simpa only [Q_eq_QQ, hA] using hI + rw [R] + linarith + +end Sendov diff --git a/LeanPool/projects.yml b/LeanPool/projects.yml index c3953ae8d7..371adbb64a 100644 --- a/LeanPool/projects.yml +++ b/LeanPool/projects.yml @@ -1,4 +1,123 @@ projects: + - slug: sendov-conjecture + title: Sendov's conjecture and the Phelps–Rodriguez conjecture + summary: >- + Proves Sendov's conjecture in full generality: if every zero of a complex polynomial of + degree at least two lies in the closed unit disk, then every zero has a critical point + within distance one. Also proves the Phelps–Rodriguez strengthening, with strict + inequality unless the zero lies on the unit circle and the polynomial is a scalar + multiple of z^n - a^n, and recovers Rubinstein's boundary theorem. Formalizes Tao's + digestion of Lech Mazur's proof: the problem is reduced to a numerical inequality in the + degree and one real parameter, settled by exact rational Bernstein certificates for + degrees up to one hundred and by an analytic large-degree reduction beyond. Includes the + top case of Maclaurin's inequality and multiset AM–GM, a defect inequality on the closed + unit disk, a sharp bound on log(sinh h / h), kernel-checked polynomial certificate + infrastructure, and a packed-exponentiation bridge for exact moment integrals. + branch: complex analysis + entry_module: LeanPool.Sendov + authors: + - Terence Tao + source: + title: Sendov's conjecture in Lean + url: https://github.com/teorth/sendov/tree/1ddea92d89f951a0a7cbbffa6c267cf7e6640b1d + github_repo: teorth/sendov + commit: 1ddea92d89f951a0a7cbbffa6c267cf7e6640b1d + announcement_url: https://terrytao.wordpress.com/2026/08/12/a-digestion-of-the-proof-of-sendovs-conjecture/ + announced_at: '2026-08-12T23:10:54Z' + mathematical_source: >- + T. Tao, A digestion of the proof of Sendov's conjecture, blog post, 12 August 2026, + digesting Lech Mazur's AI-assisted proof; the boundary case follows Q. Tang and + T. Zhang, arXiv:2508.10341, equation (5.1) and Remark 5.1. + prior_formalization: >- + Lech Mazur's earlier Lean formalization of Sendov's conjecture at ProofAtlas + (https://www.proofatlas.ai/formalizations/sendov-conjecture/), which the upstream + README credits with priority for both the proof and the first formalization. The + present development shares no code with it and additionally states the + Phelps–Rodriguez equality classification. + license: Apache-2.0 + status: verified + provenance: AI + provenance_note: >- + The upstream README states that essentially all Lean source was written by Claude Opus 5 + in Claude Code under the direction and review of Terence Tao, who set the targets, + supplied the informal proof and staged plans, and made the mathematical decisions. + main_declarations: + - Sendov.sendov + - Sendov.phelps_rodriguez + main_results: + - declaration: Sendov.sendov + informal: >- + For every natural number n at least two and every complex polynomial p of degree n + all of whose roots have norm at most one, every root a of p admits a root of the + derivative of p within distance at most one of a. + source_ref: >- + Sendov's conjecture (1962); Tao's blog post of 12 August 2026, Conjecture 1, following + Mazur's proof; upstream Sendov/Conjecture.lean. First publicly announced + 2026-08-12 23:10:54 UTC in that post, with the Lean repository completed the same day. + - declaration: Sendov.phelps_rodriguez + informal: >- + Under the same hypotheses, either some root of the derivative lies at distance + strictly less than one from a, or a has norm one and p equals a nonzero scalar + multiple of X^n - a^n. + source_ref: >- + Phelps–Rodriguez conjecture; Tao's blog post, Conjecture 2; upstream + Sendov/Conjecture.lean. The equality case is Rubinstein's 1968 theorem. + - declaration: Sendov.rubinstein_one + informal: >- + If a polynomial of degree n at least two with all roots in the closed unit disk + vanishes at one, then either its derivative has a root within distance strictly less + than one of the point one, or the polynomial equals its leading coefficient times + X^n - 1. + source_ref: >- + Rubinstein's theorem; Tang–Zhang arXiv:2508.10341, equation (5.1) and Remark 5.1, + run to equality; upstream Sendov/Boundary.lean. + - declaration: Sendov.stat_lt_one + informal: >- + For every degree n at least five and every real parameter alpha between zero and + seventeen satisfying the feasibility constraint c^2 ≤ A, the quantity R n alpha of + the blog post's equation stat is strictly less than one. + source_ref: >- + Equation (stat) of Tao's blog post; degrees five to one hundred by Bernstein + certificates (upstream Sendov/FiniteRange), degrees at least 101 by the analytic + reduction (upstream Sendov/LargeDegree). + - declaration: Multiset.esymm_card_pred_le + informal: >- + For a nonempty multiset of nonnegative reals of cardinality m, the (m-1)-st + elementary symmetric function is at most m times the (m-1)-st power of the mean. + source_ref: Maclaurin's inequality, top case; upstream Sendov/Analytic/Maclaurin.lean. + - declaration: Multiset.prod_le_mean_pow + informal: >- + The product of a multiset of nonnegative reals is at most the mean raised to the + cardinality. + source_ref: Multiset AM–GM inequality; upstream Sendov/Analytic/Maclaurin.lean. + - declaration: Sendov.defect + informal: >- + For a multiset of complex numbers in the closed unit disk, the product of the norms + times the sum of the norms of 1/z minus the conjugate of z is at most one minus the + square of that product. + source_ref: The defect lemma; upstream Sendov/Analytic/Defect.lean. + - declaration: Sendov.log_sinh_div_le + informal: >- + For every positive real h, the logarithm of sinh h divided by h is at most the + square root of h^2 + 9 minus three. + source_ref: Upstream Sendov/Common/Sinh.lean; the crux of the beta-bound step. + - declaration: Sendov.pev_pos_of_bern + informal: >- + If the Bernstein expansion of an integer coefficient list on an interval from zero + to p/q equals p^d times a polynomial P and every Bernstein coefficient is positive, + then P is positive on that interval. + source_ref: >- + Lean Pool port infrastructure replacing the upstream per-certificate ring identities; + LeanPool/Sendov/FiniteRange/Certificate.lean. + tags: + - sendov-conjecture + - polynomial-zeros + - critical-points + - bernstein-certificates + msc: + - 30C15 + - 30C10 + - 12D10 - slug: moving-sofa title: Optimality of Gerver's sofa summary: >- From cd3181ee9476fd344416ef6ec6692131896585e1 Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Thu, 1 Oct 2026 11:37:27 +0000 Subject: [PATCH 2/2] =?UTF-8?q?Add=20the=20Mathlib-only=20statements=20of?= =?UTF-8?q?=20record=20for=20Sendov=20and=20Phelps=E2=80=93Rodriguez?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bridge theorems from upstream Solution.lean, registered on the card. Co-Authored-By: Claude Fable 5.1 --- LeanPool/Sendov/Conjecture.lean | 33 +++++++++++++++++++++++++++++++++ LeanPool/projects.yml | 7 +++++++ 2 files changed, 40 insertions(+) diff --git a/LeanPool/Sendov/Conjecture.lean b/LeanPool/Sendov/Conjecture.lean index 987eb57813..14ec8509a6 100644 --- a/LeanPool/Sendov/Conjecture.lean +++ b/LeanPool/Sendov/Conjecture.lean @@ -171,3 +171,36 @@ theorem sendov {n : ℕ} (hn : 2 ≤ n) {p : ℂ[X]} (hdeg : p.natDegree = n) simp [zero_pow (by omega : n - 1 ≠ 0)] end Sendov + +/-! +## The statements of record + +Upstream states both theorems a second time, in the Mathlib-only form that its comparator +configuration checks: the degree hypothesis is `2 ≤ p.natDegree` rather than a separate `n`, +and the disk hypothesis quantifies over all of `ℂ` rather than over `Polynomial.roots`. Each +is a thin bridge to the theorem above; both differences are bookkeeping only, and the +hypotheses here are the weaker pair, so these conclusions are the stronger claims. +-/ + +namespace SendovConjecture + +open Polynomial + +/-- **Sendov's conjecture**, in the Mathlib-only form of the upstream statement of record: +proved by `Sendov.sendov`. -/ +theorem sendov {p : ℂ[X]} (hdeg : 2 ≤ p.natDegree) + (hzeroes : ∀ w : ℂ, p.eval w = 0 → ‖w‖ ≤ 1) {a : ℂ} (hpa : p.eval a = 0) : + ∃ ζ : ℂ, (derivative p).eval ζ = 0 ∧ ‖ζ - a‖ ≤ 1 := + Sendov.sendov (n := p.natDegree) hdeg rfl (fun w hw => hzeroes w (mem_roots'.1 hw).2) hpa + +/-- **The Phelps–Rodriguez conjecture**, in the Mathlib-only form of the upstream statement +of record: proved by `Sendov.phelps_rodriguez`. -/ +theorem phelps_rodriguez {p : ℂ[X]} (hdeg : 2 ≤ p.natDegree) + (hzeroes : ∀ w : ℂ, p.eval w = 0 → ‖w‖ ≤ 1) {a : ℂ} (hpa : p.eval a = 0) : + (∃ ζ : ℂ, (derivative p).eval ζ = 0 ∧ ‖ζ - a‖ < 1) + ∨ (‖a‖ = 1 ∧ ∃ c : ℂ, c ≠ 0 ∧ + p = C c * (X ^ p.natDegree - C (a ^ p.natDegree))) := + Sendov.phelps_rodriguez (n := p.natDegree) hdeg rfl + (fun w hw => hzeroes w (mem_roots'.1 hw).2) hpa + +end SendovConjecture diff --git a/LeanPool/projects.yml b/LeanPool/projects.yml index 371adbb64a..4e81a2e041 100644 --- a/LeanPool/projects.yml +++ b/LeanPool/projects.yml @@ -62,6 +62,13 @@ projects: source_ref: >- Phelps–Rodriguez conjecture; Tao's blog post, Conjecture 2; upstream Sendov/Conjecture.lean. The equality case is Rubinstein's 1968 theorem. + - declaration: SendovConjecture.sendov + informal: >- + The same statement in the Mathlib-only form of the upstream statement of record: + for every complex polynomial p of degree at least two such that every complex w + with p(w) = 0 has norm at most one, every zero a of p admits a root of the + derivative within distance at most one of a. + source_ref: Upstream Solution.lean, the declaration checked by the upstream comparator setup. - declaration: Sendov.rubinstein_one informal: >- If a polynomial of degree n at least two with all roots in the closed unit disk