From fed5a6159a52d034049da19e54387cb25da793a1 Mon Sep 17 00:00:00 2001 From: "Dr. Murphy" Date: Thu, 24 Sep 2026 11:57:35 -0400 Subject: [PATCH 1/7] rvm_bridge: KWin2 -- kernel-native Weil window positivity PAST the prime-free boundary: L = 2/5, 9/20, 1/2, hypothesis-free, no Arb seam weil_positivity_window_half: every Weil test with support in [-L, L], 2L <= 1, has Re weilForm (autocorr g) >= 0; weil_window_floor_half : WindowFloor (1/2) (7/20000000). The n = 2 prime-comb term is present (2L = 1 > log 2) and accounted exactly. Pole terms KEPT (goal-node test class). Build 8955 jobs, all guard lines standard; skeptic not refuted; lead re-probed axioms. Finite window, NOT RH. conjecture1_proved = False. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01LMeoWeTz2Q3iSeLfqxfYo6 --- .../rvm_bridge/lean/AxiomGuardRvMBridge.lean | 35 + .../rvm_bridge/lean/KWin2_Bridge.lean | 20 + .../rvm_bridge/lean/KWin2_BridgeHeavy.lean | 31 + .../rvm_bridge/lean/KWin2_Cert12E.lean | 17 + .../rvm_bridge/lean/KWin2_Cert12N.lean | 16 + .../rvm_bridge/lean/KWin2_Cert12O.lean | 14 + .../rvm_bridge/lean/KWin2_Cert25.lean | 47 ++ .../rvm_bridge/lean/KWin2_Cert920E.lean | 15 + .../rvm_bridge/lean/KWin2_Cert920N.lean | 15 + .../rvm_bridge/lean/KWin2_Cert920O.lean | 13 + .../rvm_bridge/lean/KWin2_Consts.lean | 112 ++++ .../examples/rvm_bridge/lean/KWin2_Data.lean | 328 ++++++++++ .../rvm_bridge/lean/KWin2_GuardHeavy.lean | 35 + .../examples/rvm_bridge/lean/KWin2_Head.lean | 618 ++++++++++++++++++ .../rvm_bridge/lean/KWin2_Minorant.lean | 490 ++++++++++++++ .../examples/rvm_bridge/lean/KWin2_Par12.lean | 72 ++ .../examples/rvm_bridge/lean/KWin2_Par25.lean | 67 ++ .../rvm_bridge/lean/KWin2_Par920.lean | 70 ++ .../examples/rvm_bridge/lean/KWin2_Round.lean | 122 ++++ .../examples/rvm_bridge/lean/KWin2_Split.lean | 301 +++++++++ .../examples/rvm_bridge/lean/KWin2_Tail.lean | 404 ++++++++++++ .../rvm_bridge/lean/KWin2_Window.lean | 315 +++++++++ .../rvm_bridge/lean/KWin2_Window12.lean | 69 ++ .../rvm_bridge/lean/KWin2_Window25.lean | 316 +++++++++ .../rvm_bridge/lean/KWin2_Window920.lean | 70 ++ .../examples/rvm_bridge/lean/lakefile.toml | 82 ++- 26 files changed, 3693 insertions(+), 1 deletion(-) create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Bridge.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_BridgeHeavy.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Cert12E.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Cert12N.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Cert12O.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Cert25.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Cert920E.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Cert920N.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Cert920O.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Consts.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Data.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_GuardHeavy.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Head.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Minorant.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Par12.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Par25.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Par920.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Round.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Split.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Tail.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Window.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Window12.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Window25.lean create mode 100644 telperion/examples/rvm_bridge/lean/KWin2_Window920.lean diff --git a/telperion/examples/rvm_bridge/lean/AxiomGuardRvMBridge.lean b/telperion/examples/rvm_bridge/lean/AxiomGuardRvMBridge.lean index d5c127c8f..b3166c6ef 100644 --- a/telperion/examples/rvm_bridge/lean/AxiomGuardRvMBridge.lean +++ b/telperion/examples/rvm_bridge/lean/AxiomGuardRvMBridge.lean @@ -234,6 +234,9 @@ import E6Bridge32 import E6Bridge33 import E6Bridge34 import KWin_Bridge +import KWin2_Window25 +import KWin2_Window +import KWin2_Bridge #print axioms RvMBridge.rvm_unbounded_mean_density #print axioms RvMBridge.eventually_Ncount_ge @@ -1219,3 +1222,35 @@ import KWin_Bridge #print axioms kwin_primeFreeWindowArchPositivity #print axioms weil_positivity_prime_free_window #print axioms weil_positivity_window_tenth_of_prime_free + +-- KWin2: the window certificate PAST the prime-free boundary (2026-09-24), parametric in the window; +-- first instance L = 2/5 (2L = 0.8 > log 2: the prime comb term n = 2 is present). Kernel-native, +-- no Arb seam. A finite-window statement, NOT RH; not Connes-Consani (pole terms kept); cf. PR #604. +-- conjecture1_proved = False. +#print axioms KWin2.sym_minorant +#print axioms KWin2.comb_le_combPoly +#print axioms KWin2.wpoly_le_Psi +#print axioms KWin2.head_floor +#print axioms KWin2.Rb_floor +#print axioms KWin2.weilSymbol_eq_two +#print axioms KWin2.Q_ge_Rb +#print axioms KWin2.certE25 +#print axioms KWin2.certO25 +#print axioms KWin2.certE25_negative_control +#print axioms KWin2.log2_near25 +#print axioms KWin2.c2_near25 +#print axioms KWin2.beta0_le_betaStar25 +#print axioms KWin2.symHyp25 +#print axioms KWin2.evenSectorFloor25 +#print axioms KWin2.oddSectorFloor25 +#print axioms KWin2.windowFloor25 +#print axioms KWin2.weil_positivity_window_two_fifths +#print axioms KWin2.weil_positivity_prime_free_window_of_two_fifths +-- KWin2 generic assembly (any window with log 2 < 2L <= log 3) and the rounded PSD checker. +#print axioms KWin2.windowFloor_of_cert +#print axioms KWin2.weil_positivity_of_windowFloor +#print axioms KWin2.headPSD_of_psdCertR +#print axioms KWin2.gamma_le32 +-- KWin2 registry-shape bridge at L = 2/5 (explicit binders, 2L <= 4/5). +#print axioms weil_positivity_window_two_fifths +#print axioms weil_window_floor_two_fifths diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Bridge.lean b/telperion/examples/rvm_bridge/lean/KWin2_Bridge.lean new file mode 100644 index 000000000..b5d663f58 --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Bridge.lean @@ -0,0 +1,20 @@ +/- + KWin2_Bridge.lean -- the window PAST the prime-free boundary at L = 2/5, in the explicit-binder + registry shape of `weil_positivity_prime_free_window` (KWin_Bridge) and as a WeilWindow floor + (rvm_bridge island, 2026-09-24). + 2L = 0.8 > log 2: the prime comb term n = 2 is present and kept exactly on [0, T] by the + kernel-native certificate of KWin2_*. Goal-node test class, pole terms kept: NOT Connes-Consani + (pole-free class, 2L <= log 2). Per PR #604 a finite-window margin samples the zeros and proves + nothing about them. A finite-window Weil positivity statement; conjecture1_proved = False. +-/ +import KWin2_Window25 + +/-- Weil positivity on every window with `2L <= 4/5` (contains the prime-free window). -/ +theorem weil_positivity_window_two_fifths (g : ℝ → ℂ) (hg : WeilExplicit.IsWeilTest g) (L : ℝ) + (hL : 2 * L ≤ 4 / 5) (hsupp : tsupport g ⊆ Set.Icc (-L) L) : + 0 ≤ (WeilExplicit.weilForm (WeilExplicit.autocorr g)).re := + KWin2.weil_positivity_window_two_fifths g hg L (by linarith) hsupp + +/-- Zhu's window floor at `L = 2/5`: `Re weilForm (autocorr f) >= (1/25000) ||f||_2^2`. -/ +theorem weil_window_floor_two_fifths : WeilWindow.WindowFloor (2 / 5) (1 / 25000) := + KWin2.windowFloor25 diff --git a/telperion/examples/rvm_bridge/lean/KWin2_BridgeHeavy.lean b/telperion/examples/rvm_bridge/lean/KWin2_BridgeHeavy.lean new file mode 100644 index 000000000..c9ad95f85 --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_BridgeHeavy.lean @@ -0,0 +1,31 @@ +/- + KWin2_BridgeHeavy.lean -- the windows L = 9/20 and L = 1/2 (past the prime-free boundary, prime + comb term n = 2 present), in the explicit-binder registry shape of + `weil_positivity_prime_free_window` and as WeilWindow floors (rvm_bridge island, 2026-09-24). + HEAVY: imports the L = 9/20 and L = 1/2 head certificates (kernel ~6 min / ~50 min CPU, peak + ~17 GB / ~19 GB), so it is not in defaultTargets; KWin2_GuardHeavy prints its axioms. + Goal-node test class, pole terms kept: NOT Connes-Consani. Per PR #604 a finite-window margin + samples the zeros and proves nothing about them. conjecture1_proved = False. +-/ +import KWin2_Window920 +import KWin2_Window12 + +/-- Weil positivity on every window with `2L <= 9/10`. -/ +theorem weil_positivity_window_nine_twentieths (g : ℝ → ℂ) (hg : WeilExplicit.IsWeilTest g) (L : ℝ) + (hL : 2 * L ≤ 9 / 10) (hsupp : tsupport g ⊆ Set.Icc (-L) L) : + 0 ≤ (WeilExplicit.weilForm (WeilExplicit.autocorr g)).re := + KWin2.weil_positivity_window_nine_twentieths g hg L (by linarith) hsupp + +/-- Zhu's window floor at `L = 9/20`: `Re weilForm (autocorr f) >= 4.5e-6 ||f||_2^2`. -/ +theorem weil_window_floor_nine_twentieths : WeilWindow.WindowFloor (9 / 20) (9 / 2000000) := + KWin2.windowFloor920 + +/-- Weil positivity on every window with `2L <= 1`. -/ +theorem weil_positivity_window_half (g : ℝ → ℂ) (hg : WeilExplicit.IsWeilTest g) (L : ℝ) + (hL : 2 * L ≤ 1) (hsupp : tsupport g ⊆ Set.Icc (-L) L) : + 0 ≤ (WeilExplicit.weilForm (WeilExplicit.autocorr g)).re := + KWin2.weil_positivity_window_half g hg L (by linarith) hsupp + +/-- Zhu's window floor at `L = 1/2`: `Re weilForm (autocorr f) >= 3.5e-7 ||f||_2^2`. -/ +theorem weil_window_floor_half : WeilWindow.WindowFloor (1 / 2) (7 / 20000000) := + KWin2.windowFloor12 diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Cert12E.lean b/telperion/examples/rvm_bridge/lean/KWin2_Cert12E.lean new file mode 100644 index 000000000..3b9ec3ccd --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Cert12E.lean @@ -0,0 +1,17 @@ +/- + KWin2_Cert12E -- the even-sector head certificate at L = 1/2 (kernel evaluation; rvm_bridge + island, 2026-09-24). `decide +kernel`: the kernel rebuilds the comb-bearing symbol minorant on + [0, 40], its moments and the exact 31 x 31 head matrix, floors it at 10^-70, shifts the diagonal + by 31e-70 and runs the exact LDL^T checker (KWin2_Round.psdCertR). conjecture1_proved = False. + No `sorry`. +-/ +import KWin2_Par12 +import KWin2_Round + +namespace KWin2 +open KWin + +/-- The even-sector head certificate at L = 1/2 (N = 31, lam = 4.2e-7, rounding 10^-70). -/ +theorem certE12 : psdCertR (headMat P12 0 31 lamE12) 31 70 = true := by decide +kernel + +end KWin2 diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Cert12N.lean b/telperion/examples/rvm_bridge/lean/KWin2_Cert12N.lean new file mode 100644 index 000000000..4a39f7564 --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Cert12N.lean @@ -0,0 +1,16 @@ +/- + KWin2_Cert12N -- NEGATIVE CONTROL at L = 1/2 (kernel evaluation; rvm_bridge island, 2026-09-24): + at lam = 4.6e-7, above the even head eigenvalue 4.50e-7, the same pipeline (rounded checker at + 10^-70) returns `false` (a pivot of the LDL^T is negative). conjecture1_proved = False. + No `sorry`. +-/ +import KWin2_Par12 +import KWin2_Round + +namespace KWin2 +open KWin + +theorem certE12_negative_control : psdCertR (headMat P12 0 31 (46 / 10 ^ 8)) 31 70 = false := by + decide +kernel + +end KWin2 diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Cert12O.lean b/telperion/examples/rvm_bridge/lean/KWin2_Cert12O.lean new file mode 100644 index 000000000..eab94a696 --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Cert12O.lean @@ -0,0 +1,14 @@ +/- + KWin2_Cert12O -- the odd-sector head certificate at L = 1/2 (kernel evaluation, rounded checker + psdCertR at 10^-70; rvm_bridge island, 2026-09-24). conjecture1_proved = False. No `sorry`. +-/ +import KWin2_Par12 +import KWin2_Round + +namespace KWin2 +open KWin + +/-- The odd-sector head certificate at L = 1/2 (N = 29, lam = 1e-4, rounding 10^-70). -/ +theorem certO12 : psdCertR (headMat P12 1 29 lamO12) 29 70 = true := by decide +kernel + +end KWin2 diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Cert25.lean b/telperion/examples/rvm_bridge/lean/KWin2_Cert25.lean new file mode 100644 index 000000000..10e2a8330 --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Cert25.lean @@ -0,0 +1,47 @@ +/- + KWin2_Cert25 -- the kernel evaluations of the KWin2 checkers at L = 2/5 (rvm_bridge island, + 2026-09-24). + + Every theorem below is `decide +kernel`: the Lean kernel itself reduces the Boolean checker + (exact rational arithmetic, GMP-accelerated `Nat`); no compiled-code evaluation is trusted. The + two head certificates are the expensive ones (about 40 s each): the kernel rebuilds the symbol + minorant WITH the prime comb (the n = 2 term, degree-62 upper polynomial), its moments, the head + matrix and its exact LDL^T factorisation, and verifies A = sum_s d_s v_s v_s^T entrywise. + NEGATIVE CONTROL: at lam = 5e-5, above the even head eigenvalue 4.70e-5, the same pipeline + returns `false` (a pivot of the exact LDL^T is negative), which the kernel also proves. The + rational halves of the real side conditions (log 2 series, sqrt 2 squares, exp Taylor bounds) + are in KWin2_Window25. conjecture1_proved = False. No `sorry`. +-/ +import KWin2_Par25 + +open Finset + +namespace KWin2 +open KWin + +/-! ## A. Structural checks. -/ + +theorem par25 : parCheck P25 = true := by decide +kernel +theorem brk25 : brkCheck P25 = true := by decide +kernel +theorem piece25 : pieceCheck P25 = true := by decide +kernel +theorem min25 : minCheck P25 = true := by decide +kernel +theorem comb25 : combCheck P25 = true := by decide +kernel +theorem tailE25 : tailCond P25 0 16 lamE25 = true := by decide +kernel +theorem tailO25 : tailCond P25 1 14 lamO25 = true := by decide +kernel +theorem ginvE25 : ginvCheck P25 0 16 = true := by decide +kernel +theorem ginvO25 : ginvCheck P25 1 14 = true := by decide +kernel + +/-! ## B. The head certificates. -/ + +/-- The even-sector head certificate (N = 16, lam = 45e-6). -/ +theorem certE25 : psdCert (headMat P25 0 16 lamE25) 16 = true := by decide +kernel + +/-- The odd-sector head certificate (N = 14, lam = 1e-3). -/ +theorem certO25 : psdCert (headMat P25 1 14 lamO25) 14 = true := by decide +kernel + +/-- NEGATIVE CONTROL: the even head matrix at `lam = 5e-5` is NOT certified, so `certE25` is a +statement about the actual margin 4.70e-5 of the comb-bearing form. -/ +theorem certE25_negative_control : psdCert (headMat P25 0 16 (5 / 10 ^ 5)) 16 = false := by + decide +kernel + +end KWin2 diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Cert920E.lean b/telperion/examples/rvm_bridge/lean/KWin2_Cert920E.lean new file mode 100644 index 000000000..c464a3e17 --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Cert920E.lean @@ -0,0 +1,15 @@ +/- + KWin2_Cert920E -- the even-sector head certificate at L = 9/20 (kernel evaluation; rvm_bridge + island, 2026-09-24). `decide +kernel`: the kernel rebuilds the comb-bearing symbol minorant, its + moments, the 22 x 22 head matrix and its exact LDL^T factorisation. conjecture1_proved = False. + No `sorry`. +-/ +import KWin2_Par920 + +namespace KWin2 +open KWin + +/-- The even-sector head certificate at L = 9/20 (N = 22, lam = 5e-6). -/ +theorem certE920 : psdCert (headMat P920 0 22 lamE920) 22 = true := by decide +kernel + +end KWin2 diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Cert920N.lean b/telperion/examples/rvm_bridge/lean/KWin2_Cert920N.lean new file mode 100644 index 000000000..65d703775 --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Cert920N.lean @@ -0,0 +1,15 @@ +/- + KWin2_Cert920N -- NEGATIVE CONTROL at L = 9/20 (kernel evaluation; rvm_bridge island, + 2026-09-24): at lam = 5.2e-6, above the even head eigenvalue 5.18e-6, the same pipeline returns + `false` (a pivot of the exact LDL^T is negative), so certE920 is a statement about the actual + margin of the comb-bearing form, not a vacuous checker. conjecture1_proved = False. No `sorry`. +-/ +import KWin2_Par920 + +namespace KWin2 +open KWin + +theorem certE920_negative_control : psdCert (headMat P920 0 22 (52 / 10 ^ 7)) 22 = false := by + decide +kernel + +end KWin2 diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Cert920O.lean b/telperion/examples/rvm_bridge/lean/KWin2_Cert920O.lean new file mode 100644 index 000000000..716ebd3c5 --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Cert920O.lean @@ -0,0 +1,13 @@ +/- + KWin2_Cert920O -- the odd-sector head certificate at L = 9/20 (kernel evaluation; rvm_bridge + island, 2026-09-24). conjecture1_proved = False. No `sorry`. +-/ +import KWin2_Par920 + +namespace KWin2 +open KWin + +/-- The odd-sector head certificate at L = 9/20 (N = 19, lam = 1e-3). -/ +theorem certO920 : psdCert (headMat P920 1 19 lamO920) 19 = true := by decide +kernel + +end KWin2 diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Consts.lean b/telperion/examples/rvm_bridge/lean/KWin2_Consts.lean new file mode 100644 index 000000000..2dc6084e8 --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Consts.lean @@ -0,0 +1,112 @@ +/- + KWin2_Consts -- shared real constants of the KWin2 window certificates (rvm_bridge island, + 2026-09-24). + + conjecture1_proved = False. (Finite-window Weil positivity is not RH; not Connes-Consani; cf. + PR #604.) + + PROVED HERE: + * log2_near_S: |log 2 - S| <= 2^-60, S = sum_{i < 60} 2^-(i+1)/(i+1) (the kernel-evaluated + partial sum), from Mathlib's `Real.abs_log_sub_add_sum_range_le` at x = 1/2; + * sqrt2_bounds: two 20-digit rationals squeeze sqrt 2 (their squares are kernel-checked); + * gamma_le32: Euler's constant gamma <= a_32 = H_32 - log 32 - 1/64 + 1/12288 (rounded up at + 10^-20), i.e. gamma + 8e-9. KWin's gamma_le stops at a_16 (gamma + 1.3e-7), which is larger + than the margin of the certificates past L = 2/5, so the sharper bound is needed there. Same + route as KWin (a_n antitone for n >= 16, a_n -> gamma), log 2 from log2_near_S. + No `sorry`. +-/ +import KWin_Constants + +open Real Finset Filter Topology + +noncomputable section + +namespace KWin2 +open KWin (emA emA_succ_le tendsto_emA ceilR le_ceilR) + +/-! ## A. log 2. -/ + +/-- The partial sum of `log 2 = sum_{i >= 1} 2^-i / i` (60 terms). -/ +def log2S : ℚ := ∑ i ∈ range 60, (1 / 2 : ℚ) ^ (i + 1) / ((i : ℚ) + 1) + +theorem log2S_ge : (1 / 2) ^ 60 ≤ log2S := by decide +kernel + +lemma log2_near_S : |Real.log 2 - ((log2S : ℚ) : ℝ)| ≤ (1 / 2) ^ 60 := by + have h := Real.abs_log_sub_add_sum_range_le (x := (1 / 2 : ℝ)) (by norm_num) 60 + have e : Real.log (1 - 1 / 2) = -Real.log 2 := by + rw [show (1 : ℝ) - 1 / 2 = 2⁻¹ by norm_num, Real.log_inv] + rw [e] at h + have hS : ((log2S : ℚ) : ℝ) = ∑ i ∈ range 60, (1 / 2 : ℝ) ^ (i + 1) / ((i : ℝ) + 1) := by + unfold log2S; push_cast; rfl + rw [← hS] at h + have hr : |(1 / 2 : ℝ)| ^ (60 + 1) / (1 - |(1 / 2 : ℝ)|) = (1 / 2) ^ 60 := by norm_num + rw [hr] at h + rw [abs_sub_comm] + have e2 : ((log2S : ℚ) : ℝ) + -Real.log 2 = ((log2S : ℚ) : ℝ) - Real.log 2 := by ring + rwa [e2] at h + +/-! ## B. sqrt 2. -/ + +/-- `sqrt 2` squeezed by two 20-digit rationals. -/ +def sq2lo : ℚ := 14142135623730950488 / 10 ^ 19 +def sq2hi : ℚ := 14142135623730950489 / 10 ^ 19 + +theorem sq2lo_sq : sq2lo ^ 2 ≤ 2 := by decide +kernel +theorem sq2hi_sq : 2 ≤ sq2hi ^ 2 := by decide +kernel +theorem sq2lo_pos : 0 < sq2lo := by decide +kernel +theorem sq2hi_nonneg : 0 ≤ sq2hi := by decide +kernel + +lemma sqrt2_bounds : ((sq2lo : ℚ) : ℝ) ≤ Real.sqrt 2 ∧ Real.sqrt 2 ≤ ((sq2hi : ℚ) : ℝ) := by + have hhi0 : (0 : ℝ) ≤ ((sq2hi : ℚ) : ℝ) := by exact_mod_cast sq2hi_nonneg + constructor + · apply Real.le_sqrt_of_sq_le + have := (Rat.cast_le (K := ℝ)).mpr sq2lo_sq + push_cast at this + exact this + · rw [Real.sqrt_le_left hhi0] + have := (Rat.cast_le (K := ℝ)).mpr sq2hi_sq + push_cast at this + exact this + +/-! ## C. Euler's constant at n = 32. -/ + +/-- `H_32`. -/ +def H32 : ℚ := ∑ k ∈ range 32, (1 : ℚ) / (k + 1) + +/-- `a_32 = H_32 - log 32 - 1/64 + 1/12288`, with `log 32 >= 5 (S - 2^-60)`, rounded up. -/ +def gamUp32 : ℚ := ceilR (H32 - 5 * (log2S - (1 / 2) ^ 60) - 1 / 64 + 1 / 12288) 20 + +/-- **`gamma <= gamUp32`** (= gamma + 8e-9). -/ +theorem gamma_le32 : Real.eulerMascheroniConstant ≤ ((gamUp32 : ℚ) : ℝ) := by + have hanti : Antitone (fun m : ℕ => emA (m + 16)) := + antitone_nat_of_succ_le fun m => by + have := emA_succ_le (n := m + 16) (by omega) + simpa [add_assoc, add_comm 1 16, add_left_comm] using this + have hlim : Tendsto (fun m : ℕ => emA (m + 16)) atTop (𝓝 Real.eulerMascheroniConstant) := + tendsto_emA.comp (tendsto_add_atTop_nat 16) + have h32 : Real.eulerMascheroniConstant ≤ emA 32 := by + have := hanti.le_of_tendsto hlim 16 + simpa using this + refine h32.trans ?_ + have hc := le_ceilR (H32 - 5 * (log2S - (1 / 2) ^ 60) - 1 / 64 + 1 / 12288) 20 + have hc' : (((H32 - 5 * (log2S - (1 / 2) ^ 60) - 1 / 64 + 1 / 12288 : ℚ)) : ℝ) + ≤ ((gamUp32 : ℚ) : ℝ) := by exact_mod_cast hc + refine le_trans ?_ hc' + unfold emA + have hlog32 : Real.log ((32 : ℕ) : ℝ) = 5 * Real.log 2 := by + rw [show ((32 : ℕ) : ℝ) = 2 ^ 5 by norm_num, Real.log_pow] + norm_num + have hl2 := (abs_le.mp log2_near_S).1 + have hH : (harmonic 32 : ℝ) = ((H32 : ℚ) : ℝ) := by + unfold harmonic H32 + push_cast + refine Finset.sum_congr rfl fun k _ => ?_ + ring + rw [hlog32, hH] + push_cast + norm_num + linarith + +end KWin2 + +end diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Data.lean b/telperion/examples/rvm_bridge/lean/KWin2_Data.lean new file mode 100644 index 000000000..c890fcf8d --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Data.lean @@ -0,0 +1,328 @@ +/- + KWin2_Data -- the PARAMETRIC exact-rational data layer of the window certificate past the + prime-free boundary (rvm_bridge island, 2026-09-24). + + conjecture1_proved = False. A finite-window Weil positivity statement is NOT RH. Nothing here is + Connes-Consani (their theorem is for the pole-free class; the certificate keeps the pole terms, + i.e. it is the goal node's full class). Cf. PR #604: a finite-window margin is a statement about + a finite window; at these windows it samples the zeros and proves nothing about them. + + WHAT CHANGES AGAINST KWin_Data. KWin certified the prime-free edge 2L = log 2 with every + parameter hard-wired (l = 26/75, T = 20, beta0 = 1.107, the seven pieces of [0, 20], ...). Past + 2L = log 2 the PRIME COMB enters the Weil symbol, + Psi_L(t) = Re psi(1/4 + it/2) - log pi - sum_{log n < 2L} (2 Lambda(n)/sqrt n) cos(t log n), + and the certificate needs a larger frequency cut T (the comb lowers betaStar by its mass). Here + every parameter is a field of `KPar`, so one set of soundness proofs (KWin2_Head / KWin2_Tail) + serves every window; a window is one `KPar` value plus its kernel evaluations. + * the symbol minorant of Psi_0 = Re psi - log pi on the pieces of [0, T] (series floor with + `Nser` terms, `nS` exact Lorentzians by geometric Taylor bounds, the rest by the alternating + bound of order 2 Kalt), exactly KWin's construction with the constants as parameters; + * the COMB is kept pointwise on [0, T]: an upper polynomial for c cos(t a) (c = 2 Lambda(2)/sqrt 2, + a = log 2), from the Taylor polynomial of cos at t a0 (a0, c0 rational with |a - a0| <= da, + |c - c0| <= dc proved in the instance file), coefficients rounded UP (t >= 0), the remainder, + dc and c0 T da absorbed in the constant `combK` (checked by `combCheck`); + * moments of (w_i - comb - beta0) t^q, the pi-scaled head matrix of the monomials (x/l)^(2k+par), + KWin's LDL^T certificate (reused verbatim: KWin.psdCert), and the inverse Gram matrix by the + CLOSED CAUCHY FORMULA (G_jk = l/(x_j + x_k), x_j = j + par/2 + 1/4), checked G G^-1 = I. + Every Boolean checker here is evaluated by the kernel (`decide +kernel`) in the instance files. + No `sorry`. +-/ +import KWin_Data + +open Finset + +namespace KWin2 +open KWin + +/-! ## A. Parameters. -/ + +/-- The parameters of one window certificate (all exact rationals / naturals). -/ +structure KPar where + /-- head half-width `l` (the test support `[-L, L]` must lie inside `[-l, l]`) -/ + ell : ℚ + /-- frequency cut `T` -/ + T : ℚ + /-- envelope floor `beta0 <= betaStar L T` -/ + beta0 : ℚ + /-- `|Psi_L - beta0| <= S0` on `[0, T]` -/ + S0 : ℚ + /-- `cosh (l/2) <= Cp` -/ + Cp : ℚ + /-- the breakpoints `0 = brk 0 < ... < brk nPc = T` -/ + brks : List ℚ + /-- Taylor degrees per (piece, exact Lorentzian) -/ + degTab : List (List ℕ) + /-- number of exact Lorentzians `x_j = j + 1/4`, `j < nS` -/ + nS : ℕ + /-- alternating order: `1/(1+y) <= sum_{k <= 2 Kalt} (-y)^k` -/ + Kalt : ℕ + /-- degree bound of the piece polynomials -/ + Dmax : ℕ + /-- digamma series: explicit terms -/ + Nser : ℕ + /-- digamma series: integral tail cut -/ + Mser : ℕ + /-- `gamma <= gamUp` (proved in the instance file) -/ + gamUp : ℚ + /-- `log pi <= logPiUp` (proved in the instance file) -/ + logPiUp : ℚ + /-- transform Taylor order (head) -/ + Mt : ℕ + /-- pole Taylor order (head) -/ + Mp : ℕ + /-- `|log 2 - a0| <= da` -/ + a0 : ℚ + da : ℚ + /-- `|2 Lambda(2)/sqrt 2 - c0| <= dc` -/ + c0 : ℚ + dc : ℚ + /-- comb Taylor order: `cos y` by its Taylor polynomial of degree `< 2 Mc` -/ + Mc : ℕ + /-- the comb constant (remainder + dc + c0 T da, rounded up) -/ + combK : ℚ + /-- comb coefficient rounding: `t^p` coefficient ceiled at `10^-(Rc + 2p)` -/ + Rc : ℕ + /-- head truncation error constant -/ + Econst : ℚ + /-- the certified window floor -/ + lamFloor : ℚ + +variable (P : KPar) + +/-! ## B. The symbol minorant of Psi_0 (KWin's construction, parametric). -/ + +def nPc : ℕ := P.brks.length - 1 +def brk (i : ℕ) : ℚ := P.brks.getD i P.T +def pcen (i : ℕ) : ℚ := (brk P i + brk P (i + 1)) / 2 +def phw (i : ℕ) : ℚ := (brk P (i + 1) - brk P i) / 2 +def deg (i j : ℕ) : ℕ := (P.degTab.getD i []).getD j 0 + +/-- Shifted coefficients of the exact-Lorentzian upper polynomial on piece `i`. -/ +def uCoef (i k : ℕ) : ℚ := ∑ j ∈ range P.nS, if k ≤ deg P i j then kapR (bS j) (pcen P i) k else 0 + +def rhoRaw (i : ℕ) : ℚ := ∑ j ∈ range P.nS, + (remB (bS j) (pcen P i) (phw P i) (deg P i j) + (∑ k ∈ range (deg P i j + 1), phw P i ^ k) / 10 ^ Rk) +def rhoR (i : ℕ) : ℚ := ceilR (rhoRaw P i) Rk + +/-- `HNr <= H_Nser` (termwise floor at 10^-30). -/ +def HNr : ℚ := (∑ n ∈ range P.Nser, ((10 ^ 30 / (n + 1) : ℕ) : ℚ)) / 10 ^ 30 +def C0 : ℚ := -P.gamUp - P.logPiUp + HNr P + (1 / 4) / ((P.Nser : ℚ) + 5 / 4) + - (1 / 2) * (((P.Nser : ℚ) + (P.Mser : ℚ) + 5 / 4) ^ 2 - ((P.Nser : ℚ) + (P.Mser : ℚ) + 1) ^ 2) + / ((P.Nser : ℚ) + (P.Mser : ℚ) + 1) ^ 2 +def C1 : ℚ := 1 / (8 * ((P.Nser : ℚ) + 5 / 4) ^ 2) - 1 / (8 * ((P.Nser : ℚ) + (P.Mser : ℚ) + 1) ^ 2) +def C2 : ℚ := -1 / (32 * ((P.Nser : ℚ) + 5 / 4) ^ 4) + +/-- An upper bound on `(-1)^k sum_{nS <= j <= Nser} 4^(k+1) / (4 j + 1)^(2k+1)` (termwise ceiling / +floor at `10^-(30+3k)`). -/ +def gAlt (k : ℕ) : ℚ := + if k % 2 = 0 then + (∑ j ∈ Ico P.nS (P.Nser + 1), (((4 ^ (k + 1) * 10 ^ (30 + 3 * k) + (4 * j + 1) ^ (2 * k + 1) - 1) + / (4 * j + 1) ^ (2 * k + 1) : ℕ) : ℚ)) / 10 ^ (30 + 3 * k) + else + -(∑ j ∈ Ico P.nS (P.Nser + 1), ((4 ^ (k + 1) * 10 ^ (30 + 3 * k) / (4 * j + 1) ^ (2 * k + 1) : ℕ) : ℚ)) + / 10 ^ (30 + 3 * k) + +def globRaw (p : ℕ) : ℚ := + (if p = 0 then C0 P else if p = 2 then C1 P else if p = 4 then C2 P else 0) + - (if p % 2 = 0 ∧ p / 2 < 2 * P.Kalt + 1 then gAlt P (p / 2) else 0) +def globC (p : ℕ) : ℚ := floorR (globRaw P p) (30 + 3 * (p / 2)) +def globList : List ℚ := (List.range (P.Dmax + 1)).map (globC P) + +def uList (i : ℕ) : List ℚ := (List.range (P.Dmax + 1)).map (uCoef P i) +/-- Power-basis coefficients of the Psi_0 minorant on piece `i`. -/ +def wpCoef (i p : ℕ) : ℚ := (globList P).getD p 0 + - (∑ k ∈ range (P.Dmax + 1), if p ≤ k then (uList P i).getD k 0 * (k.choose p) * (-pcen P i) ^ (k - p) else 0) + - (if p = 0 then rhoR P i else 0) +def wpList (i : ℕ) : List ℚ := (List.range (P.Dmax + 1)).map (wpCoef P i) + +/-! ## C. The comb upper polynomial. -/ + +/-- Coefficient of `t^p` in the upper polynomial of `c cos(t a)` on `[0, T]`. -/ +def combC (p : ℕ) : ℚ := + (if p % 2 = 0 ∧ p / 2 < P.Mc then + ceilR (P.c0 * (-1) ^ (p / 2) * P.a0 ^ p / (p.factorial : ℚ)) (P.Rc + 2 * p) else 0) + + (if p = 0 then P.combK else 0) +def combList : List ℚ := (List.range (2 * P.Mc + 1)).map (combC P) + +/-! ## D. Moments and the head matrix. -/ + +/-- `int_{brk i}^{brk (i+1)} (w_i t - beta0) t^q dt`. -/ +def momPiece (i q : ℕ) : ℚ := + (∑ p ∈ range (P.Dmax + 1), (wpList P i).getD p 0 + * (brk P (i + 1) ^ (p + q + 1) - brk P i ^ (p + q + 1)) / (p + q + 1)) + - P.beta0 * (brk P (i + 1) ^ (q + 1) - brk P i ^ (q + 1)) / (q + 1) +/-- `int_0^T comb(t) t^q dt`. -/ +def momComb (q : ℕ) : ℚ := + ∑ p ∈ range (2 * P.Mc + 1), (combList P).getD p 0 * P.T ^ (p + q + 1) / (p + q + 1) +/-- `int_0^T (w - comb - beta0) t^q` over the pieces. -/ +def mom (q : ℕ) : ℚ := (∑ i ∈ range (nPc P), momPiece P i q) - momComb P q +def momList (par : ℕ) : List ℚ := (List.range (2 * P.Mt)).map (fun s => mom P (2 * s + 2 * par)) + +/-- Gram matrix of the scaled monomials: `int_{-l}^{l} (x/l)^(2j+par) (x/l)^(2k+par) dx`. -/ +def Gm (par j k : ℕ) : ℚ := 2 * P.ell / (2 * j + 2 * k + 2 * par + 1) +/-- Taylor coefficient matrix of the transforms: `c_m = sum_k Bm par m k a_k`. -/ +def Bm (par m k : ℕ) : ℚ := (-1) ^ m * P.ell ^ (2 * m + par) / ((2 * m + par).factorial : ℚ) * Gm P par m k +/-- The truncated pole functional of `(x/l)^(2k+par)`. -/ +def pv (par k : ℕ) : ℚ := + ∑ m ∈ range P.Mp, (P.ell / 2) ^ (2 * m + par) / ((2 * m + par).factorial : ℚ) * Gm P par m k + +def WBrow (par N m : ℕ) : List ℚ := + (List.range N).map (fun k => ∑ m' ∈ range P.Mt, (momList P par).getD (m + m') 0 * Bm P par m' k) +def WBmat (par N : ℕ) : List (List ℚ) := (List.range P.Mt).map (WBrow P par N) + +def diagc (lam : ℚ) : ℚ := piLoQ * (P.beta0 - lam) - 2 * P.ell * P.Econst + +def headEntry (par N : ℕ) (lam : ℚ) (j k : ℕ) : ℚ := + 2 * piEQ par * epsQ par * pv P par j * pv P par k + diagc P lam * Gm P par j k + + ∑ m ∈ range P.Mt, Bm P par m j * ((WBmat P par N).getD m []).getD k 0 +def headMat (par N : ℕ) (lam : ℚ) : List (List ℚ) := + (List.range N).map (fun j => (List.range N).map (headEntry P par N lam j)) + +/-! ## E. The inverse Gram matrix (closed Cauchy formula). -/ + +/-- The Cauchy nodes: `Gm par j k = l / (cx par j + cx par k)`. -/ +def cx (par j : ℕ) : ℚ := (j : ℚ) + (par : ℚ) / 2 + 1 / 4 + +/-- `(G^-1)_{ij}` by Cauchy's formula (untrusted: re-verified by `ginvCheck`). -/ +def ginvE (par N i j : ℕ) : ℚ := + (∏ k ∈ range N, (cx par j + cx par k)) * (∏ k ∈ range N, (cx par k + cx par i)) + / ((cx par j + cx par i) + * (∏ k ∈ range N, (if k = j then 1 else cx par j - cx par k)) + * (∏ k ∈ range N, (if k = i then 1 else cx par i - cx par k))) + / P.ell + +def ginvM (par N : ℕ) : List (List ℚ) := + (List.range N).map (fun i => (List.range N).map (ginvE P par N i)) + +def ginvCheck (par N : ℕ) : Bool := + (List.range N).all (fun j => (List.range N).all (fun k => + decide ((∑ l ∈ range N, Gm P par j l * mget (ginvM P par N) l k) = if j = k then 1 else 0))) + +/-! ## F. Side conditions. -/ + +/-- The breakpoints start at 0, end at T, and increase. -/ +def brkCheck : Bool := + decide (brk P 0 = 0) && decide (brk P (nPc P) = P.T) && + (List.range (nPc P)).all (fun i => decide (brk P i ≤ brk P (i + 1))) + +def pieceCheck : Bool := + (List.range (nPc P)).all (fun i => (List.range P.nS).all (fun j => + decide (phw P i < smax (bS j) (pcen P i)) && decide (deg P i j ≤ P.Dmax))) + +/-- The comb constant covers the Taylor remainder, `dc` and `c0 T da`. -/ +def combCheck : Bool := + decide (0 ≤ P.c0) && decide (0 ≤ P.a0) && decide (0 ≤ P.da) && decide (0 ≤ P.dc) && + decide (P.a0 * P.T ≤ ((2 * P.Mc + 1 : ℕ) : ℚ) / 2) && + decide (P.c0 * (2 * (P.a0 * P.T) ^ (2 * P.Mc) / ((2 * P.Mc).factorial : ℚ)) + P.dc + P.c0 * P.T * P.da + ≤ P.combK) + +/-- Structural conditions of the minorant construction (series split, alternating and base terms +inside the piece degree). -/ +def minCheck : Bool := + decide (P.nS ≤ P.Nser + 1) && decide (4 * P.Kalt ≤ P.Dmax) && decide (4 ≤ P.Dmax) + +/-- Positivity and size of the basic parameters. -/ +def parCheck : Bool := + decide (0 < P.ell) && decide (P.ell ≤ 2) && decide (0 < P.T) && decide (0 ≤ P.S0) && + decide (0 ≤ P.Cp) && decide (0 ≤ P.Econst) && decide (0 < P.lamFloor) && decide (1 ≤ P.Mp) + +/-- The head truncation error: pole (Mp terms) and transform (Mt terms) remainders. -/ +def Ehead (par : ℕ) : ℚ := + 2 * piHiQ * (2 * (P.ell / 2) ^ (2 * P.Mp + par) / ((2 * P.Mp + par).factorial : ℚ)) + * (2 * P.Cp + 2 * (P.ell / 2) ^ (2 * P.Mp + par) / ((2 * P.Mp + par).factorial : ℚ)) + + P.S0 * (2 * (2 * P.ell ^ (2 * P.Mt + par) * P.T ^ (2 * P.Mt + par + 1) + / ((2 * P.Mt + par + 1) * ((2 * P.Mt + par).factorial : ℚ))) + + 4 * P.ell ^ (2 * (2 * P.Mt + par)) * P.T ^ (2 * (2 * P.Mt + par) + 1) + / ((2 * (2 * P.Mt + par) + 1) * ((2 * P.Mt + par).factorial : ℚ) ^ 2)) + +/-- Tail constants after `N` head modes: pole remainder, `int_0^T eps_N`, `int_0^T eps_N^2`. -/ +def dPT (par N : ℕ) : ℚ := 2 * (P.ell / 2) ^ (2 * N + par) / ((2 * N + par).factorial : ℚ) +def I1T (par N : ℕ) : ℚ := + 2 * P.ell ^ (2 * N + par) * P.T ^ (2 * N + par + 1) / ((2 * N + par + 1) * ((2 * N + par).factorial : ℚ)) +def I2T (par N : ℕ) : ℚ := + 4 * P.ell ^ (2 * (2 * N + par)) * P.T ^ (2 * (2 * N + par) + 1) + / ((2 * (2 * N + par) + 1) * ((2 * N + par).factorial : ℚ) ^ 2) +/-- Coupling constant `|R(h, r)| <= kapT A1(h) A1(r)` (uses `1/pi <= 1/3`). -/ +def kapT (par N : ℕ) : ℚ := 2 * P.Cp * dPT P par N + P.S0 / 3 * I1T P par N +/-- Tail floor `R(r, r) >= dT * int r^2`. -/ +def dT (par N : ℕ) : ℚ := P.beta0 - 2 * P.ell * (2 * dPT P par N ^ 2 + P.S0 / 3 * I2T P par N) + +def tailCond (par N : ℕ) (lam : ℚ) : Bool := + decide (P.lamFloor ≤ lam) && decide (P.lamFloor ≤ dT P par N) && + decide (4 * kapT P par N ^ 2 * P.ell ^ 2 ≤ (lam - P.lamFloor) * (dT P par N - P.lamFloor)) && + decide (Ehead P par ≤ P.Econst) && decide (lam < P.beta0) && + decide (P.T * P.ell ≤ ((2 * N + par + 1 : ℕ) : ℚ) / 2) && + decide (P.T * P.ell ≤ ((2 * P.Mt + par + 1 : ℕ) : ℚ) / 2) && decide (1 ≤ N) + +/-! ## G. The real-valued polynomials. -/ + +/-- The Psi_0 minorant polynomial on piece `i`. -/ +noncomputable def wpoly (i : ℕ) (t : ℝ) : ℝ := + ∑ p ∈ range (P.Dmax + 1), (((wpList P i).getD p 0 : ℚ) : ℝ) * t ^ p + +/-- The comb upper polynomial. -/ +noncomputable def combPoly (t : ℝ) : ℝ := + ∑ p ∈ range (2 * P.Mc + 1), (((combList P).getD p 0 : ℚ) : ℝ) * t ^ p + +/-! ## H. Extraction of the side conditions. -/ + +theorem brkCheck_sound (h : brkCheck P = true) : + brk P 0 = 0 ∧ brk P (nPc P) = P.T ∧ ∀ i < nPc P, brk P i ≤ brk P (i + 1) := by + unfold brkCheck at h + simp only [Bool.and_eq_true, decide_eq_true_eq, List.all_eq_true, List.mem_range] at h + exact ⟨h.1.1, h.1.2, h.2⟩ + +theorem pieceCheck_sound (h : pieceCheck P = true) {i j : ℕ} (hi : i < nPc P) (hj : j < P.nS) : + phw P i < smax (bS j) (pcen P i) ∧ deg P i j ≤ P.Dmax := by + unfold pieceCheck at h + rw [List.all_eq_true] at h + have := h i (List.mem_range.mpr hi) + rw [List.all_eq_true] at this + have h2 := this j (List.mem_range.mpr hj) + rw [Bool.and_eq_true] at h2 + exact ⟨of_decide_eq_true h2.1, of_decide_eq_true h2.2⟩ + +theorem combCheck_sound (h : combCheck P = true) : + 0 ≤ P.c0 ∧ 0 ≤ P.a0 ∧ 0 ≤ P.da ∧ 0 ≤ P.dc ∧ P.a0 * P.T ≤ ((2 * P.Mc + 1 : ℕ) : ℚ) / 2 ∧ + P.c0 * (2 * (P.a0 * P.T) ^ (2 * P.Mc) / ((2 * P.Mc).factorial : ℚ)) + P.dc + P.c0 * P.T * P.da + ≤ P.combK := by + unfold combCheck at h + simp only [Bool.and_eq_true, decide_eq_true_eq] at h + obtain ⟨⟨⟨⟨⟨h1, h2⟩, h3⟩, h4⟩, h5⟩, h6⟩ := h + exact ⟨h1, h2, h3, h4, h5, h6⟩ + +theorem minCheck_sound (h : minCheck P = true) : + P.nS ≤ P.Nser + 1 ∧ 4 * P.Kalt ≤ P.Dmax ∧ 4 ≤ P.Dmax := by + unfold minCheck at h + simp only [Bool.and_eq_true, decide_eq_true_eq] at h + exact ⟨h.1.1, h.1.2, h.2⟩ + +theorem parCheck_sound (h : parCheck P = true) : + 0 < P.ell ∧ P.ell ≤ 2 ∧ 0 < P.T ∧ 0 ≤ P.S0 ∧ 0 ≤ P.Cp ∧ 0 ≤ P.Econst ∧ 0 < P.lamFloor + ∧ 1 ≤ P.Mp := by + unfold parCheck at h + simp only [Bool.and_eq_true, decide_eq_true_eq] at h + obtain ⟨⟨⟨⟨⟨⟨⟨h1, h2⟩, h3⟩, h4⟩, h5⟩, h6⟩, h7⟩, h8⟩ := h + exact ⟨h1, h2, h3, h4, h5, h6, h7, h8⟩ + +theorem ginvCheck_sound {par N : ℕ} (h : ginvCheck P par N = true) {j k : ℕ} (hj : j < N) + (hk : k < N) : + (∑ l ∈ range N, Gm P par j l * mget (ginvM P par N) l k) = if j = k then 1 else 0 := by + unfold ginvCheck at h + rw [List.all_eq_true] at h + have := h j (List.mem_range.mpr hj) + rw [List.all_eq_true] at this + exact of_decide_eq_true (this k (List.mem_range.mpr hk)) + +theorem tailCond_sound {par N : ℕ} {lam : ℚ} (h : tailCond P par N lam = true) : + P.lamFloor ≤ lam ∧ P.lamFloor ≤ dT P par N + ∧ 4 * kapT P par N ^ 2 * P.ell ^ 2 ≤ (lam - P.lamFloor) * (dT P par N - P.lamFloor) + ∧ Ehead P par ≤ P.Econst ∧ lam < P.beta0 + ∧ P.T * P.ell ≤ ((2 * N + par + 1 : ℕ) : ℚ) / 2 + ∧ P.T * P.ell ≤ ((2 * P.Mt + par + 1 : ℕ) : ℚ) / 2 ∧ 1 ≤ N := by + unfold tailCond at h + simp only [Bool.and_eq_true, decide_eq_true_eq] at h + obtain ⟨⟨⟨⟨⟨⟨⟨h1, h2⟩, h3⟩, h4⟩, h5⟩, h6⟩, h7⟩, h8⟩ := h + exact ⟨h1, h2, h3, h4, h5, h6, h7, h8⟩ + +end KWin2 diff --git a/telperion/examples/rvm_bridge/lean/KWin2_GuardHeavy.lean b/telperion/examples/rvm_bridge/lean/KWin2_GuardHeavy.lean new file mode 100644 index 000000000..0e7f5aefd --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_GuardHeavy.lean @@ -0,0 +1,35 @@ +/- + KWin2_GuardHeavy -- the axiom guard of the HEAVY KWin2 window instances (rvm_bridge island, + 2026-09-24). Not in defaultTargets and not imported by AxiomGuardRvMBridge: the head + certificates at L = 9/20 (kernel ~6 min, ~17 GB peak) and L = 1/2 (kernel ~50 min CPU, ~19 GB + peak per sector) exceed the hosted CI runner. Run locally: + lake build KWin2_GuardHeavy && lake env lean KWin2_GuardHeavy.lean + Every line must print exactly [propext, Classical.choice, Quot.sound]. + conjecture1_proved = False. A finite-window statement is not RH; not Connes-Consani (pole terms + kept); cf. PR #604. No `sorry`. +-/ +import KWin2_Window920 +import KWin2_Window12 +import KWin2_BridgeHeavy + +-- L = 9/20 (2L = 0.9, comb n = 2): WindowFloor (9/20) (4.5e-6) +#print axioms KWin2.certE920 +#print axioms KWin2.certO920 +#print axioms KWin2.certE920_negative_control +#print axioms KWin2.side920 +#print axioms KWin2.windowFloor920 +#print axioms KWin2.weil_positivity_window_nine_twentieths + +-- L = 1/2 (2L = 1, comb n = 2): WindowFloor (1/2) (3.5e-7), rounded checker psdCertR +#print axioms KWin2.certE12 +#print axioms KWin2.certO12 +#print axioms KWin2.certE12_negative_control +#print axioms KWin2.side12 +#print axioms KWin2.windowFloor12 +#print axioms KWin2.weil_positivity_window_half + +-- registry-shape bridges (KWin2_BridgeHeavy) +#print axioms weil_positivity_window_nine_twentieths +#print axioms weil_window_floor_nine_twentieths +#print axioms weil_positivity_window_half +#print axioms weil_window_floor_half diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Head.lean b/telperion/examples/rvm_bridge/lean/KWin2_Head.lean new file mode 100644 index 000000000..2f820f633 --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Head.lean @@ -0,0 +1,618 @@ +/- + KWin2_Head -- the head inequality of the window certificate, parametric in the window and ABSTRACT + in the symbol (rvm_bridge island, 2026-09-24). + + conjecture1_proved = False. (Finite-window Weil positivity is not RH; not Connes-Consani, whose + theorem is for the pole-free class; cf. PR #604.) + + THE FORM. For a KPar P, a symbol `sym : ℝ → ℝ`, a sector par (0 even / 1 odd, eps = +1 / -1) and + continuous f, g, + Rb P sym par f g = 2 eps Pl f Pl g + beta0 int_{-l}^{l} f g + + (1/pi) int_0^T (sym(t) - beta0) Tr f t Tr g t dt, + l = P.ell, T = P.T. KWin2_Split shows Q(v) >= Rb P (weilSymbol L) par v v on the window + (sym = the Weil symbol WITH the prime comb). The only facts about `sym` used here are the four + fields of `SymHyp`: continuity, |sym - beta0| <= S0 on [0, T], the piecewise minorant + wpoly_i - combPoly <= sym (KWin2_Minorant supplies it for the Weil symbol), and cosh(l/2) <= Cp. + + PROVED HERE (`head_floor`): for the head polynomials h = sum_{k= sum_{j,k} a_j a_k headEntry_{jk} >= 0 + whenever tailCond evaluates to true and the head matrix is PSD (`HeadPSD`, from the kernel's + exact LDL^T certificate psdCert or the rounded one psdCertR, KWin2_Round). The same + chain as KWin_Head (Taylor truncations with errors <= Econst, exact moments of the minorant, now + including the comb moments int_0^T combPoly t^q). No `sorry`. +-/ +import KWin2_Minorant +import KWin2_Round +import KWin_Head + +open Real Finset MeasureTheory intervalIntegral + +noncomputable section + +namespace KWin2 +open KWin (Tr Pl ip mo A1 phiF poleF continuous_Tr Tr_sub_le Pl_sub_le abs_Tr_le abs_Pl_le A1_nonneg + A1_sq_le continuous_phiF continuous_poleF psdCert psdCert_sound mget mget_map_range getD_map_range + piLoQ piHiQ piEQ epsQ pi_gt_Q pi_lt_Q epsR quad_outer quad_hankel) + +variable (P : KPar) + +/-! ## A. The form. -/ + +def lR : ℝ := ((P.ell : ℚ) : ℝ) +def TR : ℝ := ((P.T : ℚ) : ℝ) +def b0R : ℝ := ((P.beta0 : ℚ) : ℝ) + +lemma lR_pos (hpc : parCheck P = true) : 0 < lR P := by + unfold lR; exact_mod_cast (parCheck_sound P hpc).1 + +lemma lR_half_le (hpc : parCheck P = true) : lR P / 2 ≤ 1 := by + have h : ((P.ell : ℚ) : ℝ) ≤ 2 := by exact_mod_cast (parCheck_sound P hpc).2.1 + unfold lR; linarith + +lemma TR_pos (hpc : parCheck P = true) : 0 < TR P := by + unfold TR; exact_mod_cast (parCheck_sound P hpc).2.2.1 + +lemma S0_nonneg (hpc : parCheck P = true) : (0 : ℝ) ≤ ((P.S0 : ℚ) : ℝ) := by + exact_mod_cast (parCheck_sound P hpc).2.2.2.1 + +lemma Cp_nonneg (hpc : parCheck P = true) : (0 : ℝ) ≤ ((P.Cp : ℚ) : ℝ) := by + exact_mod_cast (parCheck_sound P hpc).2.2.2.2.1 + +lemma Econst_nonneg (hpc : parCheck P = true) : (0 : ℝ) ≤ ((P.Econst : ℚ) : ℝ) := by + exact_mod_cast (parCheck_sound P hpc).2.2.2.2.2.1 + +/-- The split form `R(f, g)` of the Weil form on the window, for the symbol `sym`. -/ +def Rb (sym : ℝ → ℝ) (par : ℕ) (f g : ℝ → ℝ) : ℝ := + 2 * epsR par * Pl (lR P) par f * Pl (lR P) par g + b0R P * ip (lR P) f g + + (1 / Real.pi) * ∫ t in (0 : ℝ)..(TR P), (sym t - b0R P) * (Tr (lR P) par f t * Tr (lR P) par g t) + +/-- The analytic hypotheses on the symbol used by the head and the tail. -/ +structure SymHyp (sym : ℝ → ℝ) : Prop where + cont : Continuous sym + bound : ∀ t, 0 ≤ t → t ≤ TR P → |sym t - b0R P| ≤ ((P.S0 : ℚ) : ℝ) + minor : ∀ i < nPc P, ∀ t, ((brk P i : ℚ) : ℝ) ≤ t → t ≤ ((brk P (i + 1) : ℚ) : ℝ) → + wpoly P i t - combPoly P t ≤ sym t + cosh : Real.cosh (lR P / 2) ≤ ((P.Cp : ℚ) : ℝ) + +/-- The head polynomials. -/ +def hfun (par N : ℕ) (a : ℕ → ℝ) (x : ℝ) : ℝ := ∑ k ∈ range N, a k * (x / lR P) ^ (2 * k + par) + +lemma continuous_hfun (par N : ℕ) (a : ℕ → ℝ) : Continuous (hfun P par N a) := by + unfold hfun; fun_prop + +/-! ## B. Moments of the head polynomials. -/ + +lemma int_pow_div_even (hpc : parCheck P = true) (n : ℕ) : + ∫ x in (-lR P)..(lR P), (x / lR P) ^ (2 * n) = 2 * lR P / (2 * n + 1) := by + have hl := lR_pos P hpc + have h := intervalIntegral.integral_comp_div (a := -lR P) (b := lR P) + (fun x : ℝ => x ^ (2 * n)) hl.ne' + rw [h, integral_pow, smul_eq_mul, neg_div, div_self hl.ne'] + have e : (-1 : ℝ) ^ (2 * n + 1) = -1 := by rw [pow_succ, pow_mul]; norm_num + rw [e] + push_cast + field_simp + ring + +lemma mo_hfun (hpc : parCheck P = true) (par N : ℕ) (a : ℕ → ℝ) (m : ℕ) : + mo (lR P) (hfun P par N a) (2 * m + par) = ∑ k ∈ range N, a k * ((Gm P par k m : ℚ) : ℝ) := by + unfold mo hfun + simp_rw [Finset.sum_mul] + rw [intervalIntegral.integral_finsetSum fun k _ => Continuous.intervalIntegrable (by fun_prop) _ _] + refine Finset.sum_congr rfl fun k _ => ?_ + have e : ∀ x : ℝ, a k * (x / lR P) ^ (2 * k + par) * (x / lR P) ^ (2 * m + par) + = a k * (x / lR P) ^ (2 * (k + m + par)) := by + intro x + rw [mul_assoc, ← pow_add] + congr 2 + ring + simp_rw [e] + rw [intervalIntegral.integral_const_mul, int_pow_div_even P hpc] + unfold Gm lR + push_cast + ring + +lemma ip_hfun_left (par N : ℕ) (a : ℕ → ℝ) {g : ℝ → ℝ} (hg : Continuous g) : + ip (lR P) (hfun P par N a) g = ∑ k ∈ range N, a k * mo (lR P) g (2 * k + par) := by + unfold ip hfun mo + simp_rw [Finset.sum_mul] + rw [intervalIntegral.integral_finsetSum fun k _ => Continuous.intervalIntegrable (by fun_prop) _ _] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [← intervalIntegral.integral_const_mul] + congr 1 + funext x + ring + +lemma Gm_symm (par j k : ℕ) : Gm P par j k = Gm P par k j := by + unfold Gm; ring + +lemma ip_hfun_self (hpc : parCheck P = true) (par N : ℕ) (a : ℕ → ℝ) : + ip (lR P) (hfun P par N a) (hfun P par N a) + = ∑ j ∈ range N, ∑ k ∈ range N, a j * a k * ((Gm P par j k : ℚ) : ℝ) := by + rw [ip_hfun_left P par N a (continuous_hfun P par N a)] + refine Finset.sum_congr rfl fun j _ => ?_ + rw [mo_hfun P hpc, Finset.mul_sum] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [Gm_symm P par k j] + ring + +/-! ## C. The quadratic form of the certified matrix. -/ + +/-- The certified quadratic form, expanded. -/ +lemma quad_headEntry {par N : ℕ} (lam : ℚ) (a : ℕ → ℝ) : + ∑ j ∈ range N, ∑ k ∈ range N, a j * a k * ((headEntry P par N lam j k : ℚ) : ℝ) + = 2 * ((piEQ par : ℚ) : ℝ) * ((epsQ par : ℚ) : ℝ) + * (∑ j ∈ range N, a j * ((pv P par j : ℚ) : ℝ)) ^ 2 + + ((diagc P lam : ℚ) : ℝ) * ∑ j ∈ range N, ∑ k ∈ range N, a j * a k * ((Gm P par j k : ℚ) : ℝ) + + ∑ m ∈ range P.Mt, ∑ m' ∈ range P.Mt, (((momList P par).getD (m + m') 0 : ℚ) : ℝ) + * (∑ j ∈ range N, ((Bm P par m j : ℚ) : ℝ) * a j) + * (∑ k ∈ range N, ((Bm P par m' k : ℚ) : ℝ) * a k) := by + have hentry : ∀ j ∈ range N, ∀ k ∈ range N, ((headEntry P par N lam j k : ℚ) : ℝ) + = 2 * ((piEQ par : ℚ) : ℝ) * ((epsQ par : ℚ) : ℝ) * ((pv P par j : ℚ) : ℝ) * ((pv P par k : ℚ) : ℝ) + + ((diagc P lam : ℚ) : ℝ) * ((Gm P par j k : ℚ) : ℝ) + + ∑ m ∈ range P.Mt, ((Bm P par m j : ℚ) : ℝ) * ∑ m' ∈ range P.Mt, + (((momList P par).getD (m + m') 0 : ℚ) : ℝ) * ((Bm P par m' k : ℚ) : ℝ) := by + intro j _ k hk + unfold headEntry + push_cast + congr 1 + refine Finset.sum_congr rfl fun m hm => ?_ + congr 1 + unfold WBmat + rw [getD_map_range _ _ (Finset.mem_range.mp hm)] + unfold WBrow + rw [getD_map_range _ _ (Finset.mem_range.mp hk)] + push_cast + rfl + rw [Finset.sum_congr rfl fun j hj => Finset.sum_congr rfl fun k hk => by rw [hentry j hj k hk]] + simp only [mul_add, Finset.sum_add_distrib] + rw [quad_outer N a (fun j => ((pv P par j : ℚ) : ℝ)) (2 * ((piEQ par : ℚ) : ℝ) * ((epsQ par : ℚ) : ℝ)), + quad_hankel N P.Mt a (fun m j => ((Bm P par m j : ℚ) : ℝ)) + (fun s => (((momList P par).getD s 0 : ℚ) : ℝ))] + congr 1 + congr 1 + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun j _ => ?_ + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun k _ => ?_ + ring + +/-! ## D. The pole term. -/ + +lemma pole_sq_bound (hpc : parCheck P = true) {par : ℕ} (hpar : par = 0 ∨ par = 1) {Pv Pt A dP : ℝ} + (hA : 0 ≤ A) (hdP : 0 ≤ dP) (h1 : |Pv - Pt| ≤ dP * A) (h2 : |Pv| ≤ ((P.Cp : ℚ) : ℝ) * A) : + 2 * ((piEQ par : ℚ) : ℝ) * ((epsQ par : ℚ) : ℝ) * Pt ^ 2 + - 2 * ((piHiQ : ℚ) : ℝ) * (dP * (2 * ((P.Cp : ℚ) : ℝ) + dP)) * A ^ 2 + ≤ 2 * Real.pi * epsR par * Pv ^ 2 := by + have hlo := pi_gt_Q + have hhi := pi_lt_Q + have hCp := Cp_nonneg P hpc + have hd : |Pv ^ 2 - Pt ^ 2| ≤ dP * (2 * ((P.Cp : ℚ) : ℝ) + dP) * A ^ 2 := by + have hPt : |Pt| ≤ (((P.Cp : ℚ) : ℝ) + dP) * A := by + have := abs_sub_abs_le_abs_sub Pt Pv + rw [abs_sub_comm] at this + nlinarith [abs_nonneg Pv] + rw [sq_sub_sq, abs_mul] + have h3 : |Pv + Pt| ≤ (2 * ((P.Cp : ℚ) : ℝ) + dP) * A := by + refine (abs_add_le _ _).trans ?_ + nlinarith + calc |Pv + Pt| * |Pv - Pt| ≤ ((2 * ((P.Cp : ℚ) : ℝ) + dP) * A) * (dP * A) := + mul_le_mul h3 h1 (abs_nonneg _) (by positivity) + _ = dP * (2 * ((P.Cp : ℚ) : ℝ) + dP) * A ^ 2 := by ring + have hE : 0 ≤ dP * (2 * ((P.Cp : ℚ) : ℝ) + dP) * A ^ 2 := by positivity + rw [abs_le] at hd + have hpi0 : 0 < Real.pi := Real.pi_pos + rcases hpar with h | h <;> subst h + · simp only [piEQ, epsQ, epsR, if_true] + push_cast + have hPt2 : 0 ≤ Pt ^ 2 := sq_nonneg _ + nlinarith + · simp only [piEQ, epsQ, epsR, one_ne_zero, if_false] + push_cast + have hPt2 : 0 ≤ Pt ^ 2 := sq_nonneg _ + nlinarith + +/-! ## E. The transform term. -/ + +/-- The transform-truncation error weight `eps_M(t) = 2 (t l)^n / n!`. -/ +def epsW (n : ℕ) (t : ℝ) : ℝ := 2 * (t * lR P) ^ n / (n.factorial : ℝ) + +lemma continuous_epsW (n : ℕ) : Continuous (epsW P n) := by unfold epsW; fun_prop + +lemma epsW_nonneg (hpc : parCheck P = true) (n : ℕ) {t : ℝ} (ht : 0 ≤ t) : 0 ≤ epsW P n t := by + unfold epsW; have := lR_pos P hpc; positivity + +lemma int_epsW (n : ℕ) : + ∫ t in (0 : ℝ)..(TR P), epsW P n t + = 2 * lR P ^ n * TR P ^ (n + 1) / ((n + 1 : ℝ) * (n.factorial : ℝ)) := by + unfold epsW + have e : (fun t : ℝ => 2 * (t * lR P) ^ n / (n.factorial : ℝ)) + = fun t => (2 * lR P ^ n / (n.factorial : ℝ)) * t ^ n := by + funext t; rw [mul_pow]; ring + rw [e, intervalIntegral.integral_const_mul, integral_pow] + have hf : (0 : ℝ) < (n.factorial : ℝ) := by exact_mod_cast Nat.factorial_pos n + field_simp + ring + +lemma int_epsW_sq (n : ℕ) : + ∫ t in (0 : ℝ)..(TR P), epsW P n t ^ 2 + = 4 * lR P ^ (2 * n) * TR P ^ (2 * n + 1) / ((2 * n + 1 : ℝ) * (n.factorial : ℝ) ^ 2) := by + unfold epsW + have e : (fun t : ℝ => (2 * (t * lR P) ^ n / (n.factorial : ℝ)) ^ 2) + = fun t => (4 * lR P ^ (2 * n) / (n.factorial : ℝ) ^ 2) * t ^ (2 * n) := by + funext t; ring + rw [e, intervalIntegral.integral_const_mul, integral_pow] + have hf : (0 : ℝ) < (n.factorial : ℝ) := by exact_mod_cast Nat.factorial_pos n + push_cast + field_simp + ring + +/-- `int_0^T (sym - beta0) F^2 >= int_0^T (sym - beta0) G^2 - S0 (2 I1 + I2) A^2` when +`|F - G| <= eps_n A` and `|F| <= A` on `[0, T]`. -/ +lemma int_sq_perturb (hpc : parCheck P = true) {sym : ℝ → ℝ} (hs : SymHyp P sym) {F G : ℝ → ℝ} + (hF : Continuous F) (hG : Continuous G) {A : ℝ} (hA : 0 ≤ A) (n : ℕ) + (h1 : ∀ t ∈ Set.Icc (0 : ℝ) (TR P), |F t - G t| ≤ epsW P n t * A) + (h2 : ∀ t ∈ Set.Icc (0 : ℝ) (TR P), |F t| ≤ A) : + (∫ t in (0 : ℝ)..(TR P), (sym t - b0R P) * G t ^ 2) + - ((P.S0 : ℚ) : ℝ) * (2 * (∫ t in (0 : ℝ)..(TR P), epsW P n t) + + ∫ t in (0 : ℝ)..(TR P), epsW P n t ^ 2) * A ^ 2 + ≤ ∫ t in (0 : ℝ)..(TR P), (sym t - b0R P) * F t ^ 2 := by + have hT := (TR_pos P hpc).le + have hS0 := S0_nonneg P hpc + have hsc := hs.cont + have hcP : Continuous fun t => sym t - b0R P := hsc.sub continuous_const + have hpt : ∀ t ∈ Set.Icc (0 : ℝ) (TR P), (sym t - b0R P) * G t ^ 2 + - ((P.S0 : ℚ) : ℝ) * (2 * epsW P n t + epsW P n t ^ 2) * A ^ 2 ≤ (sym t - b0R P) * F t ^ 2 := by + intro t ht + have hS := hs.bound t ht.1 ht.2 + have he := epsW_nonneg P hpc n ht.1 + have hd : |F t ^ 2 - G t ^ 2| ≤ epsW P n t * (2 + epsW P n t) * A ^ 2 := by + rw [sq_sub_sq, abs_mul] + have hFG := h1 t ht + have hFt := h2 t ht + have hsum : |F t + G t| ≤ (2 + epsW P n t) * A := by + have : |G t| ≤ |F t| + |F t - G t| := by + have := abs_sub_abs_le_abs_sub (F t) (G t) + have := abs_sub_abs_le_abs_sub (G t) (F t) + rw [abs_sub_comm (G t)] at this + linarith + refine (abs_add_le _ _).trans ?_ + nlinarith + calc |F t + G t| * |F t - G t| ≤ ((2 + epsW P n t) * A) * (epsW P n t * A) := + mul_le_mul hsum hFG (abs_nonneg _) (by positivity) + _ = epsW P n t * (2 + epsW P n t) * A ^ 2 := by ring + have hprod : |(sym t - b0R P) * (F t ^ 2 - G t ^ 2)| + ≤ ((P.S0 : ℚ) : ℝ) * (epsW P n t * (2 + epsW P n t) * A ^ 2) := by + rw [abs_mul] + exact mul_le_mul hS hd (abs_nonneg _) hS0 + have := neg_abs_le ((sym t - b0R P) * (F t ^ 2 - G t ^ 2)) + nlinarith + have hce := continuous_epsW P n + have hint1 : IntervalIntegrable (fun t => (sym t - b0R P) * G t ^ 2 + - ((P.S0 : ℚ) : ℝ) * (2 * epsW P n t + epsW P n t ^ 2) * A ^ 2) volume 0 (TR P) := + Continuous.intervalIntegrable (by fun_prop) _ _ + have hint2 : IntervalIntegrable (fun t => (sym t - b0R P) * F t ^ 2) volume 0 (TR P) := + Continuous.intervalIntegrable (by fun_prop) _ _ + have hmono := intervalIntegral.integral_mono_on hT hint1 hint2 hpt + rw [intervalIntegral.integral_sub (Continuous.intervalIntegrable (by fun_prop) _ _) + (Continuous.intervalIntegrable (by fun_prop) _ _)] at hmono + have e1 : ∫ t in (0 : ℝ)..(TR P), ((P.S0 : ℚ) : ℝ) * (2 * epsW P n t + epsW P n t ^ 2) * A ^ 2 + = ((P.S0 : ℚ) : ℝ) * (2 * (∫ t in (0 : ℝ)..(TR P), epsW P n t) + + ∫ t in (0 : ℝ)..(TR P), epsW P n t ^ 2) * A ^ 2 := by + rw [intervalIntegral.integral_mul_const, intervalIntegral.integral_const_mul, + intervalIntegral.integral_add (Continuous.intervalIntegrable (by fun_prop) _ _) + (Continuous.intervalIntegrable (by fun_prop) _ _), + intervalIntegral.integral_const_mul] + rw [e1] at hmono + exact hmono + +/-! ## F. The moments of the minorant. -/ + +lemma int_wpoly_mom {i : ℕ} (q : ℕ) : + ∫ t in ((brk P i : ℚ) : ℝ)..((brk P (i + 1) : ℚ) : ℝ), (wpoly P i t - b0R P) * t ^ q + = ((momPiece P i q : ℚ) : ℝ) := by + unfold wpoly momPiece b0R + have e : (fun t : ℝ => (∑ p ∈ range (P.Dmax + 1), (((wpList P i).getD p 0 : ℚ) : ℝ) * t ^ p + - ((P.beta0 : ℚ) : ℝ)) * t ^ q) + = fun t => ∑ p ∈ range (P.Dmax + 1), (((wpList P i).getD p 0 : ℚ) : ℝ) * t ^ (p + q) + - ((P.beta0 : ℚ) : ℝ) * t ^ q := by + funext t + rw [sub_mul, Finset.sum_mul] + congr 1 + refine Finset.sum_congr rfl fun p _ => ?_ + rw [pow_add]; ring + rw [e, intervalIntegral.integral_sub (Continuous.intervalIntegrable (by fun_prop) _ _) + (Continuous.intervalIntegrable (by fun_prop) _ _), + intervalIntegral.integral_finsetSum fun p _ => Continuous.intervalIntegrable (by fun_prop) _ _, + intervalIntegral.integral_const_mul, integral_pow] + push_cast + congr 1 + · refine Finset.sum_congr rfl fun p _ => ?_ + rw [intervalIntegral.integral_const_mul, integral_pow] + push_cast + ring + · ring + +lemma int_comb_mom (q : ℕ) : + ∫ t in (0 : ℝ)..(TR P), combPoly P t * t ^ q = ((momComb P q : ℚ) : ℝ) := by + unfold combPoly momComb TR + have e : (fun t : ℝ => (∑ p ∈ range (2 * P.Mc + 1), (((combList P).getD p 0 : ℚ) : ℝ) * t ^ p) * t ^ q) + = fun t => ∑ p ∈ range (2 * P.Mc + 1), (((combList P).getD p 0 : ℚ) : ℝ) * t ^ (p + q) := by + funext t + rw [Finset.sum_mul] + refine Finset.sum_congr rfl fun p _ => ?_ + rw [pow_add]; ring + rw [e, intervalIntegral.integral_finsetSum fun p _ => Continuous.intervalIntegrable (by fun_prop) _ _] + push_cast + refine Finset.sum_congr rfl fun p _ => ?_ + rw [intervalIntegral.integral_const_mul, integral_pow] + push_cast + ring + +/-- `int_0^T (sym - beta0) (sum_m c_m t^(2m+par))^2 >= sum_{m,m'} W_{m+m'} c_m c_m'`. -/ +theorem moment_floor {sym : ℝ → ℝ} (hs : SymHyp P sym) (hb : brkCheck P = true) (par : ℕ) + (c : ℕ → ℝ) : + ∑ m ∈ range P.Mt, ∑ m' ∈ range P.Mt, (((momList P par).getD (m + m') 0 : ℚ) : ℝ) * c m * c m' + ≤ ∫ t in (0 : ℝ)..(TR P), (sym t - b0R P) * (∑ m ∈ range P.Mt, c m * t ^ (2 * m + par)) ^ 2 := by + set pt : ℝ → ℝ := fun t => ∑ m ∈ range P.Mt, c m * t ^ (2 * m + par) with hpt + have hptc : Continuous pt := by rw [hpt]; fun_prop + show _ ≤ ∫ t in (0 : ℝ)..(TR P), (sym t - b0R P) * pt t ^ 2 + have hsc := hs.cont + obtain ⟨hb0, hbT, _⟩ := brkCheck_sound P hb + have hbrk0 : ((brk P 0 : ℚ) : ℝ) = 0 := by rw [hb0]; simp + have hbrkT : ((brk P (nPc P) : ℚ) : ℝ) = TR P := by rw [hbT]; rfl + have hsplit : ∀ F : ℝ → ℝ, Continuous F → + ∑ i ∈ range (nPc P), ∫ t in ((brk P i : ℚ) : ℝ)..((brk P (i + 1) : ℚ) : ℝ), F t + = ∫ t in (0 : ℝ)..(TR P), F t := by + intro F hF + rw [intervalIntegral.sum_integral_adjacent_intervals (a := fun i => ((brk P i : ℚ) : ℝ)) + fun k _ => hF.intervalIntegrable _ _] + rw [hbrk0, hbrkT] + rw [← hsplit (fun t => (sym t - b0R P) * pt t ^ 2) + ((hsc.sub continuous_const).mul (hptc.pow 2))] + have hcw : ∀ i, Continuous fun t => wpoly P i t - combPoly P t - b0R P := by + intro i; unfold wpoly combPoly; fun_prop + -- on each piece sym >= wpoly - combPoly + have hpiece : ∀ i ∈ range (nPc P), + ∫ t in ((brk P i : ℚ) : ℝ)..((brk P (i + 1) : ℚ) : ℝ), (wpoly P i t - combPoly P t - b0R P) * pt t ^ 2 + ≤ ∫ t in ((brk P i : ℚ) : ℝ)..((brk P (i + 1) : ℚ) : ℝ), (sym t - b0R P) * pt t ^ 2 := by + intro i hi + have hi' := Finset.mem_range.mp hi + have hle : ((brk P i : ℚ) : ℝ) ≤ ((brk P (i + 1) : ℚ) : ℝ) := by exact_mod_cast brk_le_succ P hb hi' + apply intervalIntegral.integral_mono_on hle + · exact Continuous.intervalIntegrable ((hcw i).mul (hptc.pow 2)) _ _ + · exact Continuous.intervalIntegrable ((hsc.sub continuous_const).mul (hptc.pow 2)) _ _ + · intro t ht + exact mul_le_mul_of_nonneg_right (by linarith [hs.minor i hi' t ht.1 ht.2]) (sq_nonneg _) + refine le_trans (le_of_eq ?_) (Finset.sum_le_sum hpiece) + -- split off the comb, which is global + have hsplit2 : ∀ i ∈ range (nPc P), + ∫ t in ((brk P i : ℚ) : ℝ)..((brk P (i + 1) : ℚ) : ℝ), (wpoly P i t - combPoly P t - b0R P) * pt t ^ 2 + = (∫ t in ((brk P i : ℚ) : ℝ)..((brk P (i + 1) : ℚ) : ℝ), (wpoly P i t - b0R P) * pt t ^ 2) + - ∫ t in ((brk P i : ℚ) : ℝ)..((brk P (i + 1) : ℚ) : ℝ), combPoly P t * pt t ^ 2 := by + intro i _ + have hc1 : Continuous fun t => (wpoly P i t - b0R P) * pt t ^ 2 := by + have : Continuous fun t => wpoly P i t - b0R P := by unfold wpoly; fun_prop + exact this.mul (hptc.pow 2) + have hc2 : Continuous fun t => combPoly P t * pt t ^ 2 := by + have : Continuous fun t => combPoly P t := by unfold combPoly; fun_prop + exact this.mul (hptc.pow 2) + rw [← intervalIntegral.integral_sub (hc1.intervalIntegrable _ _) (hc2.intervalIntegrable _ _)] + congr 1; funext t; ring + rw [Finset.sum_congr rfl hsplit2, Finset.sum_sub_distrib] + have hcombc : Continuous fun t => combPoly P t * pt t ^ 2 := by + have : Continuous fun t => combPoly P t := by unfold combPoly; fun_prop + exact this.mul (hptc.pow 2) + rw [hsplit _ hcombc] + -- expand the squares and integrate the monomials + have hexp : ∀ i ∈ range (nPc P), + ∫ t in ((brk P i : ℚ) : ℝ)..((brk P (i + 1) : ℚ) : ℝ), (wpoly P i t - b0R P) * pt t ^ 2 + = ∑ m ∈ range P.Mt, ∑ m' ∈ range P.Mt, + c m * c m' * ((momPiece P i (2 * (m + m') + 2 * par) : ℚ) : ℝ) := by + intro i _ + have e : (fun t : ℝ => (wpoly P i t - b0R P) * pt t ^ 2) + = fun t => ∑ m ∈ range P.Mt, ∑ m' ∈ range P.Mt, + c m * c m' * ((wpoly P i t - b0R P) * t ^ (2 * (m + m') + 2 * par)) := by + funext t + rw [hpt, sq, Finset.sum_mul_sum, Finset.mul_sum] + refine Finset.sum_congr rfl fun m _ => ?_ + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun m' _ => ?_ + have : t ^ (2 * (m + m') + 2 * par) = t ^ (2 * m + par) * t ^ (2 * m' + par) := by + rw [← pow_add]; congr 1; ring + rw [this]; ring + have hcw' : Continuous fun t => wpoly P i t - b0R P := by unfold wpoly; fun_prop + rw [e, intervalIntegral.integral_finsetSum fun m _ => Continuous.intervalIntegrable + (continuous_finsetSum _ fun m' _ => by fun_prop) _ _] + refine Finset.sum_congr rfl fun m _ => ?_ + rw [intervalIntegral.integral_finsetSum fun m' _ => Continuous.intervalIntegrable (by fun_prop) _ _] + refine Finset.sum_congr rfl fun m' _ => ?_ + rw [intervalIntegral.integral_const_mul, int_wpoly_mom] + have hexpc : ∫ t in (0 : ℝ)..(TR P), combPoly P t * pt t ^ 2 + = ∑ m ∈ range P.Mt, ∑ m' ∈ range P.Mt, + c m * c m' * ((momComb P (2 * (m + m') + 2 * par) : ℚ) : ℝ) := by + have e : (fun t : ℝ => combPoly P t * pt t ^ 2) + = fun t => ∑ m ∈ range P.Mt, ∑ m' ∈ range P.Mt, + c m * c m' * (combPoly P t * t ^ (2 * (m + m') + 2 * par)) := by + funext t + rw [hpt, sq, Finset.sum_mul_sum, Finset.mul_sum] + refine Finset.sum_congr rfl fun m _ => ?_ + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun m' _ => ?_ + have : t ^ (2 * (m + m') + 2 * par) = t ^ (2 * m + par) * t ^ (2 * m' + par) := by + rw [← pow_add]; congr 1; ring + rw [this]; ring + have hcc : Continuous fun t => combPoly P t := by unfold combPoly; fun_prop + rw [e, intervalIntegral.integral_finsetSum fun m _ => Continuous.intervalIntegrable + (continuous_finsetSum _ fun m' _ => by fun_prop) _ _] + refine Finset.sum_congr rfl fun m _ => ?_ + rw [intervalIntegral.integral_finsetSum fun m' _ => Continuous.intervalIntegrable (by fun_prop) _ _] + refine Finset.sum_congr rfl fun m' _ => ?_ + rw [intervalIntegral.integral_const_mul, int_comb_mom] + rw [Finset.sum_congr rfl hexp, hexpc] + conv_rhs => rw [Finset.sum_comm] + rw [← Finset.sum_sub_distrib] + refine Finset.sum_congr rfl fun m hm => ?_ + conv_rhs => rw [Finset.sum_comm] + rw [← Finset.sum_sub_distrib] + refine Finset.sum_congr rfl fun m' hm' => ?_ + have hs' : m + m' < 2 * P.Mt := by + have := Finset.mem_range.mp hm; have := Finset.mem_range.mp hm'; omega + unfold momList + rw [getD_map_range _ _ hs'] + unfold mom + push_cast + rw [sub_mul, sub_mul, Finset.sum_mul, Finset.sum_mul] + congr 1 + · refine Finset.sum_congr rfl fun i _ => ?_ + ring + · ring + +/-! ## G. The head floor. -/ + +theorem head_floor {sym : ℝ → ℝ} (hs : SymHyp P sym) (hpc : parCheck P = true) + (hb : brkCheck P = true) {par N : ℕ} (hpar : par = 0 ∨ par = 1) {lam : ℚ} + (htail : tailCond P par N lam = true) (hcert : HeadPSD (headMat P par N lam) N) + (a : ℕ → ℝ) : + (lam : ℝ) * ip (lR P) (hfun P par N a) (hfun P par N a) ≤ Rb P sym par (hfun P par N a) (hfun P par N a) := by + obtain ⟨_, _, _, hE, hlam, _, hM, _⟩ := tailCond_sound P htail + set h := hfun P par N a with hh + have hc : Continuous h := continuous_hfun P par N a + have hl := lR_pos P hpc + set X := ip (lR P) h h with hX + set A := A1 (lR P) h with hA + have hA0 : 0 ≤ A := A1_nonneg hl.le h + have hA2 : A ^ 2 ≤ 2 * lR P * X := by + have := A1_sq_le hl hc + rw [hX] + unfold ip + have e : (fun x => h x ^ 2) = fun x => h x * h x := by funext x; ring + rw [e] at this + exact this + have hX0 : 0 ≤ X := by + rw [hX]; unfold ip + exact intervalIntegral.integral_nonneg (by linarith) fun x _ => mul_self_nonneg _ + -- the pole term + set Pt := ∑ k ∈ range N, a k * ((pv P par k : ℚ) : ℝ) with hPt + set dP : ℝ := 2 * (lR P / 2) ^ (2 * P.Mp + par) / ((2 * P.Mp + par).factorial : ℝ) with hdP + have hdP0 : 0 ≤ dP := by rw [hdP]; positivity + have hPt_eq : ∑ m ∈ range P.Mp, (lR P / 2) ^ (2 * m + par) / ((2 * m + par).factorial : ℝ) + * mo (lR P) h (2 * m + par) = Pt := by + rw [hPt, hh] + simp_rw [mo_hfun P hpc, Finset.mul_sum] + rw [Finset.sum_comm] + refine Finset.sum_congr rfl fun k _ => ?_ + unfold pv + push_cast + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun m _ => ?_ + rw [Gm_symm P par k m] + unfold lR + ring + have hP1 : |Pl (lR P) par h - Pt| ≤ dP * A := by + have hM0 : 0 < 2 * P.Mp + par := by have := (parCheck_sound P hpc).2.2.2.2.2.2.2; omega + have := Pl_sub_le hl (lR_half_le P hpc) hpar (M := P.Mp) hM0 hc + rw [hPt_eq] at this + rw [hdP]; exact this + have hP2 : |Pl (lR P) par h| ≤ ((P.Cp : ℚ) : ℝ) * A := by + have h1 := abs_Pl_le hl par hc + exact h1.trans (mul_le_mul_of_nonneg_right hs.cosh hA0) + have hpole := pole_sq_bound P hpc hpar hA0 hdP0 hP1 hP2 + -- the transform term + set c : ℕ → ℝ := fun m => ∑ k ∈ range N, ((Bm P par m k : ℚ) : ℝ) * a k with hcdef + set pt : ℝ → ℝ := fun t => ∑ m ∈ range P.Mt, c m * t ^ (2 * m + par) with hpt + have hptc : Continuous pt := by rw [hpt]; fun_prop + have hpt_eq : ∀ t, ∑ m ∈ range P.Mt, (-1) ^ m * (t * lR P) ^ (2 * m + par) + / ((2 * m + par).factorial : ℝ) * mo (lR P) h (2 * m + par) = pt t := by + intro t + rw [hpt] + refine Finset.sum_congr rfl fun m _ => ?_ + rw [hcdef, hh, mo_hfun P hpc] + simp only + rw [Finset.mul_sum, Finset.sum_mul] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [Gm_symm P par k m] + unfold Bm + push_cast + rw [mul_pow] + unfold lR + ring + have hT1 : ∀ t ∈ Set.Icc (0 : ℝ) (TR P), |Tr (lR P) par h t - pt t| ≤ epsW P (2 * P.Mt + par) t * A := by + intro t ht + have htl : t * lR P ≤ (2 * P.Mt + par + 1) / 2 := by + have h1 : t * lR P ≤ TR P * lR P := mul_le_mul_of_nonneg_right ht.2 hl.le + have h2 := (Rat.cast_le (K := ℝ)).mpr hM + push_cast at h2 + have e : TR P * lR P = ((P.T : ℚ) : ℝ) * ((P.ell : ℚ) : ℝ) := rfl + linarith + have := Tr_sub_le hl hpar hc ht.1 htl + rw [hpt_eq] at this + unfold epsW + exact this + have hT2 : ∀ t ∈ Set.Icc (0 : ℝ) (TR P), |Tr (lR P) par h t| ≤ A := fun t _ => abs_Tr_le hl par hc t + have hint := int_sq_perturb P hpc hs (continuous_Tr (lR P) par hc) hptc hA0 (2 * P.Mt + par) hT1 hT2 + have hmom := moment_floor P hs hb par c + -- the error constant + have hEle : 2 * ((piHiQ : ℚ) : ℝ) * (dP * (2 * ((P.Cp : ℚ) : ℝ) + dP)) + + ((P.S0 : ℚ) : ℝ) * (2 * (∫ t in (0 : ℝ)..(TR P), epsW P (2 * P.Mt + par) t) + + ∫ t in (0 : ℝ)..(TR P), epsW P (2 * P.Mt + par) t ^ 2) ≤ ((P.Econst : ℚ) : ℝ) := by + rw [int_epsW, int_epsW_sq] + have h1 : ((Ehead P par : ℚ) : ℝ) ≤ ((P.Econst : ℚ) : ℝ) := by exact_mod_cast hE + refine le_trans (le_of_eq ?_) h1 + unfold Ehead + rw [hdP] + unfold lR TR + push_cast + ring + -- the quadratic form + have hquad := quad_headEntry P (par := par) (N := N) lam a + have hGX : ∑ j ∈ range N, ∑ k ∈ range N, a j * a k * ((Gm P par j k : ℚ) : ℝ) = X := by + rw [hX, hh, ip_hfun_self P hpc] + rw [hGX] at hquad + have hWc : ∑ m ∈ range P.Mt, ∑ m' ∈ range P.Mt, (((momList P par).getD (m + m') 0 : ℚ) : ℝ) + * (∑ j ∈ range N, ((Bm P par m j : ℚ) : ℝ) * a j) * (∑ k ∈ range N, ((Bm P par m' k : ℚ) : ℝ) * a k) + = ∑ m ∈ range P.Mt, ∑ m' ∈ range P.Mt, (((momList P par).getD (m + m') 0 : ℚ) : ℝ) * c m * c m' := rfl + rw [hWc] at hquad + have hpsd := hcert a + have hmat : ∑ j ∈ range N, ∑ k ∈ range N, a j * a k * ((mget (headMat P par N lam) j k : ℚ) : ℝ) + = ∑ j ∈ range N, ∑ k ∈ range N, a j * a k * ((headEntry P par N lam j k : ℚ) : ℝ) := by + refine Finset.sum_congr rfl fun j hj => Finset.sum_congr rfl fun k hk => ?_ + unfold headMat + rw [mget_map_range _ (Finset.mem_range.mp hj) (Finset.mem_range.mp hk)] + rw [hmat, hquad] at hpsd + -- assemble + have hpi := Real.pi_pos + have hlo := pi_gt_Q + have hbl : (lam : ℝ) < b0R P := by unfold b0R; exact_mod_cast hlam + have hdiag : ((diagc P lam : ℚ) : ℝ) + = ((piLoQ : ℚ) : ℝ) * (b0R P - lam) - 2 * lR P * ((P.Econst : ℚ) : ℝ) := by + unfold diagc b0R lR; push_cast; ring + rw [hdiag] at hpsd + have hRb : Real.pi * (Rb P sym par h h - (lam : ℝ) * X) + = 2 * Real.pi * epsR par * (Pl (lR P) par h) ^ 2 + Real.pi * (b0R P - lam) * X + + ∫ t in (0 : ℝ)..(TR P), (sym t - b0R P) * (Tr (lR P) par h t) ^ 2 := by + unfold Rb + rw [← hX] + have e : (fun t => (sym t - b0R P) * (Tr (lR P) par h t * Tr (lR P) par h t)) + = fun t => (sym t - b0R P) * (Tr (lR P) par h t) ^ 2 := by funext t; ring + rw [e] + field_simp + ring + have hfin : 0 ≤ Real.pi * (Rb P sym par h h - (lam : ℝ) * X) := by + rw [hRb] + have hEc := Econst_nonneg P hpc + have h1 : ((piLoQ : ℚ) : ℝ) * (b0R P - lam) * X ≤ Real.pi * (b0R P - lam) * X := + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hlo.le (by linarith)) hX0 + have h2 : ((P.S0 : ℚ) : ℝ) * (2 * (∫ t in (0 : ℝ)..(TR P), epsW P (2 * P.Mt + par) t) + + ∫ t in (0 : ℝ)..(TR P), epsW P (2 * P.Mt + par) t ^ 2) * A ^ 2 + + 2 * ((piHiQ : ℚ) : ℝ) * (dP * (2 * ((P.Cp : ℚ) : ℝ) + dP)) * A ^ 2 + ≤ ((P.Econst : ℚ) : ℝ) * (2 * lR P * X) := by + have := mul_le_mul hEle hA2 (sq_nonneg A) hEc + nlinarith + nlinarith + have := (mul_nonneg_iff_of_pos_left hpi).mp hfin + linarith + +end KWin2 + +end diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Minorant.lean b/telperion/examples/rvm_bridge/lean/KWin2_Minorant.lean new file mode 100644 index 000000000..a3300dcd1 --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Minorant.lean @@ -0,0 +1,490 @@ +/- + KWin2_Minorant -- the proved piecewise-polynomial minorant of the Weil symbol WITH the prime comb, + parametric in the window (rvm_bridge island, 2026-09-24). + + conjecture1_proved = False. (Finite-window Weil positivity is not RH; not Connes-Consani, whose + theorem is for the pole-free class; cf. PR #604.) + + STATEMENTS. + * `wpoly_le_Psi`: for every piece i of the KPar P and every t in it, + wpoly P i t <= Psi t = Re psi(1/4 + it/2) - log pi, + KWin's construction (KWin_Minorant) with nS, Kalt, Nser, Mser, Dmax, the pieces and the gamma / + log pi constants as parameters: the island's series floor `psiR_ge_series`, the exact + Lorentzians by the geometric Taylor bound `KWin.Lz_le_kapR`, the rest by the alternating bound. + * `comb_le_combPoly`: for 0 <= t <= T and any real a, c with |a - a0| <= da, |c - c0| <= dc, + c cos(t a) <= combPoly P t, + from |cos x - cos y| <= |x - y|, the Taylor bound `KWin.cos_sub_tayl_le` of cos at t a0, and + coefficients rounded up (t >= 0). The instance file feeds a = log 2, c = 2 Lambda(2)/sqrt 2. + * `sym_minorant`: wpoly P i t - combPoly P t <= Psi t - c cos(t a) on every piece. + No `sorry`. +-/ +import KWin2_Data +import KWin_Minorant +import KWin_Taylor + +open Real Finset + +noncomputable section + +namespace KWin2 +open KWin RvMBridge11 RvMBridge30 + +variable (P : KPar) + +/-! ## A. Reindexing even powers. -/ + +lemma sum_even_reindex {β : Type*} [AddCommMonoid β] (f : ℕ → β) {K D : ℕ} (h : 2 * K ≤ D + 2) : + ∑ p ∈ range (D + 1), (if p % 2 = 0 ∧ p / 2 < K then f p else 0) = ∑ m ∈ range K, f (2 * m) := by + rw [← Finset.sum_filter] + have hs : (range (D + 1)).filter (fun p => p % 2 = 0 ∧ p / 2 < K) + = (range K).image (fun m => 2 * m) := by + ext p + simp only [Finset.mem_filter, Finset.mem_range, Finset.mem_image] + constructor + · rintro ⟨_, h1, h2⟩ + exact ⟨p / 2, h2, by omega⟩ + · rintro ⟨m, hm, rfl⟩ + refine ⟨by omega, by omega, by omega⟩ + rw [hs, Finset.sum_image (fun a _ b _ hab => by omega)] + +/-! ## B. The alternating tail. -/ + +lemma gAlt_ge (k : ℕ) : + (-1) ^ k * ∑ j ∈ Ico P.nS (P.Nser + 1), (4 : ℝ) ^ (k + 1) / (4 * (j : ℝ) + 1) ^ (2 * k + 1) + ≤ ((gAlt P k : ℚ) : ℝ) := by + have hR : (0 : ℝ) < 10 ^ (30 + 3 * k) := by positivity + have hterm : ∀ j : ℕ, (4 : ℝ) ^ (k + 1) / (4 * (j : ℝ) + 1) ^ (2 * k + 1) + = ((4 ^ (k + 1) * 10 ^ (30 + 3 * k) : ℕ) : ℝ) / (((4 * j + 1) ^ (2 * k + 1) : ℕ) : ℝ) + / 10 ^ (30 + 3 * k) := by + intro j + push_cast + field_simp + unfold gAlt + split_ifs with hk + · have hev : (-1 : ℝ) ^ k = 1 := by + rw [← Nat.div_add_mod k 2, hk, add_zero, pow_mul]; norm_num + rw [hev, one_mul] + push_cast + rw [Finset.sum_div] + refine Finset.sum_le_sum fun j _ => ?_ + rw [hterm j] + apply div_le_div_of_nonneg_right _ hR.le + have hpos : 0 < (4 * j + 1) ^ (2 * k + 1) := by positivity + have := nat_div_ceil_ge (4 ^ (k + 1) * 10 ^ (30 + 3 * k)) ((4 * j + 1) ^ (2 * k + 1)) hpos + push_cast at this ⊢ + exact this + · have hodd : (-1 : ℝ) ^ k = -1 := by + have hk1 : k % 2 = 1 := by omega + rw [← Nat.div_add_mod k 2, hk1, pow_add, pow_mul]; norm_num + rw [hodd, neg_one_mul] + push_cast + rw [neg_div, neg_le_neg_iff, Finset.sum_div] + refine Finset.sum_le_sum fun j _ => ?_ + rw [hterm j] + apply div_le_div_of_nonneg_right _ hR.le + exact Nat.cast_div_le + +theorem sum_Lz_large_le (r : ℝ) : + ∑ j ∈ Ico P.nS (P.Nser + 1), Lz ((j : ℝ) + 1 / 4) r + ≤ ∑ k ∈ range (2 * P.Kalt + 1), r ^ (2 * k) * ((gAlt P k : ℚ) : ℝ) := by + calc ∑ j ∈ Ico P.nS (P.Nser + 1), Lz ((j : ℝ) + 1 / 4) r + ≤ ∑ j ∈ Ico P.nS (P.Nser + 1), ∑ k ∈ range (2 * P.Kalt + 1), + r ^ (2 * k) * ((-1) ^ k * (4 ^ (k + 1) / (4 * (j : ℝ) + 1) ^ (2 * k + 1))) := + Finset.sum_le_sum fun j _ => Lz_le_alt j r P.Kalt + _ = ∑ k ∈ range (2 * P.Kalt + 1), r ^ (2 * k) + * ((-1) ^ k * ∑ j ∈ Ico P.nS (P.Nser + 1), (4 : ℝ) ^ (k + 1) / (4 * (j : ℝ) + 1) ^ (2 * k + 1)) := by + rw [Finset.sum_comm] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [Finset.mul_sum, Finset.mul_sum] + _ ≤ ∑ k ∈ range (2 * P.Kalt + 1), r ^ (2 * k) * ((gAlt P k : ℚ) : ℝ) := by + refine Finset.sum_le_sum fun k _ => ?_ + exact mul_le_mul_of_nonneg_left (gAlt_ge P k) (by rw [pow_mul]; exact pow_nonneg (sq_nonneg r) k) + +/-! ## C. The global series floor. -/ + +/-- The global part of the lower bound (constants, integral tail, large Lorentzians). -/ +def globPoly (r : ℝ) : ℝ := + ((C0 P : ℚ) : ℝ) + ((C1 P : ℚ) : ℝ) * r ^ 2 + ((C2 P : ℚ) : ℝ) * r ^ 4 + - ∑ k ∈ range (2 * P.Kalt + 1), r ^ (2 * k) * ((gAlt P k : ℚ) : ℝ) + +lemma HNr_le_Q : HNr P ≤ ∑ n ∈ range P.Nser, (1 : ℚ) / ((n : ℚ) + 1) := by + unfold HNr + rw [Finset.sum_div] + refine Finset.sum_le_sum fun n _ => ?_ + have h1 : (((10 ^ 30 / (n + 1) : ℕ) : ℚ)) ≤ ((10 ^ 30 : ℕ) : ℚ) / ((n + 1 : ℕ) : ℚ) := Nat.cast_div_le + have hA : (0 : ℚ) < 10 ^ 30 := by positivity + rw [div_le_iff₀ hA] + calc (((10 ^ 30 / (n + 1) : ℕ) : ℚ)) ≤ ((10 ^ 30 : ℕ) : ℚ) / ((n + 1 : ℕ) : ℚ) := h1 + _ = 1 / ((n : ℚ) + 1) * 10 ^ 30 := by push_cast; ring + +lemma HNr_le : ((HNr P : ℚ) : ℝ) ≤ ∑ n ∈ range P.Nser, (1 : ℝ) / ((n : ℝ) + 1) := by + have := (Rat.cast_le (K := ℝ)).mpr (HNr_le_Q P) + push_cast at this + exact this + +/-- **The global series floor**: `Psi r >= globPoly r - sum_{j < nS} Lz(j + 1/4, r)` for all `r`. -/ +theorem Psi_ge_glob (hγ : Real.eulerMascheroniConstant ≤ ((P.gamUp : ℚ) : ℝ)) + (hlp : Real.log Real.pi ≤ ((P.logPiUp : ℚ) : ℝ)) (hnS : P.nS ≤ P.Nser + 1) (r : ℝ) : + globPoly P r - ∑ j ∈ range P.nS, Lz ((j : ℝ) + 1 / 4) r ≤ Psi r := by + have hs := psi_series_Lz r P.Nser P.Mser + have hsplit : ∑ j ∈ range (P.Nser + 1), Lz ((j : ℝ) + 1 / 4) r + = ∑ j ∈ range P.nS, Lz ((j : ℝ) + 1 / 4) r + + ∑ j ∈ Ico P.nS (P.Nser + 1), Lz ((j : ℝ) + 1 / 4) r := by + rw [Finset.range_eq_Ico, Finset.range_eq_Ico, + Finset.sum_Ico_consecutive _ (Nat.zero_le P.nS) hnS] + have hlarge := sum_Lz_large_le P r + have hG1 := serG_N_ge P.Nser r + have hG2 := serG_NM_le P.Nser P.Mser r + have hH := HNr_le P + unfold Psi globPoly + have hC0 : ((C0 P : ℚ) : ℝ) = -((P.gamUp : ℚ) : ℝ) - ((P.logPiUp : ℚ) : ℝ) + ((HNr P : ℚ) : ℝ) + + (1 / 4) / ((P.Nser : ℝ) + 5 / 4) + - (1 / 2) * ((((P.Nser : ℝ) + P.Mser + 5 / 4) ^ 2 - ((P.Nser : ℝ) + P.Mser + 1) ^ 2) + / ((P.Nser : ℝ) + P.Mser + 1) ^ 2) := by + unfold C0 + push_cast + ring + have hC1 : ((C1 P : ℚ) : ℝ) = 1 / (8 * ((P.Nser : ℝ) + 5 / 4) ^ 2) + - 1 / (8 * ((P.Nser : ℝ) + P.Mser + 1) ^ 2) := by + unfold C1 + push_cast + ring + have hC2 : ((C2 P : ℚ) : ℝ) = -1 / (32 * ((P.Nser : ℝ) + 5 / 4) ^ 4) := by + unfold C2 + push_cast + ring + rw [hC0, hC1, hC2] + rw [hsplit] at hs + have e1 : r ^ 2 / (8 * ((P.Nser : ℝ) + 5 / 4) ^ 2) = 1 / (8 * ((P.Nser : ℝ) + 5 / 4) ^ 2) * r ^ 2 := by + ring + have e2 : r ^ 4 / (32 * ((P.Nser : ℝ) + 5 / 4) ^ 4) + = -(-1 / (32 * ((P.Nser : ℝ) + 5 / 4) ^ 4) * r ^ 4) := by + ring + have e3 : r ^ 2 / (8 * ((P.Nser : ℝ) + P.Mser + 1) ^ 2) + = 1 / (8 * ((P.Nser : ℝ) + P.Mser + 1) ^ 2) * r ^ 2 := by + ring + rw [e1, e2] at hG1 + rw [e3] at hG2 + linarith + +/-- The global polynomial dominates its rounded kernel coefficients. -/ +theorem globC_poly_le (hD4 : 4 ≤ P.Dmax) (hDK : 4 * P.Kalt ≤ P.Dmax) (r : ℝ) : + ∑ p ∈ range (P.Dmax + 1), ((globC P p : ℚ) : ℝ) * r ^ p ≤ globPoly P r := by + have hle : ∀ p ∈ range (P.Dmax + 1), + ((globC P p : ℚ) : ℝ) * r ^ p ≤ ((globRaw P p : ℚ) : ℝ) * r ^ p := by + intro p _ + rcases Nat.even_or_odd p with ⟨m, hm⟩ | hodd + · have hr : 0 ≤ r ^ p := by rw [hm, ← two_mul, pow_mul]; positivity + exact mul_le_mul_of_nonneg_right (by exact_mod_cast floorR_le _ _) hr + · have h0 : globRaw P p = 0 := by + unfold globRaw + have h1 : p % 2 = 1 := Nat.odd_iff.mp hodd + have hp0 : p ≠ 0 := by omega + have hp2 : p ≠ 2 := by omega + have hp4 : p ≠ 4 := by omega + simp [hp0, hp2, hp4, h1] + have hc : globC P p = 0 := by + unfold globC; rw [h0]; simp [floorR] + rw [hc, h0] + refine (Finset.sum_le_sum hle).trans (le_of_eq ?_) + -- the base part and the alternating part + have hpt : ∀ p, ((globRaw P p : ℚ) : ℝ) * r ^ p + = ((if p = 0 then ((C0 P : ℚ) : ℝ) else 0) + (if p = 2 then ((C1 P : ℚ) : ℝ) * r ^ 2 else 0) + + (if p = 4 then ((C2 P : ℚ) : ℝ) * r ^ 4 else 0)) + - (if p % 2 = 0 ∧ p / 2 < 2 * P.Kalt + 1 then ((gAlt P (p / 2) : ℚ) : ℝ) * r ^ p else 0) := by + intro p + unfold globRaw + by_cases h0 : p = 0 + · subst h0; simp + by_cases h2 : p = 2 + · subst h2; simp; split_ifs <;> push_cast <;> ring + by_cases h4 : p = 4 + · subst h4; simp; split_ifs <;> push_cast <;> ring + simp only [h0, h2, h4, if_false, add_zero, zero_sub, Rat.cast_neg] + split_ifs <;> push_cast <;> ring + simp_rw [hpt] + rw [Finset.sum_sub_distrib, sum_even_reindex _ (by omega : 2 * (2 * P.Kalt + 1) ≤ P.Dmax + 2)] + rw [Finset.sum_add_distrib, Finset.sum_add_distrib, Finset.sum_ite_eq', Finset.sum_ite_eq', + Finset.sum_ite_eq'] + have m0 : 0 ∈ range (P.Dmax + 1) := Finset.mem_range.mpr (by omega) + have m2 : 2 ∈ range (P.Dmax + 1) := Finset.mem_range.mpr (by omega) + have m4 : 4 ∈ range (P.Dmax + 1) := Finset.mem_range.mpr (by omega) + rw [if_pos m0, if_pos m2, if_pos m4] + unfold globPoly + congr 1 + refine Finset.sum_congr rfl fun k _ => ?_ + rw [Nat.mul_div_cancel_left k (by norm_num : 0 < 2)] + ring + +/-! ## D. The shift-to-power identity. -/ + +lemma sum_ite_le_range' {β : Type*} [AddCommMonoid β] (f : ℕ → β) {d D : ℕ} (h : d ≤ D) : + ∑ k ∈ range (D + 1), (if k ≤ d then f k else 0) = ∑ k ∈ range (d + 1), f k := by + rw [← Finset.sum_filter] + congr 1 + ext k + simp only [Finset.mem_filter, Finset.mem_range] + omega + +theorem wpoly_eq {i : ℕ} (r : ℝ) : + wpoly P i r = ∑ p ∈ range (P.Dmax + 1), ((globC P p : ℚ) : ℝ) * r ^ p + - ∑ k ∈ range (P.Dmax + 1), ((uCoef P i k : ℚ) : ℝ) * (r - pcen P i) ^ k - ((rhoR P i : ℚ) : ℝ) := by + unfold wpoly + have hw : ∀ p ∈ range (P.Dmax + 1), (((wpList P i).getD p 0 : ℚ) : ℝ) * r ^ p + = ((globC P p : ℚ) : ℝ) * r ^ p + - ∑ k ∈ range (P.Dmax + 1), (if p ≤ k then ((uCoef P i k : ℚ) : ℝ) * (k.choose p : ℝ) + * (-(pcen P i : ℝ)) ^ (k - p) * r ^ p else 0) + - (if p = 0 then ((rhoR P i : ℚ) : ℝ) else 0) := by + intro p hp + have hp' := Finset.mem_range.mp hp + unfold wpList + rw [getD_map_range _ _ hp'] + unfold wpCoef + rw [globList, getD_map_range _ _ hp'] + push_cast + rw [sub_mul, sub_mul, Finset.sum_mul] + congr 1 + · congr 1 + refine Finset.sum_congr rfl fun k hk => ?_ + split_ifs + · rw [uList, getD_map_range _ _ (Finset.mem_range.mp hk)] + push_cast + ring + · simp + · split_ifs with h0 <;> simp [h0] + rw [Finset.sum_congr rfl hw, Finset.sum_sub_distrib, Finset.sum_sub_distrib] + congr 1 + · congr 1 + rw [Finset.sum_comm] + refine Finset.sum_congr rfl fun k hk => ?_ + have hk' : k ≤ P.Dmax := Nat.lt_succ_iff.mp (Finset.mem_range.mp hk) + have e : ∑ p ∈ range (P.Dmax + 1), (if p ≤ k then ((uCoef P i k : ℚ) : ℝ) * (k.choose p : ℝ) + * (-(pcen P i : ℝ)) ^ (k - p) * r ^ p else 0) + = ∑ p ∈ range (k + 1), ((uCoef P i k : ℚ) : ℝ) * (k.choose p : ℝ) * (-(pcen P i : ℝ)) ^ (k - p) + * r ^ p := sum_ite_le_range' _ hk' + rw [e, sub_eq_add_neg r, add_pow, Finset.mul_sum] + refine Finset.sum_congr rfl fun p _ => ?_ + ring + · rw [Finset.sum_ite_eq' (range (P.Dmax + 1)) 0 (fun _ => ((rhoR P i : ℚ) : ℝ))] + simp + +/-! ## E. The minorant on each piece. -/ + +lemma brk_le_succ (hb : brkCheck P = true) {i : ℕ} (hi : i < nPc P) : brk P i ≤ brk P (i + 1) := + (brkCheck_sound P hb).2.2 i hi + +lemma brk_nonneg (hb : brkCheck P = true) {i : ℕ} (hi : i ≤ nPc P) : 0 ≤ brk P i := by + induction i with + | zero => rw [(brkCheck_sound P hb).1] + | succ n ih => exact (ih (by omega)).trans (brk_le_succ P hb (by omega)) + +theorem sum_Lz_small_le (hb : brkCheck P = true) (hpc : pieceCheck P = true) {i : ℕ} (hi : i < nPc P) + {r : ℝ} (hu : |r - (pcen P i : ℝ)| ≤ (phw P i : ℝ)) : + ∑ j ∈ range P.nS, Lz ((j : ℝ) + 1 / 4) r + ≤ ∑ k ∈ range (P.Dmax + 1), ((uCoef P i k : ℚ) : ℝ) * (r - pcen P i) ^ k + ((rhoR P i : ℚ) : ℝ) := by + have hc : 0 ≤ pcen P i := by + unfold pcen + have := brk_nonneg P hb (i := i) (by omega) + have := brk_nonneg P hb (i := i + 1) (by omega) + linarith + have hh : 0 ≤ phw P i := by unfold phw; have := brk_le_succ P hb hi; linarith + have hj : ∀ j ∈ range P.nS, Lz ((j : ℝ) + 1 / 4) r + ≤ ∑ k ∈ range (P.Dmax + 1), (if k ≤ deg P i j then ((kapR (bS j) (pcen P i) k : ℚ) : ℝ) else 0) + * (r - pcen P i) ^ k + + (((remB (bS j) (pcen P i) (phw P i) (deg P i j) + + (∑ k ∈ range (deg P i j + 1), phw P i ^ k) / 10 ^ Rk : ℚ)) : ℝ) := by + intro j hjm + have hjS := Finset.mem_range.mp hjm + obtain ⟨hlt, hdeg⟩ := pieceCheck_sound P hpc hi hjS + have hb' : (0 : ℚ) < bS j := by unfold bS; positivity + have hL := Lz_le_kapR hb' hc hh hlt hu (deg P i j) + have hx : ((bS j : ℚ) : ℝ) / 2 = (j : ℝ) + 1 / 4 := by unfold bS; push_cast; ring + rw [hx] at hL + have e : ∑ k ∈ range (P.Dmax + 1), (if k ≤ deg P i j then ((kapR (bS j) (pcen P i) k : ℚ) : ℝ) else 0) + * (r - pcen P i) ^ k + = ∑ k ∈ range (deg P i j + 1), ((kapR (bS j) (pcen P i) k : ℚ) : ℝ) * (r - pcen P i) ^ k := by + rw [← sum_ite_le_range' _ hdeg] + refine Finset.sum_congr rfl fun k _ => ?_ + split_ifs <;> simp + rw [e] + push_cast at hL ⊢ + linarith + refine (Finset.sum_le_sum hj).trans ?_ + rw [Finset.sum_add_distrib, Finset.sum_comm] + have hu1 : ∀ k ∈ range (P.Dmax + 1), ∑ j ∈ range P.nS, (if k ≤ deg P i j then + ((kapR (bS j) (pcen P i) k : ℚ) : ℝ) else 0) * (r - pcen P i) ^ k + = ((uCoef P i k : ℚ) : ℝ) * (r - pcen P i) ^ k := by + intro k _ + unfold uCoef + push_cast + rw [Finset.sum_mul] + refine Finset.sum_congr rfl fun j _ => ?_ + split_ifs <;> simp + rw [Finset.sum_congr rfl hu1] + have hrho : ∑ j ∈ range P.nS, (((remB (bS j) (pcen P i) (phw P i) (deg P i j) + + (∑ k ∈ range (deg P i j + 1), phw P i ^ k) / 10 ^ Rk : ℚ)) : ℝ) ≤ ((rhoR P i : ℚ) : ℝ) := by + have h1 := le_ceilR (rhoRaw P i) Rk + have h2 : ((rhoRaw P i : ℚ) : ℝ) ≤ ((rhoR P i : ℚ) : ℝ) := by exact_mod_cast h1 + refine le_trans (le_of_eq ?_) h2 + unfold rhoRaw + push_cast + rfl + linarith + +/-- **The Psi_0 minorant**: on piece `i`, `wpoly P i t <= Psi t`. -/ +theorem wpoly_le_Psi (hb : brkCheck P = true) (hpc : pieceCheck P = true) (hm : minCheck P = true) + (hγ : Real.eulerMascheroniConstant ≤ ((P.gamUp : ℚ) : ℝ)) + (hlp : Real.log Real.pi ≤ ((P.logPiUp : ℚ) : ℝ)) {i : ℕ} (hi : i < nPc P) {t : ℝ} + (ha : ((brk P i : ℚ) : ℝ) ≤ t) (hb' : t ≤ ((brk P (i + 1) : ℚ) : ℝ)) : wpoly P i t ≤ Psi t := by + obtain ⟨hnS, hDK, hD4⟩ := minCheck_sound P hm + have hu : |t - (pcen P i : ℝ)| ≤ (phw P i : ℝ) := by + unfold pcen phw + push_cast + rw [abs_le] + constructor <;> linarith + rw [wpoly_eq] + have h1 := globC_poly_le P hD4 hDK t + have h2 := sum_Lz_small_le P hb hpc hi hu + have h3 := Psi_ge_glob P hγ hlp hnS t + linarith + +/-! ## F. The comb upper polynomial. -/ + +/-- **The comb bound**: `c cos(t a) <= combPoly P t` on `[0, T]`. -/ +theorem comb_le_combPoly (hcc : combCheck P = true) {a c : ℝ} (ha : |a - (P.a0 : ℝ)| ≤ (P.da : ℝ)) + (hc : |c - (P.c0 : ℝ)| ≤ (P.dc : ℝ)) {t : ℝ} (ht0 : 0 ≤ t) (htT : t ≤ (P.T : ℝ)) : + c * Real.cos (t * a) ≤ combPoly P t := by + obtain ⟨hc0, ha0, hda, hdc, hMc, hK⟩ := combCheck_sound P hcc + have hc0R : (0 : ℝ) ≤ (P.c0 : ℝ) := by exact_mod_cast hc0 + have ha0R : (0 : ℝ) ≤ (P.a0 : ℝ) := by exact_mod_cast ha0 + have hdaR : (0 : ℝ) ≤ (P.da : ℝ) := by exact_mod_cast hda + -- step 1: move to (a0, c0) + have h1 : c * Real.cos (t * a) + ≤ (P.c0 : ℝ) * Real.cos (t * P.a0) + (P.dc : ℝ) + (P.c0 : ℝ) * t * (P.da : ℝ) := by + have hcos := Real.abs_cos_sub_cos_le (t * a) (t * P.a0) + have e1 : |t * a - t * (P.a0 : ℝ)| = t * |a - (P.a0 : ℝ)| := by + rw [← mul_sub, abs_mul, abs_of_nonneg ht0] + rw [e1] at hcos + have hc1 : |Real.cos (t * a)| ≤ 1 := Real.abs_cos_le_one _ + have e2 : c * Real.cos (t * a) = (P.c0 : ℝ) * Real.cos (t * P.a0) + (c - P.c0) * Real.cos (t * a) + + (P.c0 : ℝ) * (Real.cos (t * a) - Real.cos (t * P.a0)) := by ring + rw [e2] + have h2 : (c - P.c0) * Real.cos (t * a) ≤ (P.dc : ℝ) := by + calc (c - P.c0) * Real.cos (t * a) ≤ |(c - P.c0) * Real.cos (t * a)| := le_abs_self _ + _ = |c - P.c0| * |Real.cos (t * a)| := abs_mul _ _ + _ ≤ (P.dc : ℝ) * 1 := mul_le_mul hc hc1 (abs_nonneg _) (by exact_mod_cast hdc) + _ = (P.dc : ℝ) := mul_one _ + have h4 : |Real.cos (t * a) - Real.cos (t * P.a0)| ≤ t * (P.da : ℝ) := + hcos.trans (mul_le_mul_of_nonneg_left ha ht0) + have h3 : (P.c0 : ℝ) * (Real.cos (t * a) - Real.cos (t * P.a0)) ≤ (P.c0 : ℝ) * t * (P.da : ℝ) := by + have := le_abs_self (Real.cos (t * a) - Real.cos (t * P.a0)) + have := mul_le_mul_of_nonneg_left (this.trans h4) hc0R + linarith + linarith + -- step 2: the Taylor bound of cos at t a0 + have hy0 : 0 ≤ t * (P.a0 : ℝ) := mul_nonneg ht0 ha0R + have hyT : t * (P.a0 : ℝ) ≤ (P.a0 : ℝ) * (P.T : ℝ) := by nlinarith + have hMcR : (P.a0 : ℝ) * (P.T : ℝ) ≤ (2 * P.Mc + 1) / 2 := by + have := (Rat.cast_le (K := ℝ)).mpr hMc + push_cast at this + exact this + have hy : |t * (P.a0 : ℝ)| ≤ (2 * P.Mc + 1) / 2 := by + rw [abs_of_nonneg hy0]; linarith + have htay := cos_sub_tayl_le hy + have hpowle : |t * (P.a0 : ℝ)| ^ (2 * P.Mc) ≤ ((P.a0 : ℝ) * (P.T : ℝ)) ^ (2 * P.Mc) := by + rw [abs_of_nonneg hy0] + exact pow_le_pow_left₀ hy0 hyT _ + have hfac : (0 : ℝ) < ((2 * P.Mc).factorial : ℝ) := by exact_mod_cast Nat.factorial_pos _ + have hrem : Real.cos (t * P.a0) ≤ tayl 0 P.Mc (t * P.a0) + + 2 * ((P.a0 : ℝ) * (P.T : ℝ)) ^ (2 * P.Mc) / ((2 * P.Mc).factorial : ℝ) := by + have := (abs_le.mp htay).2 + have h5 : 2 * |t * (P.a0 : ℝ)| ^ (2 * P.Mc) / ((2 * P.Mc).factorial : ℝ) + ≤ 2 * ((P.a0 : ℝ) * (P.T : ℝ)) ^ (2 * P.Mc) / ((2 * P.Mc).factorial : ℝ) := by + rw [div_le_div_iff_of_pos_right hfac] + linarith + linarith + -- step 3: the rounded coefficients + have hKR : (P.c0 : ℝ) * (2 * ((P.a0 : ℝ) * (P.T : ℝ)) ^ (2 * P.Mc) / ((2 * P.Mc).factorial : ℝ)) + + (P.dc : ℝ) + (P.c0 : ℝ) * (P.T : ℝ) * (P.da : ℝ) ≤ (P.combK : ℝ) := by + have := (Rat.cast_le (K := ℝ)).mpr hK + push_cast at this + exact this + have htaylsum : (P.c0 : ℝ) * tayl 0 P.Mc (t * P.a0) + ≤ ∑ m ∈ range P.Mc, ((ceilR (P.c0 * (-1) ^ m * P.a0 ^ (2 * m) / ((2 * m).factorial : ℚ)) + (P.Rc + 2 * (2 * m)) : ℚ) : ℝ) * t ^ (2 * m) := by + unfold tayl + rw [Finset.mul_sum] + refine Finset.sum_le_sum fun m _ => ?_ + have hr := le_ceilR (P.c0 * (-1) ^ m * P.a0 ^ (2 * m) / ((2 * m).factorial : ℚ)) (P.Rc + 2 * (2 * m)) + have hr' : ((P.c0 * (-1) ^ m * P.a0 ^ (2 * m) / ((2 * m).factorial : ℚ) : ℚ) : ℝ) + ≤ ((ceilR (P.c0 * (-1) ^ m * P.a0 ^ (2 * m) / ((2 * m).factorial : ℚ)) (P.Rc + 2 * (2 * m)) : ℚ) : ℝ) := by + exact_mod_cast hr + have ht2 : 0 ≤ t ^ (2 * m) := by rw [pow_mul]; positivity + have e : (P.c0 : ℝ) * ((-1) ^ m * (t * P.a0) ^ (2 * m + 0) / ((2 * m + 0).factorial : ℝ)) + = ((P.c0 * (-1) ^ m * P.a0 ^ (2 * m) / ((2 * m).factorial : ℚ) : ℚ) : ℝ) * t ^ (2 * m) := by + push_cast + rw [add_zero, mul_pow] + ring + rw [e] + exact mul_le_mul_of_nonneg_right hr' ht2 + have hpoly : combPoly P t = ∑ m ∈ range P.Mc, ((ceilR (P.c0 * (-1) ^ m * P.a0 ^ (2 * m) + / ((2 * m).factorial : ℚ)) (P.Rc + 2 * (2 * m)) : ℚ) : ℝ) * t ^ (2 * m) + (P.combK : ℝ) := by + unfold combPoly + have hpt : ∀ p ∈ range (2 * P.Mc + 1), (((combList P).getD p 0 : ℚ) : ℝ) * t ^ p + = (if p % 2 = 0 ∧ p / 2 < P.Mc then ((ceilR (P.c0 * (-1) ^ (p / 2) * P.a0 ^ p + / (p.factorial : ℚ)) (P.Rc + 2 * p) : ℚ) : ℝ) * t ^ p else 0) + + (if p = 0 then (P.combK : ℝ) else 0) := by + intro p hp + unfold combList + rw [getD_map_range _ _ (Finset.mem_range.mp hp)] + unfold combC + by_cases h0 : p = 0 + · subst h0; simp; split_ifs <;> simp + · simp only [h0, if_false, add_zero] + split_ifs <;> simp + rw [Finset.sum_congr rfl hpt, Finset.sum_add_distrib, + sum_even_reindex _ (by omega : 2 * P.Mc ≤ 2 * P.Mc + 2), Finset.sum_ite_eq'] + rw [if_pos (Finset.mem_range.mpr (by omega))] + congr 1 + refine Finset.sum_congr rfl fun m _ => ?_ + rw [Nat.mul_div_cancel_left m (by norm_num : 0 < 2)] + rw [hpoly] + have h6 : (P.c0 : ℝ) * Real.cos (t * P.a0) ≤ (P.c0 : ℝ) * tayl 0 P.Mc (t * P.a0) + + (P.c0 : ℝ) * (2 * ((P.a0 : ℝ) * (P.T : ℝ)) ^ (2 * P.Mc) / ((2 * P.Mc).factorial : ℝ)) := by + have := mul_le_mul_of_nonneg_left hrem hc0R + linarith + have h7 : (P.c0 : ℝ) * t * (P.da : ℝ) ≤ (P.c0 : ℝ) * (P.T : ℝ) * (P.da : ℝ) := by + have := mul_le_mul_of_nonneg_left htT hc0R + nlinarith + linarith + +/-- **The symbol minorant on a piece**: `wpoly - combPoly <= Psi - c cos(t a)`. -/ +theorem sym_minorant (hb : brkCheck P = true) (hpc : pieceCheck P = true) (hm : minCheck P = true) + (hcc : combCheck P = true) + (hγ : Real.eulerMascheroniConstant ≤ ((P.gamUp : ℚ) : ℝ)) + (hlp : Real.log Real.pi ≤ ((P.logPiUp : ℚ) : ℝ)) {a c : ℝ} (ha : |a - (P.a0 : ℝ)| ≤ (P.da : ℝ)) + (hc : |c - (P.c0 : ℝ)| ≤ (P.dc : ℝ)) {i : ℕ} (hi : i < nPc P) {t : ℝ} + (hti : ((brk P i : ℚ) : ℝ) ≤ t) (hti' : t ≤ ((brk P (i + 1) : ℚ) : ℝ)) : + wpoly P i t - combPoly P t ≤ Psi t - c * Real.cos (t * a) := by + have h1 := wpoly_le_Psi P hb hpc hm hγ hlp hi hti hti' + have ht0 : 0 ≤ t := le_trans (by exact_mod_cast brk_nonneg P hb (i := i) (by omega)) hti + have htT : t ≤ (P.T : ℝ) := by + have hmono : ∀ k, i + 1 + k ≤ nPc P → brk P (i + 1) ≤ brk P (i + 1 + k) := by + intro k + induction k with + | zero => intro _; simp + | succ n ih => + intro hk + exact (ih (by omega)).trans (by + rw [show i + 1 + (n + 1) = (i + 1 + n) + 1 by ring] + exact brk_le_succ P hb (by omega)) + have h2 := hmono (nPc P - (i + 1)) (by omega) + rw [show i + 1 + (nPc P - (i + 1)) = nPc P by omega, (brkCheck_sound P hb).2.1] at h2 + have h3 : ((brk P (i + 1) : ℚ) : ℝ) ≤ (P.T : ℝ) := by exact_mod_cast h2 + linarith + have h2 := comb_le_combPoly P hcc ha hc ht0 htT + linarith + +end KWin2 + +end diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Par12.lean b/telperion/examples/rvm_bridge/lean/KWin2_Par12.lean new file mode 100644 index 000000000..ebbb581fb --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Par12.lean @@ -0,0 +1,72 @@ +/- + KWin2_Par12 -- the parameters of the window certificate at L = 1/2 (2L = 1; the prime comb term + n = 2 is present, n = 3 is not: log 3 > 1) (rvm_bridge island, 2026-09-24). + + conjecture1_proved = False. A finite-window statement; not RH; not Connes-Consani (pole terms + kept); cf. PR #604. + + Choices (scratch designer gen_L.py, exact-rational mirror of KWin2_Data): + * l = L = 1/2; frequency cut T = 40: betaStar(1/2, 40) = log(20/pi) - 1/40 - sqrt 2 log 2 + = 0.845744 > beta0 = 0.8456; + * S0 = 7.23, Cp = 1.0318 >= cosh(1/4); + * the Psi_0 minorant: 11 pieces of [0, 40], nS = 44 exact Lorentzians, alternating order 10, + Nser = 1200 series terms, gamma <= gamUp32: minorant gap ~1.2e-7 at low frequency (Nser = + 1500 makes the kernel's `Finset.range` sum too deep: `decide` gets stuck); + * the comb: cos(t a0) by its Taylor polynomial of degree < 96 in t a0 <= 27.8 (remainder + 6.5e-12); + * head: Mt = 36, Mp = 8, Econst = 1e-8; even sector N = 31 at lam = 4.2e-7 (head eigenvalue + 4.50e-7), odd sector N = 29 at lam = 1e-4 (1.07e-4); both certified by the ROUNDED checker + psdCertR at R = 70 (KWin2_Round: floor at 10^-70, diagonal shift 31e-70); + * the certified window floor lamFloor = 3.5e-7 (lambda*(1/2) ~ 9.38e-7, numerical). + No `sorry`. +-/ +import KWin2_Data +import KWin2_Consts + +namespace KWin2 +open KWin + +/-- The window certificate parameters at `L = 1/2`. -/ +def P12 : KPar where + ell := 1 / 2 + T := 40 + beta0 := 1057 / 1250 + S0 := 723 / 100 + Cp := 5159 / 5000 + brks := [0, 3 / 10, 4 / 5, 8 / 5, 16 / 5, 32 / 5, 64 / 5, 20, 25, 30, 35, 40] + degTab := [[20, 8, 6, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], + [22, 9, 7, 6, 6, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], + [21, 12, 9, 7, 7, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], + [21, 15, 12, 10, 9, 8, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], + [20, 19, 15, 13, 12, 11, 10, 9, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4], + [19, 19, 19, 17, 15, 14, 13, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5], + [13, 13, 13, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6], + [9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], + [8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], + [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], + [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]] + nS := 44 + Kalt := 5 + Dmax := 24 + Nser := 1200 + Mser := 10 ^ 9 + gamUp := gamUp32 + logPiUp := logPiUpQ + Mt := 36 + Mp := 8 + a0 := 6931471805599453 / 10 ^ 16 + da := 1 / 10 ^ 16 + c0 := 9802581434685472 / 10 ^ 16 + dc := 1 / 10 ^ 16 + Mc := 48 + combK := 650536633 / 100000000000000000000 + Rc := 16 + Econst := 1 / 100000000 + lamFloor := 7 / 20000000 + +/-- The even-sector head level. -/ +def lamE12 : ℚ := 42 / 10 ^ 8 +/-- The odd-sector head level. -/ +def lamO12 : ℚ := 1 / 10 ^ 4 + +end KWin2 diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Par25.lean b/telperion/examples/rvm_bridge/lean/KWin2_Par25.lean new file mode 100644 index 000000000..2d88c9b0e --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Par25.lean @@ -0,0 +1,67 @@ +/- + KWin2_Par25 -- the parameters of the window certificate at L = 2/5 (2L = 0.8 > log 2, so the prime + comb term n = 2 is present) (rvm_bridge island, 2026-09-24). + + conjecture1_proved = False. A finite-window statement; not RH; not Connes-Consani (pole terms + kept); cf. PR #604. + + Choices (scratch designer mirror.py / gen25.py, exact-rational mirror of KWin2_Data): + * head half-width l = L = 2/5 (the support [-L, L] is the head interval itself); + * frequency cut T = 24: betaStar(2/5, 24) = log(12/pi) - 1/24 - sqrt 2 log 2 = 0.31820 > beta0 = 0.318; + * S0 = 6.68 >= |Psi_{2/5} - beta0| on [0, 24]; Cp = 1.0203 >= cosh(1/5); + * the Psi_0 minorant: 8 pieces of [0, 24], nS = 24 exact Lorentzians (Taylor degrees chosen so + each geometric remainder is <= 1e-10), alternating order 10, Nser = 400, Mser = 10^9; + * the comb 2 Lambda(2)/sqrt 2 cos(t log 2): a0 = 0.6931471805599453 (|log 2 - a0| <= 1e-16), + c0 = 0.9802581434685472 (|c2 - c0| <= 1e-16), cos by its Taylor polynomial of degree < 64 in + t a0 <= 16.64 (remainder 2.2e-11), coefficients ceiled at 10^-(16+2p); + * head: Mt = 20 transform terms, Mp = 8 pole terms, Econst = 1e-6; even sector N = 16 at + lam = 45e-6 (head eigenvalue 4.70e-5), odd sector N = 14 at lam = 1e-3 (5.73e-3); + * the certified window floor lamFloor = 4e-5 (lambda*(2/5) ~ 1.82e-4, numerical). + No `sorry`. +-/ +import KWin2_Data + +namespace KWin2 +open KWin + +/-- The window certificate parameters at `L = 2/5`. -/ +def P25 : KPar where + ell := 2 / 5 + T := 24 + beta0 := 318 / 1000 + S0 := 668 / 100 + Cp := 10203 / 10000 + brks := [0, 3 / 10, 4 / 5, 8 / 5, 16 / 5, 32 / 5, 64 / 5, 20, 24] + degTab := [[20, 8, 6, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], + [22, 9, 7, 6, 6, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3], + [21, 12, 9, 7, 7, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], + [21, 15, 12, 10, 9, 8, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4], + [20, 19, 15, 13, 12, 11, 10, 9, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5], + [19, 19, 19, 17, 15, 14, 13, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7], + [13, 13, 13, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 7, 7], + [8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6]] + nS := 24 + Kalt := 5 + Dmax := 22 + Nser := 400 + Mser := 10 ^ 9 + gamUp := gammaUpQ + logPiUp := logPiUpQ + Mt := 20 + Mp := 8 + a0 := 6931471805599453 / 10 ^ 16 + da := 1 / 10 ^ 16 + c0 := 9802581434685472 / 10 ^ 16 + dc := 1 / 10 ^ 16 + Mc := 32 + combK := 2164470881 / 100000000000000000000 + Rc := 16 + Econst := 1 / 10 ^ 6 + lamFloor := 4 / 10 ^ 5 + +/-- The even-sector head level. -/ +def lamE25 : ℚ := 45 / 10 ^ 6 +/-- The odd-sector head level. -/ +def lamO25 : ℚ := 1 / 1000 + +end KWin2 diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Par920.lean b/telperion/examples/rvm_bridge/lean/KWin2_Par920.lean new file mode 100644 index 000000000..0a3104d4f --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Par920.lean @@ -0,0 +1,70 @@ +/- + KWin2_Par920 -- the parameters of the window certificate at L = 9/20 (2L = 0.9; the prime comb + term n = 2 is present, n = 3 is not: log 3 > 0.9) (rvm_bridge island, 2026-09-24). + + conjecture1_proved = False. A finite-window statement; not RH; not Connes-Consani (pole terms + kept); cf. PR #604. + + Choices (scratch designer gen_L.py, exact-rational mirror of KWin2_Data): + * l = L = 9/20; frequency cut T = 30: betaStar(9/20, 30) = log(15/pi) - 1/30 - sqrt 2 log 2 + = 0.549705 > beta0 = 0.5496; + * S0 = 6.91, Cp = 1.0257 >= cosh(9/40); + * the Psi_0 minorant: 9 pieces of [0, 30], nS = 34 exact Lorentzians, alternating order 10, + Nser = 1200 series terms and gamma <= gamUp32 (KWin2_Consts) so that the minorant gap is + 1.2e-7 at low frequency (KWin's Nser = 400, gamma + 1.3e-7 would cost 1.1e-6, a fifth of the + margin here); + * the comb 2 Lambda(2)/sqrt 2 cos(t log 2): cos by its Taylor polynomial of degree < 76 in + t a0 <= 20.8 (remainder 1.5e-11); + * head: Mt = 26, Mp = 8, Econst = 1e-7; even sector N = 22 at lam = 5e-6 (head eigenvalue + 5.18e-6), odd sector N = 19 at lam = 1e-3 (1.12e-3); + * the certified window floor lamFloor = 4.5e-6 (lambda*(9/20) ~ 1.62e-5, numerical). + No `sorry`. +-/ +import KWin2_Data +import KWin2_Consts + +namespace KWin2 +open KWin + +/-- The window certificate parameters at `L = 9/20`. -/ +def P920 : KPar where + ell := 9 / 20 + T := 30 + beta0 := 687 / 1250 + S0 := 691 / 100 + Cp := 10257 / 10000 + brks := [0, 3 / 10, 4 / 5, 8 / 5, 16 / 5, 32 / 5, 64 / 5, 20, 25, 30] + degTab := [[20, 8, 6, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], + [22, 9, 7, 6, 6, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], + [21, 12, 9, 7, 7, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3], + [21, 15, 12, 10, 9, 8, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], + [20, 19, 15, 13, 12, 11, 10, 9, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], + [19, 19, 19, 17, 15, 14, 13, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6], + [13, 13, 13, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6], + [9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5], + [8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5]] + nS := 34 + Kalt := 5 + Dmax := 24 + Nser := 1200 + Mser := 10 ^ 9 + gamUp := gamUp32 + logPiUp := logPiUpQ + Mt := 26 + Mp := 8 + a0 := 6931471805599453 / 10 ^ 16 + da := 1 / 10 ^ 16 + c0 := 9802581434685472 / 10 ^ 16 + dc := 1 / 10 ^ 16 + Mc := 38 + combK := 1516989583 / 100000000000000000000 + Rc := 16 + Econst := 1 / 10000000 + lamFloor := 9 / 2000000 + +/-- The even-sector head level. -/ +def lamE920 : ℚ := 5 / 10 ^ 6 +/-- The odd-sector head level. -/ +def lamO920 : ℚ := 1 / 1000 + +end KWin2 diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Round.lean b/telperion/examples/rvm_bridge/lean/KWin2_Round.lean new file mode 100644 index 000000000..3e1b7a673 --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Round.lean @@ -0,0 +1,122 @@ +/- + KWin2_Round -- a ROUNDED positive-semidefiniteness certificate for the exact head matrices + (rvm_bridge island, 2026-09-24). + + conjecture1_proved = False. Pure linear algebra over ℚ / ℝ; nothing about zeros. + + WHY. The exact head matrix of a window past L = 9/20 has entries of ~1200 digits, and KWin's + exact LDL^T (KWin.psdCert) lets the Schur complements grow to tens of thousands of digits; that is + what dominates the kernel time. `psdCertR A n R` instead floors every entry at 10^-R and shifts + the diagonal down by n 10^-R, then runs the SAME exact LDL^T checker on these short rationals. + + PROVED HERE (`headPSD_of_psdCertR`): psdCertR A n R = true implies + 0 <= sum_{j,k < n} x_j x_k A_jk for every real x, + because the rounding defect E = A - floor(A) has 0 <= E_jk < 10^-R, so + |x^T E x| <= 10^-R (sum |x_j|)^2 <= n 10^-R sum x_j^2 (Cauchy-Schwarz), which the diagonal shift + pays for. `HeadPSD A n` is the semantic statement consumed by KWin2_Head / KWin2_Tail; both the + exact certificate (`headPSD_of_psdCert`) and the rounded one (`headPSD_of_psdCertR`) produce it. + No `sorry`. +-/ +import KWin2_Data + +open Finset + +namespace KWin2 +open KWin + +/-- The semantic PSD statement of an `n x n` matrix given as a list of rows. -/ +def HeadPSD (A : List (List ℚ)) (n : ℕ) : Prop := + ∀ x : ℕ → ℝ, 0 ≤ ∑ j ∈ range n, ∑ k ∈ range n, x j * x k * ((mget A j k : ℚ) : ℝ) + +theorem headPSD_of_psdCert {A : List (List ℚ)} {n : ℕ} (h : psdCert A n = true) : HeadPSD A n := + fun x => psdCert_sound h x + +/-- Floor every entry at `10^-R` and shift the diagonal down by `n 10^-R`. -/ +def roundShift (A : List (List ℚ)) (n R : ℕ) : List (List ℚ) := + (List.range n).map (fun j => (List.range n).map (fun k => + floorR (mget A j k) R - (if j = k then (n : ℚ) / 10 ^ R else 0))) + +/-- The rounded certificate: KWin's exact LDL^T checker on the rounded, shifted matrix. -/ +def psdCertR (A : List (List ℚ)) (n R : ℕ) : Bool := psdCert (roundShift A n R) n + +lemma sum_abs_sq_le (n : ℕ) (x : ℕ → ℝ) : + (∑ j ∈ range n, |x j|) ^ 2 ≤ (n : ℝ) * ∑ j ∈ range n, x j ^ 2 := by + have h2 := Finset.sum_mul_sq_le_sq_mul_sq (range n) (fun _ => (1 : ℝ)) (fun j => |x j|) + simp only [one_mul, one_pow, Finset.sum_const, Finset.card_range, nsmul_eq_mul, mul_one, sq_abs] + at h2 + exact h2 + +theorem headPSD_of_psdCertR {A : List (List ℚ)} {n R : ℕ} (h : psdCertR A n R = true) : + HeadPSD A n := by + intro x + have hB := psdCert_sound h x + have hBe : ∀ j ∈ range n, ∀ k ∈ range n, ((mget (roundShift A n R) j k : ℚ) : ℝ) + = ((floorR (mget A j k) R : ℚ) : ℝ) - (if j = k then (n : ℝ) / 10 ^ R else 0) := by + intro j hj k hk + unfold roundShift + rw [mget_map_range _ (Finset.mem_range.mp hj) (Finset.mem_range.mp hk)] + push_cast + split_ifs <;> simp + rw [Finset.sum_congr rfl fun j hj => Finset.sum_congr rfl fun k hk => by rw [hBe j hj k hk]] at hB + -- the defect + set e : ℕ → ℕ → ℝ := fun j k => ((mget A j k : ℚ) : ℝ) - ((floorR (mget A j k) R : ℚ) : ℝ) with he + have he0 : ∀ j k, 0 ≤ e j k := fun j k => by + rw [he]; simp only + have := floorR_le (mget A j k) R + have h' : ((floorR (mget A j k) R : ℚ) : ℝ) ≤ ((mget A j k : ℚ) : ℝ) := by exact_mod_cast this + linarith + have he1 : ∀ j k, e j k ≤ 1 / 10 ^ R := fun j k => by + rw [he]; simp only + have := sub_floorR_le (mget A j k) R + have h' : (((mget A j k - floorR (mget A j k) R : ℚ)) : ℝ) ≤ ((1 / 10 ^ R : ℚ) : ℝ) := by + exact_mod_cast this + push_cast at h' + linarith + have hsplit : ∑ j ∈ range n, ∑ k ∈ range n, x j * x k * ((mget A j k : ℚ) : ℝ) + = ∑ j ∈ range n, ∑ k ∈ range n, x j * x k + * (((floorR (mget A j k) R : ℚ) : ℝ) - (if j = k then (n : ℝ) / 10 ^ R else 0)) + + (n : ℝ) / 10 ^ R * ∑ j ∈ range n, x j ^ 2 + + ∑ j ∈ range n, ∑ k ∈ range n, x j * x k * e j k := by + have hdiag : ∑ j ∈ range n, ∑ k ∈ range n, x j * x k * (if j = k then (n : ℝ) / 10 ^ R else 0) + = (n : ℝ) / 10 ^ R * ∑ j ∈ range n, x j ^ 2 := by + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun j hj => ?_ + rw [Finset.sum_eq_single j] + · simp; ring + · intro k _ hkj; simp [Ne.symm hkj] + · intro hj'; exact absurd hj hj' + rw [← hdiag, ← Finset.sum_add_distrib, ← Finset.sum_add_distrib] + refine Finset.sum_congr rfl fun j _ => ?_ + rw [← Finset.sum_add_distrib, ← Finset.sum_add_distrib] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [he]; simp only + ring + have hE : -((n : ℝ) / 10 ^ R * ∑ j ∈ range n, x j ^ 2) + ≤ ∑ j ∈ range n, ∑ k ∈ range n, x j * x k * e j k := by + have h1 : ∀ j ∈ range n, ∀ k ∈ range n, -(|x j| * |x k| * (1 / 10 ^ R)) ≤ x j * x k * e j k := by + intro j _ k _ + have hab : |x j * x k * e j k| ≤ |x j| * |x k| * (1 / 10 ^ R) := by + rw [abs_mul, abs_mul, abs_of_nonneg (he0 j k)] + exact mul_le_mul_of_nonneg_left (he1 j k) (by positivity) + exact (neg_le_neg hab).trans (neg_abs_le _) + have h2 := Finset.sum_le_sum fun j hj => Finset.sum_le_sum fun k hk => h1 j hj k hk + have h3 : ∑ j ∈ range n, ∑ k ∈ range n, -(|x j| * |x k| * (1 / 10 ^ R)) + = -((1 / 10 ^ R) * (∑ j ∈ range n, |x j|) ^ 2) := by + rw [sq, Finset.sum_mul_sum, Finset.mul_sum, ← Finset.sum_neg_distrib] + refine Finset.sum_congr rfl fun j _ => ?_ + rw [Finset.mul_sum, ← Finset.sum_neg_distrib] + refine Finset.sum_congr rfl fun k _ => ?_ + ring + rw [h3] at h2 + have h4 := sum_abs_sq_le n x + have h5 : (1 / 10 ^ R : ℝ) * (∑ j ∈ range n, |x j|) ^ 2 + ≤ (n : ℝ) / 10 ^ R * ∑ j ∈ range n, x j ^ 2 := by + have hp : (0 : ℝ) ≤ 1 / 10 ^ R := by positivity + calc (1 / 10 ^ R : ℝ) * (∑ j ∈ range n, |x j|) ^ 2 + ≤ (1 / 10 ^ R) * ((n : ℝ) * ∑ j ∈ range n, x j ^ 2) := mul_le_mul_of_nonneg_left h4 hp + _ = (n : ℝ) / 10 ^ R * ∑ j ∈ range n, x j ^ 2 := by ring + linarith + rw [hsplit] + linarith + +end KWin2 diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Split.lean b/telperion/examples/rvm_bridge/lean/KWin2_Split.lean new file mode 100644 index 000000000..fe0616d9b --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Split.lean @@ -0,0 +1,301 @@ +/- + KWin2_Split -- the Zhu frequency split of the Weil form on windows PAST the prime-free boundary, + in the sector form consumed by the KWin2 certificate (rvm_bridge island, 2026-09-24). + + conjecture1_proved = False. (Finite-window Weil positivity is not RH; not Connes-Consani, whose + theorem is for the pole-free class; cf. PR #604.) + + THE COMB. For log 2 < 2L <= log 3 the prime comb of the Weil symbol is the single term n = 2: + weilSymbol L t = Psi t - c2 cos(t log 2), c2 = 2 Lambda(2)/sqrt 2 = sqrt 2 log 2, + (`weilSymbol_eq_two`), and combMass L = c2 (`combMass_eq_two`). Nothing is thrown away: the comb + stays inside the symbol on [0, T] and is bounded by its mass only beyond T (Zhu's envelope step). + + PROVED HERE (`Q_ge_Rb`): for a real test v of parity par, smooth, compactly supported in [-L, L] + with 0 <= L <= l = P.ell, 15/4 <= T and beta0 <= betaStar L T, + Rb P (weilSymbol L) par v v <= Re weilForm (autocorr v), + from Zhu eq. (2) (`symbol_representation_ofReal`, ZhuSymbol, valid for every L), the sector + transform and pole functional on [-l, l], Plancherel, evenness of |F|^2 and of the symbol, and + weilSymbol L t >= betaStar L T >= beta0 for t >= T (`weilSymbol_ge_betaStar`, ZhuSplit). + No `sorry`. +-/ +import KWin2_Tail +import KWin_Window + +open Real MeasureTheory Set +open scoped ComplexConjugate + +noncomputable section + +namespace KWin2 +open KWin (Tr Pl ip phiF poleF continuous_Tr epsR phiF_neg paperFT_ofReal_line norm_sq_line + weilKernel_zero_ofReal exp_moment_parity integral_odd_eq_zero continuous_v compact_v integrable_v_mul + plancherel_ofReal integrable_line_sq integrable_line_sq_mul_psi Psi + eq_zero_of_tsupport_subset_Icc_left' eq_zero_of_tsupport_subset_Icc_right') +open RvMBridge11 RvMBridgeZhu WeilExplicit RvMBridge4 RvMBridge5 WeilWindow + +variable (P : KPar) + +/-! ## A. The Weil symbol on windows whose comb is {2}. -/ + +/-- The comb weight of n = 2: `2 Lambda(2) / sqrt 2`. -/ +def c2 : ℝ := 2 * ArithmeticFunction.vonMangoldt 2 / Real.sqrt 2 + +lemma c2_eq : c2 = 2 * Real.log 2 / Real.sqrt 2 := by + unfold c2 + rw [ArithmeticFunction.vonMangoldt_apply_prime Nat.prime_two] + norm_num + +lemma c2_nonneg : 0 ≤ c2 := by + rw [c2_eq]; have := Real.log_nonneg (by norm_num : (1 : ℝ) ≤ 2); positivity + +/-- The comb term vanishes except at n = 2 when log 2 < 2L <= log 3. -/ +lemma comb_term_eq {L : ℝ} (hL2 : 2 * L ≤ Real.log 3) (t : ℝ) (n : ℕ) (hn : n ≠ 2) : + (if Real.log n < 2 * L then + 2 * ArithmeticFunction.vonMangoldt n / Real.sqrt n * Real.cos (t * Real.log n) else 0) = 0 := by + split_ifs with h + · rcases Nat.lt_or_ge n 3 with h3 | h3 + · interval_cases n + · simp + · simp [ArithmeticFunction.vonMangoldt_apply_one] + · exact absurd rfl hn + · have : Real.log 3 ≤ Real.log n := Real.log_le_log (by norm_num) (by exact_mod_cast h3) + linarith + · rfl + +theorem comb_eq_two {L : ℝ} (hL1 : Real.log 2 < 2 * L) (hL2 : 2 * L ≤ Real.log 3) (t : ℝ) : + (∑' n : ℕ, if Real.log n < 2 * L then + 2 * ArithmeticFunction.vonMangoldt n / Real.sqrt n * Real.cos (t * Real.log n) else 0) + = c2 * Real.cos (t * Real.log 2) := by + rw [tsum_eq_single 2 (fun n hn => comb_term_eq hL2 t n hn)] + have h : Real.log ((2 : ℕ) : ℝ) < 2 * L := by push_cast; exact hL1 + rw [if_pos h] + unfold c2 + push_cast + ring + +theorem combMass_eq_two {L : ℝ} (hL1 : Real.log 2 < 2 * L) (hL2 : 2 * L ≤ Real.log 3) : + combMass L = c2 := by + unfold combMass + have hz : ∀ n : ℕ, n ≠ 2 → (if Real.log n < 2 * L then + 2 * ArithmeticFunction.vonMangoldt n / Real.sqrt n else 0) = 0 := by + intro n hn + have := comb_term_eq hL2 0 n hn + split_ifs at this ⊢ with h + · simpa using this + · rfl + rw [tsum_eq_single 2 hz] + have h : Real.log ((2 : ℕ) : ℝ) < 2 * L := by push_cast; exact hL1 + rw [if_pos h] + unfold c2 + push_cast + ring + +/-- **The Weil symbol with the n = 2 comb.** -/ +theorem weilSymbol_eq_two {L : ℝ} (hL1 : Real.log 2 < 2 * L) (hL2 : 2 * L ≤ Real.log 3) (t : ℝ) : + weilSymbol L t = Psi t - c2 * Real.cos (t * Real.log 2) := by + unfold weilSymbol + rw [comb_eq_two hL1 hL2 t] + unfold Psi + rfl + +lemma continuous_weilSymbol_two {L : ℝ} (hL1 : Real.log 2 < 2 * L) (hL2 : 2 * L ≤ Real.log 3) : + Continuous (weilSymbol L) := by + have e : weilSymbol L = fun t => Psi t - c2 * Real.cos (t * Real.log 2) := + funext (weilSymbol_eq_two hL1 hL2) + rw [e] + have := KWin.continuous_Psi + fun_prop + +lemma weilSymbol_two_neg {L : ℝ} (hL1 : Real.log 2 < 2 * L) (hL2 : 2 * L ≤ Real.log 3) (t : ℝ) : + weilSymbol L (-t) = weilSymbol L t := by + rw [weilSymbol_eq_two hL1 hL2, weilSymbol_eq_two hL1 hL2] + unfold Psi + rw [RvMBridge30.psiR_neg, neg_mul, Real.cos_neg] + +/-! ## B. Support and the conversion to [-l, l]. -/ + +lemma v_zero_outside {v : ℝ → ℝ} (hf : IsWeilTest (fun u => (v u : ℂ))) {L l : ℝ} (hLl : L ≤ l) + (hsupp : tsupport (fun u => (v u : ℂ)) ⊆ Icc (-L) L) {x : ℝ} (hx : x ∉ Ioc (-l) l) : v x = 0 := by + have hc : Continuous (fun u => (v u : ℂ)) := hf.1.continuous + rw [mem_Ioc, not_and_or] at hx + rcases hx with h | h + · have h1 : (fun u => (v u : ℂ)) x = 0 := + eq_zero_of_tsupport_subset_Icc_left' hc hsupp (by linarith [not_lt.mp h]) + simpa using h1 + · have h1 : (fun u => (v u : ℂ)) x = 0 := + eq_zero_of_tsupport_subset_Icc_right' hc hsupp (by linarith [not_le.mp h]) + simpa using h1 + +lemma integral_eq_interval' {v : ℝ → ℝ} (hf : IsWeilTest (fun u => (v u : ℂ))) {L l : ℝ} (hl : 0 < l) + (hLl : L ≤ l) (hsupp : tsupport (fun u => (v u : ℂ)) ⊆ Icc (-L) L) (w : ℝ → ℝ) : + ∫ x, v x * w x = ∫ x in (-l)..l, v x * w x := by + rw [intervalIntegral.integral_of_le (by linarith)] + refine (setIntegral_eq_integral_of_forall_compl_eq_zero fun x hx => ?_).symm + rw [v_zero_outside hf hLl hsupp hx, zero_mul] + +/-! ## C. The transform on the line and the pole term. -/ + +/-- On the line, `|F(t)|^2` is the square of the sector transform on `[-l, l]`. -/ +lemma norm_sq_line_sector' {v : ℝ → ℝ} {par : ℕ} (hpar : par = 0 ∨ par = 1) + (hf : IsWeilTest (fun u => (v u : ℂ))) (hev : ∀ u, v (-u) = epsR par * v u) {L l : ℝ} (hl : 0 < l) + (hLl : L ≤ l) (hsupp : tsupport (fun u => (v u : ℂ)) ⊆ Icc (-L) L) (t : ℝ) : + ‖weilKernel (fun u => (v u : ℂ)) (1 / 2 + (t : ℂ) * Complex.I)‖ ^ 2 = (Tr l par v t) ^ 2 := by + rw [norm_sq_line hf] + unfold Tr + rw [← integral_eq_interval' hf hl hLl hsupp] + rcases hpar with h | h <;> subst h + · have hs : ∫ u, v u * Real.sin (t * u) = 0 := integral_odd_eq_zero fun u => by + have h1 := hev u + simp only [epsR, if_true, one_mul] at h1 + rw [h1, mul_neg, Real.sin_neg]; ring + rw [hs] + simp [phiF] + · have hc : ∫ u, v u * Real.cos (t * u) = 0 := integral_odd_eq_zero fun u => by + have h1 := hev u + simp only [epsR, one_ne_zero, if_false] at h1 + rw [h1, mul_neg, Real.cos_neg]; ring + rw [hc] + simp [phiF] + +/-- The pole term: `|F(i/2)|^2` is the square of the sector pole functional on `[-l, l]`. -/ +lemma K0_sq' {v : ℝ → ℝ} {par : ℕ} (hpar : par = 0 ∨ par = 1) + (hf : IsWeilTest (fun u => (v u : ℂ))) (hev : ∀ u, v (-u) = epsR par * v u) {L l : ℝ} (hl : 0 < l) + (hLl : L ≤ l) (hsupp : tsupport (fun u => (v u : ℂ)) ⊆ Icc (-L) L) : + ‖weilKernel (fun u => (v u : ℂ)) 0‖ ^ 2 = (Pl l par v) ^ 2 := by + rw [weilKernel_zero_ofReal, Complex.norm_real, Real.norm_eq_abs, sq_abs] + have hE := exp_moment_parity hev + have hPl : Pl l par v = ∫ u, v u * poleF par u := (integral_eq_interval' hf hl hLl hsupp _).symm + have hi1 : Integrable (fun u => v u * Real.exp (u / 2)) := integrable_v_mul hf (by fun_prop) + have hi2 : Integrable (fun u => v u * Real.exp (-(u / 2))) := integrable_v_mul hf (by fun_prop) + rw [hPl] + rcases hpar with h | h <;> subst h + · have e : (fun u => v u * poleF 0 u) + = fun u => (1 / 2 : ℝ) * (v u * Real.exp (u / 2) + v u * Real.exp (-(u / 2))) := by + funext u; simp only [poleF, if_true, Real.cosh_eq]; ring + rw [e, integral_const_mul, integral_add hi1 hi2] + simp only [epsR, if_true, one_mul] at hE + rw [hE] + ring + · have e : (fun u => v u * poleF 1 u) + = fun u => (1 / 2 : ℝ) * (v u * Real.exp (u / 2) - v u * Real.exp (-(u / 2))) := by + funext u; simp only [poleF, one_ne_zero, if_false, Real.sinh_eq]; ring + rw [e, integral_const_mul, integral_sub hi1 hi2] + simp only [epsR, one_ne_zero, if_false] at hE + rw [hE] + ring + +/-! ## D. The split. -/ + +/-- The half-line split of an even integrand at `T` against an even symbol bounded below by `β` +beyond `T`. -/ +theorem split_line' {F sym : ℝ → ℝ} {T β : ℝ} (hT : 0 ≤ T) (hFi : Integrable F) + (hFSi : Integrable fun t => F t * sym t) (hF0 : ∀ t, 0 ≤ F t) (hFe : ∀ t, F (-t) = F t) + (hSe : ∀ t, sym (-t) = sym t) (hSβ : ∀ t, T < t → β ≤ sym t) : + (1 / Real.pi) * (∫ t in (0 : ℝ)..T, (sym t - β) * F t) + β * ((1 / (2 * Real.pi)) * ∫ t, F t) + ≤ (1 / (2 * Real.pi)) * ∫ t, F t * sym t := by + have hpi := Real.pi_pos + have habs1 : ∫ t, F t * sym t = 2 * ∫ t in Ioi (0 : ℝ), F t * sym t := by + rw [← integral_comp_abs (f := fun t => F t * sym t)] + congr 1; funext t + rcases le_or_gt 0 t with h | h + · rw [abs_of_nonneg h] + · rw [abs_of_neg h, hFe, hSe] + have habs2 : ∫ t, F t = 2 * ∫ t in Ioi (0 : ℝ), F t := by + rw [← integral_comp_abs (f := F)] + congr 1; funext t + rcases le_or_gt 0 t with h | h + · rw [abs_of_nonneg h] + · rw [abs_of_neg h, hFe] + have hU : Ioc (0 : ℝ) T ∪ Ioi T = Ioi 0 := Ioc_union_Ioi_eq_Ioi hT + have hD : Disjoint (Ioc (0 : ℝ) T) (Ioi T) := by + rw [Set.disjoint_left]; intro x hx hx'; exact absurd hx.2 (not_le.mpr hx') + have hs1 : ∫ t in Ioi (0 : ℝ), F t * sym t + = (∫ t in Ioc (0 : ℝ) T, F t * sym t) + ∫ t in Ioi T, F t * sym t := by + rw [← hU, setIntegral_union hD measurableSet_Ioi hFSi.integrableOn hFSi.integrableOn] + have hs2 : ∫ t in Ioi (0 : ℝ), F t + = (∫ t in Ioc (0 : ℝ) T, F t) + ∫ t in Ioi T, F t := by + rw [← hU, setIntegral_union hD measurableSet_Ioi hFi.integrableOn hFi.integrableOn] + have hmono : β * ∫ t in Ioi T, F t ≤ ∫ t in Ioi T, F t * sym t := by + rw [← integral_const_mul] + refine setIntegral_mono_on (hFi.integrableOn.const_mul _) hFSi.integrableOn measurableSet_Ioi + fun t ht => ?_ + rw [mul_comm] + exact mul_le_mul_of_nonneg_left (hSβ t ht) (hF0 t) + have hIoc : ∫ t in (0 : ℝ)..T, (sym t - β) * F t + = (∫ t in Ioc (0 : ℝ) T, F t * sym t) - β * ∫ t in Ioc (0 : ℝ) T, F t := by + rw [intervalIntegral.integral_of_le hT, ← integral_const_mul, + ← integral_sub hFSi.integrableOn (hFi.integrableOn.const_mul _)] + congr 1; funext t; ring + rw [hIoc, habs1, habs2, hs1, hs2] + have e : (1 / Real.pi) = 2 * (1 / (2 * Real.pi)) := by field_simp + rw [e] + have hc : 0 < 1 / (2 * Real.pi) := by positivity + nlinarith [hmono] + +/-- **The split**: `Rb P (weilSymbol L) par v v <= Q(v)` on the window, for `log 2 < 2L <= log 3`. -/ +theorem Q_ge_Rb (hpc : parCheck P = true) {L : ℝ} (hL1 : Real.log 2 < 2 * L) + (hL2 : 2 * L ≤ Real.log 3) (hLl : L ≤ lR P) (hT : 15 / 4 ≤ TR P) + (hβ : b0R P ≤ betaStar L (TR P)) {v : ℝ → ℝ} {par : ℕ} (hpar : par = 0 ∨ par = 1) + (hf : IsWeilTest (fun u => (v u : ℂ))) (hev : ∀ u, v (-u) = epsR par * v u) + (hsupp : tsupport (fun u => (v u : ℂ)) ⊆ Icc (-L) L) : + Rb P (weilSymbol L) par v v ≤ (WeilForm.weilForm (WeilForm.autocorr (fun u => (v u : ℂ)))).re := by + have hl := lR_pos P hpc + have hε : epsR par * epsR par = 1 := by unfold epsR; split_ifs <;> norm_num + rw [symbol_representation_ofReal hε hf hev hsupp] + set F : ℝ → ℝ := fun r => ‖weilKernel (fun u => (v u : ℂ)) (1 / 2 + (r : ℂ) * Complex.I)‖ ^ 2 + with hF + have hFT : ∀ t, F t = (Tr (lR P) par v t) ^ 2 := fun t => + norm_sq_line_sector' hpar hf hev hl hLl hsupp t + have hFc : Continuous F := by + have : F = fun t => (Tr (lR P) par v t) ^ 2 := funext hFT + rw [this] + exact (continuous_Tr (lR P) par (continuous_v hf)).pow 2 + have hFi : Integrable F := integrable_line_sq hf + have hFpsi := integrable_line_sq_mul_psi hf + have hFcos : Integrable fun t => F t * Real.cos (t * Real.log 2) := by + have h := hFi.bdd_mul (c := 1) + (by fun_prop : Continuous fun r : ℝ => Real.cos (r * Real.log 2)).aestronglyMeasurable + (Filter.Eventually.of_forall fun r => by + rw [Real.norm_eq_abs]; exact Real.abs_cos_le_one _) + exact h.congr (Filter.Eventually.of_forall fun r => mul_comm _ _) + have hFSi : Integrable fun t => F t * weilSymbol L t := by + have e : (fun t => F t * weilSymbol L t) + = fun t => (F t * psiR t - F t * Real.log Real.pi) - c2 * (F t * Real.cos (t * Real.log 2)) := by + funext t; rw [weilSymbol_eq_two hL1 hL2]; unfold Psi; ring + rw [e] + exact (hFpsi.sub (hFi.mul_const _)).sub (hFcos.const_mul _) + have hF0 : ∀ t, 0 ≤ F t := fun t => by rw [hF]; positivity + have hTneg : ∀ t, Tr (lR P) par v (-t) = (if par = 0 then (1 : ℝ) else -1) * Tr (lR P) par v t := by + intro t + unfold Tr + rw [← intervalIntegral.integral_const_mul] + congr 1 + funext x + rw [show -t * x = -(t * x) by ring, phiF_neg par hpar] + ring + have hFe : ∀ t, F (-t) = F t := by + intro t + rw [hFT, hFT, hTneg, mul_pow] + split_ifs <;> norm_num + have hSβ : ∀ t, TR P < t → b0R P ≤ weilSymbol L t := fun t ht => + hβ.trans (weilSymbol_ge_betaStar hT ht.le) + have hsplit := split_line' (TR_pos P hpc).le hFi hFSi hF0 hFe (weilSymbol_two_neg hL1 hL2) hSβ + have hplan := plancherel_ofReal hf + have hip : ip (lR P) v v = ∫ x, v x ^ 2 := by + unfold ip + rw [← integral_eq_interval' hf hl hLl hsupp] + congr 1; funext x; ring + have hpole := K0_sq' hpar hf hev hl hLl hsupp + unfold Rb + rw [hpole, hip, hplan] + have e2 : (fun t => (weilSymbol L t - b0R P) * (Tr (lR P) par v t * Tr (lR P) par v t)) + = fun t => (weilSymbol L t - b0R P) * F t := by funext t; rw [hFT]; ring + rw [e2] + have e3 : (fun r : ℝ => ‖weilKernel (fun u => (v u : ℂ)) (1 / 2 + (r : ℂ) * Complex.I)‖ ^ 2) = F := rfl + rw [e3] + have e4 : (fun t : ℝ => F t * weilSymbol L t) = fun t => F t * weilSymbol L t := rfl + nlinarith [hsplit] + +end KWin2 + +end diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Tail.lean b/telperion/examples/rvm_bridge/lean/KWin2_Tail.lean new file mode 100644 index 000000000..7dd890508 --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Tail.lean @@ -0,0 +1,404 @@ +/- + KWin2_Tail -- the projection tail and the sector floor of the split form, parametric in the window + and abstract in the symbol (rvm_bridge island, 2026-09-24). + + conjecture1_proved = False. (Finite-window Weil positivity is not RH; not Connes-Consani, whose + theorem is for the pole-free class; cf. PR #604.) + + PROVED HERE (`Rb_floor`): for EVERY continuous v, each sector and every symbol satisfying + `SymHyp P sym`, + lamFloor int_{-l}^{l} v^2 <= Rb P sym par v v, + from the head certificate (KWin2_Head.head_floor) and KWin's PROJECTION tail: the projection + coefficients a = G^{-1} (int v (x/l)^(2k+par))_k use the kernel-checked Cauchy inverse + (KWin2_Data.ginvCheck), r = v - h is orthogonal to the head monomials, so the Taylor part of the + transform and of the pole functional is invisible to r; the coupling |Rb h r| <= kapT A1(h) A1(r) + and the tail floor Rb r r >= dT int r^2 use only |sym - beta0| <= S0 on [0, T]; the 2x2 bound + closes with the kernel-checked (lam - lamFloor)(dT - lamFloor) >= 4 kapT^2 l^2. The prime comb + lives inside `sym`: in frequency space it is a bounded multiplier on [0, T], where the tail's + transform is Taylor-small, so it never couples the head to the tail. No `sorry`. +-/ +import KWin2_Head + +open Real Finset MeasureTheory intervalIntegral + +noncomputable section + +namespace KWin2 +open KWin (Tr Pl ip mo A1 phiF poleF continuous_Tr Tr_sub_le Pl_sub_le abs_Tr_le abs_Pl_le A1_nonneg + A1_sq_le continuous_phiF continuous_poleF psdCert psdCert_sound mget mget_map_range getD_map_range + piLoQ piHiQ piEQ epsQ pi_gt_Q pi_lt_Q epsR) + +variable (P : KPar) + +/-! ## A. Linearity. -/ + +lemma int_add_mul' {f g w : ℝ → ℝ} (hf : Continuous f) (hg : Continuous g) (hw : Continuous w) + (a b : ℝ) : + ∫ x in a..b, (f x + g x) * w x = (∫ x in a..b, f x * w x) + ∫ x in a..b, g x * w x := by + have h1 : IntervalIntegrable (fun x => f x * w x) volume a b := (hf.mul hw).intervalIntegrable _ _ + have h2 : IntervalIntegrable (fun x => g x * w x) volume a b := (hg.mul hw).intervalIntegrable _ _ + rw [← intervalIntegral.integral_add h1 h2] + congr 1; funext x; ring + +lemma Pl_add' (l : ℝ) {par : ℕ} {f g : ℝ → ℝ} (hf : Continuous f) (hg : Continuous g) : + Pl l par (fun x => f x + g x) = Pl l par f + Pl l par g := + int_add_mul' hf hg (continuous_poleF par) _ _ + +lemma Tr_add' (l : ℝ) {par : ℕ} {f g : ℝ → ℝ} (hf : Continuous f) (hg : Continuous g) (t : ℝ) : + Tr l par (fun x => f x + g x) t = Tr l par f t + Tr l par g t := + int_add_mul' hf hg ((continuous_phiF par).comp (continuous_const.mul continuous_id)) _ _ + +lemma ip_add_left' (l : ℝ) {f g w : ℝ → ℝ} (hf : Continuous f) (hg : Continuous g) (hw : Continuous w) : + ip l (fun x => f x + g x) w = ip l f w + ip l g w := + int_add_mul' hf hg hw _ _ + +lemma ip_comm' (l : ℝ) (f g : ℝ → ℝ) : ip l f g = ip l g f := by + unfold ip; congr 1; funext x; ring + +lemma mo_sub' (l : ℝ) {f g : ℝ → ℝ} (hf : Continuous f) (hg : Continuous g) (n : ℕ) : + mo l (fun x => f x - g x) n = mo l f n - mo l g n := by + unfold mo + have h1 : IntervalIntegrable (fun x => f x * (x / l) ^ n) volume (-l) l := + (hf.mul (by fun_prop)).intervalIntegrable _ _ + have h2 : IntervalIntegrable (fun x => g x * (x / l) ^ n) volume (-l) l := + (hg.mul (by fun_prop)).intervalIntegrable _ _ + rw [← intervalIntegral.integral_sub h1 h2] + congr 1; funext x; beta_reduce; ring + +/-- The bilinear expansion `R(h + r) = R(h) + 2 R(h, r) + R(r)`. -/ +theorem Rb_expand {sym : ℝ → ℝ} (hsc : Continuous sym) (par : ℕ) {h r : ℝ → ℝ} (hh : Continuous h) + (hr : Continuous r) : + Rb P sym par (fun x => h x + r x) (fun x => h x + r x) + = Rb P sym par h h + 2 * Rb P sym par h r + Rb P sym par r r := by + have hs : Continuous (fun x => h x + r x) := hh.add hr + unfold Rb + rw [Pl_add' _ hh hr, ip_add_left' _ hh hr hs, ip_comm' _ h, ip_comm' _ r, ip_add_left' _ hh hr hh, + ip_add_left' _ hh hr hr, ip_comm' _ r h] + have cTh := continuous_Tr (lR P) par hh + have cTr := continuous_Tr (lR P) par hr + have cP : Continuous fun t => sym t - b0R P := hsc.sub continuous_const + have e : (fun t => (sym t - b0R P) * (Tr (lR P) par (fun x => h x + r x) t + * Tr (lR P) par (fun x => h x + r x) t)) + = fun t => ((sym t - b0R P) * (Tr (lR P) par h t * Tr (lR P) par h t) + + 2 * ((sym t - b0R P) * (Tr (lR P) par h t * Tr (lR P) par r t))) + + (sym t - b0R P) * (Tr (lR P) par r t * Tr (lR P) par r t) := by + funext t; rw [Tr_add' _ hh hr t]; ring + rw [e, intervalIntegral.integral_add (Continuous.intervalIntegrable (by fun_prop) _ _) + (Continuous.intervalIntegrable (by fun_prop) _ _), + intervalIntegral.integral_add (Continuous.intervalIntegrable (by fun_prop) _ _) + (Continuous.intervalIntegrable (by fun_prop) _ _), + intervalIntegral.integral_const_mul] + ring + +/-! ## B. Integral bounds on [0, T]. -/ + +lemma abs_int_le_of_abs_le' (hpc : parCheck P = true) {f g : ℝ → ℝ} (hf : Continuous f) + (hg : Continuous g) (h : ∀ t ∈ Set.Icc (0 : ℝ) (TR P), |f t| ≤ g t) : + |∫ t in (0 : ℝ)..(TR P), f t| ≤ ∫ t in (0 : ℝ)..(TR P), g t := by + have hT := (TR_pos P hpc).le + refine (intervalIntegral.abs_integral_le_integral_abs hT).trans ?_ + exact intervalIntegral.integral_mono_on hT (hf.abs.intervalIntegrable _ _) + (hg.intervalIntegrable _ _) h + +/-! ## C. The sector floor. -/ + +set_option maxHeartbeats 2000000 in +theorem Rb_floor {sym : ℝ → ℝ} (hs : SymHyp P sym) (hpc : parCheck P = true) + (hb : brkCheck P = true) {par N : ℕ} (hpar : par = 0 ∨ par = 1) {lam : ℚ} + (htail : tailCond P par N lam = true) (hcert : HeadPSD (headMat P par N lam) N) + (hginv : ginvCheck P par N = true) {v : ℝ → ℝ} (hv : Continuous v) : + ((P.lamFloor : ℚ) : ℝ) * ip (lR P) v v ≤ Rb P sym par v v := by + obtain ⟨hl1, hl2, hl3, _, _, hN, _, hN1⟩ := tailCond_sound P htail + have hl := lR_pos P hpc + have hT := (TR_pos P hpc).le + have hsc := hs.cont + -- the projection + set b : ℕ → ℝ := fun l => mo (lR P) v (2 * l + par) with hbdef + set a : ℕ → ℝ := fun j => ∑ l ∈ range N, ((mget (ginvM P par N) j l : ℚ) : ℝ) * b l with hadef + set h := hfun P par N a with hhdef + have hc : Continuous h := continuous_hfun P par N a + set r : ℝ → ℝ := fun x => v x - h x with hrdef + have hrc : Continuous r := hv.sub hc + have hvhr : v = fun x => h x + r x := by funext x; simp only [hrdef]; ring + -- orthogonality + have horth : ∀ m < N, mo (lR P) r (2 * m + par) = 0 := by + intro m hm + rw [hrdef, mo_sub' _ hv hc, hhdef, mo_hfun P hpc] + have hsum : ∑ k ∈ range N, a k * ((Gm P par k m : ℚ) : ℝ) = b m := by + rw [hadef] + simp only + simp_rw [Finset.sum_mul] + rw [Finset.sum_comm] + have hδ : ∀ l ∈ range N, ∑ k ∈ range N, + ((mget (ginvM P par N) k l : ℚ) : ℝ) * b l * ((Gm P par k m : ℚ) : ℝ) + = if m = l then b l else 0 := by + intro l hlN + have hG := ginvCheck_sound P hginv hm (Finset.mem_range.mp hlN) + have hG' : ∑ k ∈ range N, ((Gm P par m k : ℚ) : ℝ) * ((mget (ginvM P par N) k l : ℚ) : ℝ) + = if m = l then 1 else 0 := by + have := congrArg (fun q : ℚ => (q : ℝ)) hG + push_cast at this + rw [this] + split_ifs <;> simp + have e : ∑ k ∈ range N, ((mget (ginvM P par N) k l : ℚ) : ℝ) * b l * ((Gm P par k m : ℚ) : ℝ) + = (∑ k ∈ range N, ((Gm P par m k : ℚ) : ℝ) * ((mget (ginvM P par N) k l : ℚ) : ℝ)) * b l := by + rw [Finset.sum_mul] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [Gm_symm P par k m] + ring + rw [e, hG'] + split_ifs <;> simp + rw [Finset.sum_congr rfl hδ, Finset.sum_ite_eq] + simp [Finset.mem_range.mpr hm] + rw [hsum] + simp [hbdef] + -- int h r = 0 + have hhr : ip (lR P) h r = 0 := by + rw [hhdef, ip_hfun_left P par N a hrc] + exact Finset.sum_eq_zero fun k hk => by rw [horth k (Finset.mem_range.mp hk), mul_zero] + -- tail transform and pole bounds + set A := A1 (lR P) h with hAdef + set B := A1 (lR P) r with hBdef + have hA0 : 0 ≤ A := A1_nonneg hl.le h + have hB0 : 0 ≤ B := A1_nonneg hl.le r + set X := ip (lR P) h h with hXdef + set Y := ip (lR P) r r with hYdef + have hsqX : A ^ 2 ≤ 2 * lR P * X := by + have := A1_sq_le hl hc + rw [hXdef]; unfold ip + have e : (fun x => h x ^ 2) = fun x => h x * h x := by funext x; ring + rwa [e] at this + have hsqY : B ^ 2 ≤ 2 * lR P * Y := by + have := A1_sq_le hl hrc + rw [hYdef]; unfold ip + have e : (fun x => r x ^ 2) = fun x => r x * r x := by funext x; ring + rwa [e] at this + have hX0 : 0 ≤ X := by + rw [hXdef]; unfold ip + exact intervalIntegral.integral_nonneg (by linarith) fun x _ => mul_self_nonneg _ + have hY0 : 0 ≤ Y := by + rw [hYdef]; unfold ip + exact intervalIntegral.integral_nonneg (by linarith) fun x _ => mul_self_nonneg _ + have hTr : ∀ t ∈ Set.Icc (0 : ℝ) (TR P), |Tr (lR P) par r t| ≤ epsW P (2 * N + par) t * B := by + intro t ht + have htl : t * lR P ≤ (2 * N + par + 1) / 2 := by + have h1 : t * lR P ≤ TR P * lR P := mul_le_mul_of_nonneg_right ht.2 hl.le + have h2 := (Rat.cast_le (K := ℝ)).mpr hN + push_cast at h2 + have e : TR P * lR P = ((P.T : ℚ) : ℝ) * ((P.ell : ℚ) : ℝ) := rfl + linarith + have := Tr_sub_le hl hpar hrc ht.1 htl + have hz : ∑ m ∈ range N, (-1) ^ m * (t * lR P) ^ (2 * m + par) / ((2 * m + par).factorial : ℝ) + * mo (lR P) r (2 * m + par) = 0 := + Finset.sum_eq_zero fun m hm => by rw [horth m (Finset.mem_range.mp hm), mul_zero] + rw [hz, sub_zero] at this + unfold epsW + exact this + set dN : ℝ := 2 * (lR P / 2) ^ (2 * N + par) / ((2 * N + par).factorial : ℝ) with hdN + have hdN0 : 0 ≤ dN := by rw [hdN]; positivity + have hPr : |Pl (lR P) par r| ≤ dN * B := by + have hNpos : 0 < 2 * N + par := by omega + have := Pl_sub_le hl (lR_half_le P hpc) hpar hNpos hrc + have hz : ∑ m ∈ range N, (lR P / 2) ^ (2 * m + par) / ((2 * m + par).factorial : ℝ) + * mo (lR P) r (2 * m + par) = 0 := + Finset.sum_eq_zero fun m hm => by rw [horth m (Finset.mem_range.mp hm), mul_zero] + rw [hz, sub_zero] at this + rw [hdN]; exact this + have hPh : |Pl (lR P) par h| ≤ ((P.Cp : ℚ) : ℝ) * A := by + have h1 := abs_Pl_le hl par hc + exact h1.trans (mul_le_mul_of_nonneg_right hs.cosh hA0) + have hTh : ∀ t, |Tr (lR P) par h t| ≤ A := fun t => abs_Tr_le hl par hc t + -- constants + have hpi := Real.pi_pos + have hpi3 : 3 ≤ Real.pi := Real.pi_gt_three.le + have hS0 := S0_nonneg P hpc + have hCp := Cp_nonneg P hpc + set I1 := ∫ t in (0 : ℝ)..(TR P), epsW P (2 * N + par) t with hI1 + set I2 := ∫ t in (0 : ℝ)..(TR P), epsW P (2 * N + par) t ^ 2 with hI2 + have hI10 : 0 ≤ I1 := intervalIntegral.integral_nonneg hT fun t ht => epsW_nonneg P hpc _ ht.1 + have hI20 : 0 ≤ I2 := intervalIntegral.integral_nonneg hT fun t _ => sq_nonneg _ + have hkap : ((kapT P par N : ℚ) : ℝ) = 2 * ((P.Cp : ℚ) : ℝ) * dN + ((P.S0 : ℚ) : ℝ) / 3 * I1 := by + rw [hI1, int_epsW] + unfold kapT dPT I1T + rw [hdN] + unfold lR TR + push_cast + ring + have hdT : ((dT P par N : ℚ) : ℝ) + = b0R P - 2 * lR P * (2 * dN ^ 2 + ((P.S0 : ℚ) : ℝ) / 3 * I2) := by + rw [hI2, int_epsW_sq] + unfold dT dPT I2T + rw [hdN] + unfold lR TR b0R + push_cast + ring + have hcP : Continuous fun t => sym t - b0R P := hsc.sub continuous_const + have cTh := continuous_Tr (lR P) par hc + have cTr := continuous_Tr (lR P) par hrc + have hce := continuous_epsW P (2 * N + par) + -- the coupling + have hcross : |Rb P sym par h r| ≤ ((kapT P par N : ℚ) : ℝ) * (A * B) := by + unfold Rb + rw [hhr, mul_zero, add_zero] + have h1 : |2 * epsR par * Pl (lR P) par h * Pl (lR P) par r| + ≤ 2 * ((P.Cp : ℚ) : ℝ) * dN * (A * B) := by + have he : |epsR par| = 1 := by unfold epsR; split_ifs <;> simp + rw [abs_mul, abs_mul, abs_mul, he, abs_two] + calc 2 * 1 * |Pl (lR P) par h| * |Pl (lR P) par r| + ≤ 2 * 1 * (((P.Cp : ℚ) : ℝ) * A) * (dN * B) := by gcongr + _ = 2 * ((P.Cp : ℚ) : ℝ) * dN * (A * B) := by ring + have h2 : |(1 / Real.pi) * ∫ t in (0 : ℝ)..(TR P), + (sym t - b0R P) * (Tr (lR P) par h t * Tr (lR P) par r t)| + ≤ ((P.S0 : ℚ) : ℝ) / 3 * I1 * (A * B) := by + rw [abs_mul, abs_of_pos (by positivity : (0 : ℝ) < 1 / Real.pi)] + have hb' := abs_int_le_of_abs_le' P hpc + (f := fun t => (sym t - b0R P) * (Tr (lR P) par h t * Tr (lR P) par r t)) + (g := fun t => ((P.S0 : ℚ) : ℝ) * (A * (epsW P (2 * N + par) t * B))) (by fun_prop) (by fun_prop) + (by + intro t ht + rw [abs_mul, abs_mul] + exact mul_le_mul (hs.bound t ht.1 ht.2) + (mul_le_mul (hTh t) (hTr t ht) (abs_nonneg _) hA0) (by positivity) hS0) + have e : ∫ t in (0 : ℝ)..(TR P), ((P.S0 : ℚ) : ℝ) * (A * (epsW P (2 * N + par) t * B)) + = ((P.S0 : ℚ) : ℝ) * I1 * (A * B) := by + rw [hI1] + have e2 : (fun t => ((P.S0 : ℚ) : ℝ) * (A * (epsW P (2 * N + par) t * B))) + = fun t => (((P.S0 : ℚ) : ℝ) * (A * B)) * epsW P (2 * N + par) t := by funext t; ring + rw [e2, intervalIntegral.integral_const_mul] + ring + rw [e] at hb' + have hSIAB : 0 ≤ ((P.S0 : ℚ) : ℝ) * I1 * (A * B) := by positivity + calc 1 / Real.pi * |∫ t in (0 : ℝ)..(TR P), + (sym t - b0R P) * (Tr (lR P) par h t * Tr (lR P) par r t)| + ≤ 1 / Real.pi * (((P.S0 : ℚ) : ℝ) * I1 * (A * B)) := + mul_le_mul_of_nonneg_left hb' (by positivity) + _ ≤ 1 / 3 * (((P.S0 : ℚ) : ℝ) * I1 * (A * B)) := + mul_le_mul_of_nonneg_right (one_div_le_one_div_of_le (by norm_num) hpi3) hSIAB + _ = ((P.S0 : ℚ) : ℝ) / 3 * I1 * (A * B) := by ring + rw [hkap] + calc |2 * epsR par * Pl (lR P) par h * Pl (lR P) par r + + (1 / Real.pi) * ∫ t in (0 : ℝ)..(TR P), + (sym t - b0R P) * (Tr (lR P) par h t * Tr (lR P) par r t)| + ≤ |2 * epsR par * Pl (lR P) par h * Pl (lR P) par r| + + |(1 / Real.pi) * ∫ t in (0 : ℝ)..(TR P), + (sym t - b0R P) * (Tr (lR P) par h t * Tr (lR P) par r t)| := + abs_add_le _ _ + _ ≤ 2 * ((P.Cp : ℚ) : ℝ) * dN * (A * B) + ((P.S0 : ℚ) : ℝ) / 3 * I1 * (A * B) := + add_le_add h1 h2 + _ = (2 * ((P.Cp : ℚ) : ℝ) * dN + ((P.S0 : ℚ) : ℝ) / 3 * I1) * (A * B) := by ring + -- the tail term + have htailR : ((dT P par N : ℚ) : ℝ) * Y ≤ Rb P sym par r r := by + unfold Rb + rw [← hYdef] + have h1 : -2 * dN ^ 2 * B ^ 2 ≤ 2 * epsR par * Pl (lR P) par r * Pl (lR P) par r := by + have hP2 : Pl (lR P) par r ^ 2 ≤ (dN * B) ^ 2 := + sq_le_sq' (abs_le.mp hPr).1 (abs_le.mp hPr).2 + unfold epsR + split_ifs + · nlinarith [sq_nonneg (Pl (lR P) par r)] + · nlinarith + have h2 : -(((P.S0 : ℚ) : ℝ) / 3 * I2 * B ^ 2) + ≤ (1 / Real.pi) * ∫ t in (0 : ℝ)..(TR P), + (sym t - b0R P) * (Tr (lR P) par r t * Tr (lR P) par r t) := by + have hb' := abs_int_le_of_abs_le' P hpc + (f := fun t => (sym t - b0R P) * (Tr (lR P) par r t * Tr (lR P) par r t)) + (g := fun t => ((P.S0 : ℚ) : ℝ) * (epsW P (2 * N + par) t ^ 2 * B ^ 2)) (by fun_prop) (by fun_prop) + (by + intro t ht + rw [abs_mul, abs_mul] + have hT' := hTr t ht + have hTT : |Tr (lR P) par r t| * |Tr (lR P) par r t| ≤ epsW P (2 * N + par) t ^ 2 * B ^ 2 := by + have := mul_le_mul hT' hT' (abs_nonneg _) + (by have := epsW_nonneg P hpc (2 * N + par) ht.1; positivity) + nlinarith + exact mul_le_mul (hs.bound t ht.1 ht.2) hTT (by positivity) hS0) + have e : ∫ t in (0 : ℝ)..(TR P), ((P.S0 : ℚ) : ℝ) * (epsW P (2 * N + par) t ^ 2 * B ^ 2) + = ((P.S0 : ℚ) : ℝ) * I2 * B ^ 2 := by + rw [hI2] + have e2 : (fun t => ((P.S0 : ℚ) : ℝ) * (epsW P (2 * N + par) t ^ 2 * B ^ 2)) + = fun t => (((P.S0 : ℚ) : ℝ) * B ^ 2) * epsW P (2 * N + par) t ^ 2 := by funext t; ring + rw [e2, intervalIntegral.integral_const_mul] + ring + rw [e] at hb' + have hSIB : 0 ≤ ((P.S0 : ℚ) : ℝ) * I2 * B ^ 2 := by positivity + have hq := neg_abs_le (∫ t in (0 : ℝ)..(TR P), + (sym t - b0R P) * (Tr (lR P) par r t * Tr (lR P) par r t)) + have h3 : -(1 / Real.pi) * (((P.S0 : ℚ) : ℝ) * I2 * B ^ 2) + ≤ (1 / Real.pi) * ∫ t in (0 : ℝ)..(TR P), + (sym t - b0R P) * (Tr (lR P) par r t * Tr (lR P) par r t) := by + have := mul_le_mul_of_nonneg_left (le_trans (neg_le_neg hb') hq) + (by positivity : (0 : ℝ) ≤ 1 / Real.pi) + linarith + have h4 : (1 / Real.pi) * (((P.S0 : ℚ) : ℝ) * I2 * B ^ 2) + ≤ 1 / 3 * (((P.S0 : ℚ) : ℝ) * I2 * B ^ 2) := + mul_le_mul_of_nonneg_right (one_div_le_one_div_of_le (by norm_num) hpi3) hSIB + linarith + rw [hdT] + have hK0 : (0 : ℝ) ≤ 2 * dN ^ 2 + ((P.S0 : ℚ) : ℝ) / 3 * I2 := by positivity + have hK := mul_le_mul_of_nonneg_left hsqY hK0 + have e1 : (b0R P - 2 * lR P * (2 * dN ^ 2 + ((P.S0 : ℚ) : ℝ) / 3 * I2)) * Y + = b0R P * Y - (2 * dN ^ 2 + ((P.S0 : ℚ) : ℝ) / 3 * I2) * (2 * lR P * Y) := by ring + have e2 : (2 * dN ^ 2 + ((P.S0 : ℚ) : ℝ) / 3 * I2) * B ^ 2 + = 2 * dN ^ 2 * B ^ 2 + ((P.S0 : ℚ) : ℝ) / 3 * I2 * B ^ 2 := by ring + rw [e1] + linarith [h1, h2, hK, e2] + -- the head term + have hhead : ((lam : ℚ) : ℝ) * X ≤ Rb P sym par h h := by + rw [hXdef, hhdef] + exact head_floor P hs hpc hb hpar htail hcert a + -- assembly + have hRv : Rb P sym par v v = Rb P sym par h h + 2 * Rb P sym par h r + Rb P sym par r r := by + rw [hvhr]; exact Rb_expand P hsc par hc hrc + have hIv : ip (lR P) v v = X + Y := by + have hs' : Continuous (fun x => h x + r x) := hc.add hrc + rw [hvhr, ip_add_left' _ hc hrc hs', ip_comm' _ h, ip_comm' _ r, ip_add_left' _ hc hrc hc, + ip_add_left' _ hc hrc hrc, ip_comm' _ r h, hhr, hXdef, hYdef] + ring + rw [hRv, hIv] + have hl1R : ((P.lamFloor : ℚ) : ℝ) ≤ ((lam : ℚ) : ℝ) := by exact_mod_cast hl1 + have hl2R : ((P.lamFloor : ℚ) : ℝ) ≤ ((dT P par N : ℚ) : ℝ) := by exact_mod_cast hl2 + have hl3R : 4 * ((kapT P par N : ℚ) : ℝ) ^ 2 * lR P ^ 2 + ≤ (((lam : ℚ) : ℝ) - ((P.lamFloor : ℚ) : ℝ)) * (((dT P par N : ℚ) : ℝ) - ((P.lamFloor : ℚ) : ℝ)) := by + have := (Rat.cast_le (K := ℝ)).mpr hl3 + push_cast at this + exact this + have hk0 : 0 ≤ ((kapT P par N : ℚ) : ℝ) := by rw [hkap]; positivity + -- 2x2: (lam - lam') X + (d - lam') Y >= 2 kap A B + set α := ((lam : ℚ) : ℝ) - ((P.lamFloor : ℚ) : ℝ) with hα + set δ := ((dT P par N : ℚ) : ℝ) - ((P.lamFloor : ℚ) : ℝ) with hδ + set κ := ((kapT P par N : ℚ) : ℝ) with hκ + have hα0 : 0 ≤ α := by rw [hα]; linarith + have hδ0 : 0 ≤ δ := by rw [hδ]; linarith + have hAB : (A * B) ^ 2 ≤ 4 * lR P ^ 2 * (X * Y) := by + have := mul_le_mul hsqX hsqY (sq_nonneg B) (by positivity) + nlinarith + have hkey : 2 * κ * (A * B) ≤ α * X + δ * Y := by + have hsq1 : (2 * κ * (A * B)) ^ 2 ≤ (α * X + δ * Y) ^ 2 := by + have e1 : (2 * κ * (A * B)) ^ 2 = 4 * κ ^ 2 * (A * B) ^ 2 := by ring + have e2 : 4 * κ ^ 2 * (A * B) ^ 2 ≤ 4 * κ ^ 2 * (4 * lR P ^ 2 * (X * Y)) := + mul_le_mul_of_nonneg_left hAB (by positivity) + have e3 : 4 * κ ^ 2 * (4 * lR P ^ 2 * (X * Y)) ≤ 4 * (α * δ) * (X * Y) := by + have := mul_le_mul_of_nonneg_right hl3R (by positivity : (0 : ℝ) ≤ 4 * (X * Y)) + nlinarith + have e4 : 4 * (α * δ) * (X * Y) ≤ (α * X + δ * Y) ^ 2 := by + nlinarith [sq_nonneg (α * X - δ * Y)] + linarith + have hpos : 0 ≤ α * X + δ * Y := by positivity + exact (pow_le_pow_iff_left₀ (by positivity) hpos (by norm_num : (2 : ℕ) ≠ 0)).mp hsq1 + have hcr := (abs_le.mp hcross).1 + have hl' : ((lam : ℚ) : ℝ) = α + ((P.lamFloor : ℚ) : ℝ) := by rw [hα]; ring + have hd' : ((dT P par N : ℚ) : ℝ) = δ + ((P.lamFloor : ℚ) : ℝ) := by rw [hδ]; ring + rw [hl'] at hhead + rw [hd'] at htailR + have e3 : (α + ((P.lamFloor : ℚ) : ℝ)) * X = α * X + ((P.lamFloor : ℚ) : ℝ) * X := by ring + have e4 : (δ + ((P.lamFloor : ℚ) : ℝ)) * Y = δ * Y + ((P.lamFloor : ℚ) : ℝ) * Y := by ring + rw [e3] at hhead + rw [e4] at htailR + have e5 : ((P.lamFloor : ℚ) : ℝ) * (X + Y) + = ((P.lamFloor : ℚ) : ℝ) * X + ((P.lamFloor : ℚ) : ℝ) * Y := by ring + rw [e5] + linarith [hkey, hhead, htailR, hcr] + +end KWin2 + +end diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Window.lean b/telperion/examples/rvm_bridge/lean/KWin2_Window.lean new file mode 100644 index 000000000..666e71a14 --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Window.lean @@ -0,0 +1,315 @@ +/- + KWin2_Window -- the generic assembly: a KWin2 certificate whose kernel checks all evaluate to + `true` proves Zhu's window floor, for every window with log 2 < 2L <= log 3 (prime comb {2}) + (rvm_bridge island, 2026-09-24). + + conjecture1_proved = False. A finite-window Weil positivity statement is NOT RH; not + Connes-Consani (pole terms kept); cf. PR #604. + + `windowFloor_of_cert`: given a KPar P, the head levels / sizes of both sectors, and + * the structural and head checks (parCheck, brkCheck, pieceCheck, minCheck, combCheck, + tailCond, ginvCheck) -- evaluated by the kernel per instance -- and the PSD property of both + head matrices (`HeadPSD`, from psdCert or psdCertR, also kernel-evaluated), + * `sideCheck P xT` -- the RATIONAL halves of the real side conditions, also kernel-evaluated: + |S - a0| + 2^-60 <= da (log 2 by its series), the sqrt 2 squeeze of c2 around c0, the + exp Taylor bound behind beta0 <= betaStar L T, the two ends of |Psi_L - beta0| <= S0 on + [0, T] (psiR monotone, the island's psiR(0) floor and Stirling at T, log(T/2) <= xT), and + cosh(l/2) <= Cp, + * gamma <= gamUp and log pi <= logPiUp (real facts, supplied per instance), + it returns WeilWindow.WindowFloor L lamFloor; `weil_positivity_of_windowFloor` turns a window + floor into the explicit-binder positivity for every smaller window. No `sorry`. +-/ +import KWin2_Split +import KWin2_Consts + +open Real MeasureTheory Set Finset + +noncomputable section + +namespace KWin2 +open KWin (Psi epsR ip continuous_v piHiQ pi_lt_Q psdCert one_le_log_pi) +open WeilWindow RvMBridgeZhu WeilExplicit RvMBridge11 RvMBridge30 + +/-! ## A. The rational side conditions. -/ + +/-- The point where `exp` is bounded above for `beta0 <= betaStar`. -/ +def qBeta (P : KPar) : ℚ := P.beta0 + 1 / P.T + P.c0 + P.dc + +/-- Taylor upper polynomial of `exp` at `x in [0, 1]` with `n` terms (Mathlib's `exp_bound'`). -/ +def expUp (x : ℚ) (n : ℕ) : ℚ := + (∑ m ∈ range n, x ^ m / (m.factorial : ℚ)) + x ^ n * (n + 1) / ((n.factorial : ℚ) * n) + +/-- Taylor lower polynomial of `exp` at `x >= 0` with `n` terms. -/ +def expLo (x : ℚ) (n : ℕ) : ℚ := ∑ i ∈ range n, x ^ i / (i.factorial : ℚ) + +/-- The rational halves of the real side conditions, one Boolean. -/ +def sideCheck (P : KPar) (xT : ℚ) : Bool := + decide (|log2S - P.a0| + (1 / 2) ^ 60 ≤ P.da) && + decide (P.c0 - P.dc ≤ 2 * (log2S - (1 / 2) ^ 60) / sq2hi) && + decide (2 * (log2S + (1 / 2) ^ 60) / sq2lo ≤ P.c0 + P.dc) && + decide (0 ≤ qBeta P / 4) && decide (qBeta P / 4 ≤ 1) && + decide (expUp (qBeta P / 4) 16 ^ 4 * (2 * piHiQ) ≤ P.T) && + decide (15 / 4 ≤ P.T) && + decide (-(8463 / 2000 : ℚ) - P.logPiUp - (P.c0 + P.dc) - P.beta0 ≥ -P.S0) && + decide (0 ≤ xT) && decide (P.T / 2 ≤ expLo xT 40) && + decide (xT + 13 / P.T ^ 2 - 1 + (P.c0 + P.dc) - P.beta0 ≤ P.S0) && + decide (P.ell ^ 2 / 8 ≤ 1) && decide (expUp (P.ell ^ 2 / 8) 6 ≤ P.Cp) + +theorem sideCheck_sound {P : KPar} {xT : ℚ} (h : sideCheck P xT = true) : + |log2S - P.a0| + (1 / 2) ^ 60 ≤ P.da + ∧ P.c0 - P.dc ≤ 2 * (log2S - (1 / 2) ^ 60) / sq2hi + ∧ 2 * (log2S + (1 / 2) ^ 60) / sq2lo ≤ P.c0 + P.dc + ∧ 0 ≤ qBeta P / 4 ∧ qBeta P / 4 ≤ 1 + ∧ expUp (qBeta P / 4) 16 ^ 4 * (2 * piHiQ) ≤ P.T + ∧ 15 / 4 ≤ P.T + ∧ -(8463 / 2000 : ℚ) - P.logPiUp - (P.c0 + P.dc) - P.beta0 ≥ -P.S0 + ∧ 0 ≤ xT ∧ P.T / 2 ≤ expLo xT 40 + ∧ xT + 13 / P.T ^ 2 - 1 + (P.c0 + P.dc) - P.beta0 ≤ P.S0 + ∧ P.ell ^ 2 / 8 ≤ 1 ∧ expUp (P.ell ^ 2 / 8) 6 ≤ P.Cp := by + unfold sideCheck at h + simp only [Bool.and_eq_true, decide_eq_true_eq] at h + obtain ⟨⟨⟨⟨⟨⟨⟨⟨⟨⟨⟨⟨h1, h2⟩, h3⟩, h4⟩, h5⟩, h6⟩, h7⟩, h8⟩, h9⟩, h10⟩, h11⟩, h12⟩, h13⟩ := h + exact ⟨h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11, h12, h13⟩ + +lemma expUp_cast (x : ℚ) (n : ℕ) : + ((expUp x n : ℚ) : ℝ) = (∑ m ∈ range n, (x : ℝ) ^ m / (m.factorial : ℝ)) + + (x : ℝ) ^ n * (n + 1) / ((n.factorial : ℝ) * n) := by + unfold expUp; push_cast; rfl + +lemma exp_le_expUp {x : ℚ} (h0 : 0 ≤ x) (h1 : x ≤ 1) {n : ℕ} (hn : 0 < n) : + Real.exp (x : ℝ) ≤ ((expUp x n : ℚ) : ℝ) := by + rw [expUp_cast] + exact Real.exp_bound' (by exact_mod_cast h0) (by exact_mod_cast h1) hn + +lemma expLo_le_exp {x : ℚ} (h0 : 0 ≤ x) (n : ℕ) : ((expLo x n : ℚ) : ℝ) ≤ Real.exp (x : ℝ) := by + unfold expLo + push_cast + exact Real.sum_le_exp_of_nonneg (by exact_mod_cast h0) n + +/-! ## B. The real side conditions from `sideCheck`. -/ + +section Side +variable {P : KPar} {xT : ℚ} (hs : sideCheck P xT = true) +include hs + +theorem log2_near_of : |Real.log 2 - ((P.a0 : ℚ) : ℝ)| ≤ ((P.da : ℚ) : ℝ) := by + have h1 := log2_near_S + have h2 : |((log2S : ℚ) : ℝ) - ((P.a0 : ℚ) : ℝ)| + (1 / 2) ^ 60 ≤ ((P.da : ℚ) : ℝ) := by + have := (Rat.cast_le (K := ℝ)).mpr (sideCheck_sound hs).1 + push_cast at this + exact this + calc |Real.log 2 - ((P.a0 : ℚ) : ℝ)| + ≤ |Real.log 2 - ((log2S : ℚ) : ℝ)| + |((log2S : ℚ) : ℝ) - ((P.a0 : ℚ) : ℝ)| := + abs_sub_le _ _ _ + _ ≤ (1 / 2) ^ 60 + |((log2S : ℚ) : ℝ) - ((P.a0 : ℚ) : ℝ)| := by linarith + _ ≤ ((P.da : ℚ) : ℝ) := by linarith + +theorem c2_near_of : |c2 - ((P.c0 : ℚ) : ℝ)| ≤ ((P.dc : ℚ) : ℝ) := by + obtain ⟨_, hlo_q, hhi_q, _⟩ := sideCheck_sound hs + rw [c2_eq] + obtain ⟨hs1, hs2⟩ := sqrt2_bounds + have hl := abs_le.mp log2_near_S + have hslo : (0 : ℝ) < ((sq2lo : ℚ) : ℝ) := by exact_mod_cast sq2lo_pos + have hsq : (0 : ℝ) < Real.sqrt 2 := by positivity + have hshi : (0 : ℝ) < ((sq2hi : ℚ) : ℝ) := by linarith + set S : ℝ := ((log2S : ℚ) : ℝ) with hSdef + set ε : ℝ := (1 / 2) ^ 60 with hε + have hlo : 2 * (S - ε) / ((sq2hi : ℚ) : ℝ) ≤ 2 * Real.log 2 / Real.sqrt 2 := by + rw [div_le_div_iff₀ hshi hsq] + have h1 : S - ε ≤ Real.log 2 := by linarith [hl.1] + have h2 : (S - ε) * Real.sqrt 2 ≤ Real.log 2 * ((sq2hi : ℚ) : ℝ) := by + calc (S - ε) * Real.sqrt 2 ≤ Real.log 2 * Real.sqrt 2 := + mul_le_mul_of_nonneg_right h1 hsq.le + _ ≤ Real.log 2 * ((sq2hi : ℚ) : ℝ) := + mul_le_mul_of_nonneg_left hs2 (Real.log_nonneg (by norm_num)) + linarith + have hhi : 2 * Real.log 2 / Real.sqrt 2 ≤ 2 * (S + ε) / ((sq2lo : ℚ) : ℝ) := by + rw [div_le_div_iff₀ hsq hslo] + have h1 : Real.log 2 ≤ S + ε := by linarith [hl.2] + have h2 : Real.log 2 * ((sq2lo : ℚ) : ℝ) ≤ (S + ε) * Real.sqrt 2 := by + calc Real.log 2 * ((sq2lo : ℚ) : ℝ) ≤ Real.log 2 * Real.sqrt 2 := + mul_le_mul_of_nonneg_left hs1 (Real.log_nonneg (by norm_num)) + _ ≤ (S + ε) * Real.sqrt 2 := mul_le_mul_of_nonneg_right h1 hsq.le + linarith + have hq1 : ((P.c0 : ℚ) : ℝ) - ((P.dc : ℚ) : ℝ) ≤ 2 * (S - ε) / ((sq2hi : ℚ) : ℝ) := by + have := (Rat.cast_le (K := ℝ)).mpr hlo_q + push_cast at this + rw [hSdef, hε]; exact this + have hq2 : 2 * (S + ε) / ((sq2lo : ℚ) : ℝ) ≤ ((P.c0 : ℚ) : ℝ) + ((P.dc : ℚ) : ℝ) := by + have := (Rat.cast_le (K := ℝ)).mpr hhi_q + push_cast at this + rw [hSdef, hε]; exact this + rw [abs_le] + constructor <;> linarith + +lemma c2_le_of : c2 ≤ ((P.c0 : ℚ) : ℝ) + ((P.dc : ℚ) : ℝ) := by + have := (abs_le.mp (c2_near_of hs)).2; linarith + +lemma TR_ge_of : (15 / 4 : ℝ) ≤ TR P := by + have := (Rat.cast_le (K := ℝ)).mpr (sideCheck_sound hs).2.2.2.2.2.2.1 + push_cast at this + unfold TR; exact this + +theorem beta0_le_betaStar_of {L : ℝ} (hL1 : Real.log 2 < 2 * L) (hL2 : 2 * L ≤ Real.log 3) : + b0R P ≤ betaStar L (TR P) := by + obtain ⟨_, _, _, hq0, hq1, hqT, hT, _⟩ := sideCheck_sound hs + unfold betaStar + rw [combMass_eq_two hL1 hL2] + have hc := c2_le_of hs + have hTpos : (0 : ℝ) < TR P := by have := TR_ge_of hs; linarith + have hq : ((qBeta P : ℚ) : ℝ) ≤ Real.log (TR P / (2 * Real.pi)) := by + rw [Real.le_log_iff_exp_le (by positivity)] + have e1 : Real.exp ((qBeta P : ℚ) : ℝ) = Real.exp (((qBeta P / 4 : ℚ) : ℝ)) ^ 4 := by + rw [← Real.exp_nat_mul]; congr 1; push_cast; ring + have e2 := exp_le_expUp hq0 hq1 (n := 16) (by norm_num) + have hpos : 0 ≤ Real.exp (((qBeta P / 4 : ℚ) : ℝ)) := (Real.exp_pos _).le + have hsq : Real.exp (((qBeta P / 4 : ℚ) : ℝ)) ^ 4 ≤ ((expUp (qBeta P / 4) 16 : ℚ) : ℝ) ^ 4 := + pow_le_pow_left₀ hpos e2 4 + have hTq : ((expUp (qBeta P / 4) 16 : ℚ) : ℝ) ^ 4 * (2 * ((piHiQ : ℚ) : ℝ)) ≤ TR P := by + have := (Rat.cast_le (K := ℝ)).mpr hqT + push_cast at this + unfold TR; exact this + have hpi := pi_lt_Q + have hpi0 := Real.pi_pos + rw [e1, le_div_iff₀ (by positivity)] + have h1 : Real.exp (((qBeta P / 4 : ℚ) : ℝ)) ^ 4 * (2 * Real.pi) + ≤ ((expUp (qBeta P / 4) 16 : ℚ) : ℝ) ^ 4 * (2 * Real.pi) := + mul_le_mul_of_nonneg_right hsq (by positivity) + have h2 : ((expUp (qBeta P / 4) 16 : ℚ) : ℝ) ^ 4 * (2 * Real.pi) + ≤ ((expUp (qBeta P / 4) 16 : ℚ) : ℝ) ^ 4 * (2 * ((piHiQ : ℚ) : ℝ)) := + mul_le_mul_of_nonneg_left (by linarith) (by positivity) + linarith + have hqd : ((qBeta P : ℚ) : ℝ) = b0R P + 1 / TR P + ((P.c0 : ℚ) : ℝ) + ((P.dc : ℚ) : ℝ) := by + unfold qBeta b0R TR; push_cast; ring + rw [hqd] at hq + linarith + +theorem sym_bound_of (hlp : Real.log Real.pi ≤ ((P.logPiUp : ℚ) : ℝ)) {L : ℝ} + (hL1 : Real.log 2 < 2 * L) (hL2 : 2 * L ≤ Real.log 3) : + ∀ t, 0 ≤ t → t ≤ TR P → |weilSymbol L t - b0R P| ≤ ((P.S0 : ℚ) : ℝ) := by + obtain ⟨_, _, _, _, _, _, _, hlo_q, hx0, hxT, hhi_q, _⟩ := sideCheck_sound hs + intro t ht0 htT + have hT := TR_ge_of hs + rw [weilSymbol_eq_two hL1 hL2] + unfold Psi + have hlow : psiR 0 ≤ psiR t := psiR_mono le_rfl (by rw [abs_of_nonneg ht0]; exact ht0) + have hup : psiR t ≤ psiR (TR P) := + psiR_mono ht0 (by rw [abs_of_pos (by linarith : (0 : ℝ) < TR P)]; exact htT) + have hfl := psiR_floor_0 + have hst := psiR_le_stirling (t := TR P) (by linarith) + have hlT : Real.log (TR P / 2) ≤ ((xT : ℚ) : ℝ) := by + rw [Real.log_le_iff_le_exp (by linarith)] + have h1 := expLo_le_exp hx0 40 + have h2 : TR P / 2 ≤ ((expLo xT 40 : ℚ) : ℝ) := by + have := (Rat.cast_le (K := ℝ)).mpr hxT + push_cast at this + unfold TR; exact this + linarith + have hlp1 := one_le_log_pi + have hc0 := c2_nonneg + have hcos1 := Real.cos_le_one (t * Real.log 2) + have hcos2 := Real.neg_one_le_cos (t * Real.log 2) + have hccos1 : c2 * Real.cos (t * Real.log 2) ≤ c2 := by nlinarith + have hccos2 : -c2 ≤ c2 * Real.cos (t * Real.log 2) := by nlinarith + have hc2 := c2_le_of hs + have hlo := (Rat.cast_le (K := ℝ)).mpr hlo_q + have hhi := (Rat.cast_le (K := ℝ)).mpr hhi_q + push_cast at hlo hhi + have hTT : ((P.T : ℚ) : ℝ) = TR P := rfl + rw [hTT] at hhi + unfold b0R + rw [abs_le] + constructor <;> nlinarith + +theorem cosh_of : Real.cosh (lR P / 2) ≤ ((P.Cp : ℚ) : ℝ) := by + obtain ⟨_, _, _, _, _, _, _, _, _, _, _, hl1, hcp⟩ := sideCheck_sound hs + have h := Real.cosh_le_exp_half_sq (lR P / 2) + have hx : (lR P / 2) ^ 2 / 2 = (((P.ell ^ 2 / 8 : ℚ)) : ℝ) := by unfold lR; push_cast; ring + rw [hx] at h + have e2 := exp_le_expUp (x := P.ell ^ 2 / 8) (by positivity) hl1 (n := 6) (by norm_num) + have hq : ((expUp (P.ell ^ 2 / 8) 6 : ℚ) : ℝ) ≤ ((P.Cp : ℚ) : ℝ) := by exact_mod_cast hcp + linarith + +end Side + +/-! ## C. The assembly. -/ + +/-- A real sector test: the common core of both sector floors. -/ +theorem sector_floor_core_of {P : KPar} {L : ℝ} {sym : ℝ → ℝ} (hsym : sym = weilSymbol L) + (hS : SymHyp P sym) (hpc : parCheck P = true) (hb : brkCheck P = true) + (hL1 : Real.log 2 < 2 * L) (hL2 : 2 * L ≤ Real.log 3) (hLl : L ≤ lR P) (hT : 15 / 4 ≤ TR P) + (hβ : b0R P ≤ betaStar L (TR P)) {par N : ℕ} (hpar : par = 0 ∨ par = 1) {lam : ℚ} + (htail : tailCond P par N lam = true) (hcert : HeadPSD (headMat P par N lam) N) + (hginv : ginvCheck P par N = true) {f : ℝ → ℂ} (hf : IsWeilTest f) (hre : ∀ x, (f x).im = 0) + (hpf : ∀ x, f (-x) = (epsR par : ℂ) * f x) (hs : tsupport f ⊆ Icc (-L) L) : + ((P.lamFloor : ℚ) : ℝ) * (∫ x : ℝ, ‖f x‖ ^ 2) ≤ (WeilForm.weilForm (WeilForm.autocorr f)).re := by + subst hsym + set v : ℝ → ℝ := fun u => (f u).re with hvdef + have hfv : f = fun u => (v u : ℂ) := by + funext u; exact Complex.ext (by simp [hvdef]) (by simp [hvdef, hre u]) + rw [hfv] at hf hs ⊢ + have hev : ∀ u, v (-u) = epsR par * v u := by + intro u + have h := congrArg Complex.re (hpf u) + rw [hfv] at h + simpa [epsR] using h + have hQ := Q_ge_Rb P hpc hL1 hL2 hLl hT hβ hpar hf hev hs + have hR := Rb_floor P hS hpc hb hpar htail hcert hginv (continuous_v hf) + have hl : (0 : ℝ) < lR P := lR_pos P hpc + have hip : ip (lR P) v v = ∫ x : ℝ, ‖(v x : ℂ)‖ ^ 2 := by + unfold ip + rw [← integral_eq_interval' hf hl hLl hs] + congr 1; funext x + rw [Complex.norm_real, Real.norm_eq_abs, sq_abs]; ring + rw [hip] at hR + linarith + +/-- **The generic window floor**: a KWin2 certificate whose kernel checks evaluate to `true` +proves `WindowFloor L lamFloor` for every window with log 2 < 2L <= log 3 inside [-l, l]. -/ +theorem windowFloor_of_cert (P : KPar) {L : ℝ} (NE NO : ℕ) (lamE lamO : ℚ) (xT : ℚ) + (hL1 : Real.log 2 < 2 * L) (hL2 : 2 * L ≤ Real.log 3) (hLl : L ≤ lR P) + (hγ : Real.eulerMascheroniConstant ≤ ((P.gamUp : ℚ) : ℝ)) + (hlp : Real.log Real.pi ≤ ((P.logPiUp : ℚ) : ℝ)) + (hside : sideCheck P xT = true) (hpc : parCheck P = true) (hb : brkCheck P = true) + (hpcs : pieceCheck P = true) (hm : minCheck P = true) (hcc : combCheck P = true) + (htE : tailCond P 0 NE lamE = true) (htO : tailCond P 1 NO lamO = true) + (hgE : ginvCheck P 0 NE = true) (hgO : ginvCheck P 1 NO = true) + (hcE : HeadPSD (headMat P 0 NE lamE) NE) (hcO : HeadPSD (headMat P 1 NO lamO) NO) : + WeilWindow.WindowFloor L ((P.lamFloor : ℚ) : ℝ) := by + have hS : SymHyp P (weilSymbol L) := + { cont := continuous_weilSymbol_two hL1 hL2 + bound := sym_bound_of hside hlp hL1 hL2 + minor := by + intro i hi t hti hti' + have h := sym_minorant P hb hpcs hm hcc hγ hlp (log2_near_of hside) (c2_near_of hside) + hi hti hti' + rw [weilSymbol_eq_two hL1 hL2] + exact h + cosh := cosh_of hside } + have hT := TR_ge_of hside + have hβ := beta0_le_betaStar_of hside hL1 hL2 + have hE : WeilWindow.EvenSectorFloor L ((P.lamFloor : ℚ) : ℝ) := by + intro f hf hre hev hs + exact sector_floor_core_of rfl hS hpc hb hL1 hL2 hLl hT hβ (par := 0) (Or.inl rfl) htE hcE hgE hf + hre (fun x => by rw [hev x]; simp [epsR]) hs + have hO : WeilWindow.OddSectorFloor L ((P.lamFloor : ℚ) : ℝ) := by + intro f hf hre hodd hs + exact sector_floor_core_of rfl hS hpc hb hL1 hL2 hLl hT hβ (par := 1) (Or.inr rfl) htO hcO hgO hf + hre (fun x => by rw [hodd x]; simp [epsR]) hs + exact windowFloor_of_sectors hE hO + +/-- A window floor with `lam >= 0` gives Weil positivity on every smaller window. -/ +theorem weil_positivity_of_windowFloor {L lam : ℝ} (hlam : 0 ≤ lam) (h : WeilWindow.WindowFloor L lam) + (g : ℝ → ℂ) (hg : WeilExplicit.IsWeilTest g) (L' : ℝ) (hL' : L' ≤ L) + (hsupp : tsupport g ⊆ Set.Icc (-L') L') : + 0 ≤ (WeilExplicit.weilForm (WeilExplicit.autocorr g)).re := by + have hs' : tsupport g ⊆ Icc (-L) L := hsupp.trans (Icc_subset_Icc (by linarith) hL') + have h1 := h g hg hs' + have hm : 0 ≤ ∫ x : ℝ, ‖g x‖ ^ 2 := integral_nonneg fun x => by positivity + have h2 : (0 : ℝ) ≤ lam * ∫ x : ℝ, ‖g x‖ ^ 2 := mul_nonneg hlam hm + rw [weilForm_autocorr_eq] at h1 + linarith + +end KWin2 + +end diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Window12.lean b/telperion/examples/rvm_bridge/lean/KWin2_Window12.lean new file mode 100644 index 000000000..11a9969ae --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Window12.lean @@ -0,0 +1,69 @@ +/- + KWin2_Window12 -- THE WINDOW FLOOR AT L = 1/2 (2L = 1, prime comb term n = 2 present), on the goal + node's full test class, with no Arb seam (rvm_bridge island, 2026-09-24). + + conjecture1_proved = False. A finite-window Weil positivity statement is NOT RH. As at the + prime-free edge (PR #604: on a window the Weil form IS the zero sum, so certifying its margin says + nothing new about the zeros), a positive floor here samples the low zeros and constrains none of + them; the numerical window floor is lambda*(1/2) ~ 9.38e-7 (Rayleigh-Ritz). Not Connes-Consani + / Yoshida (pole-free class, 2L <= log 2): the pole terms are kept and 2L = 1 > log 2. + + PROVED HERE, hypothesis-free (the guard prints only propext / Classical.choice / Quot.sound): + * windowFloor12 : WeilWindow.WindowFloor (1/2) (7/20000000) (lam = 3.5e-7); + * weil_positivity_window_half: for all g, L with L <= 1/2 and tsupport g in [-L, L], + 0 <= Re weilForm (autocorr g). + Route: KWin2_Window.windowFloor_of_cert, fed with the kernel evaluations of this file + (structural checks, `sideCheck`) and of KWin2_Cert12E / KWin2_Cert12O (the two head matrices, + certified by the ROUNDED checker psdCertR of KWin2_Round; KWin2_Cert12N is the negative control). + No `sorry`. +-/ +import KWin2_Window +import KWin2_Cert12E +import KWin2_Cert12O +import KWin2_Cert12N + +open Real + +namespace KWin2 +open KWin (log_pi_le) + +theorem par12 : parCheck P12 = true := by decide +kernel +theorem brk12 : brkCheck P12 = true := by decide +kernel +theorem piece12 : pieceCheck P12 = true := by decide +kernel +theorem min12 : minCheck P12 = true := by decide +kernel +theorem comb12 : combCheck P12 = true := by decide +kernel +theorem tailE12 : tailCond P12 0 31 lamE12 = true := by decide +kernel +theorem tailO12 : tailCond P12 1 29 lamO12 = true := by decide +kernel +theorem ginvE12 : ginvCheck P12 0 31 = true := by decide +kernel +theorem ginvO12 : ginvCheck P12 1 29 = true := by decide +kernel +/-- The rational side conditions at L = 1/2 (xT = 2.9958 >= log 20). -/ +theorem side12 : sideCheck P12 (29958 / 10000) = true := by decide +kernel + +lemma lR12 : lR P12 = 1 / 2 := by norm_num [lR, P12] + +lemma log_two_lt_12 : Real.log 2 < 2 * (1 / 2 : ℝ) := by + have := Real.log_two_lt_d9; norm_num at this ⊢; linarith + +lemma twoL_le_log_three_12 : 2 * (1 / 2 : ℝ) ≤ Real.log 3 := by + have h : (1 : ℝ) ≤ Real.log 3 := by + rw [Real.le_log_iff_exp_le (by norm_num)] + have := Real.exp_one_lt_d9; linarith + linarith + +/-- **THE WINDOW FLOOR AT L = 1/2**: every smooth compactly supported test `f` (complex, no +parity) supported in `[-1/2, 1/2]` has `Re weilForm (autocorr f) >= 3.5e-7 ||f||_2^2`. -/ +theorem windowFloor12 : WeilWindow.WindowFloor (1 / 2) (7 / 20000000) := by + have h := windowFloor_of_cert P12 31 29 lamE12 lamO12 (29958 / 10000) log_two_lt_12 + twoL_le_log_three_12 (by rw [lR12]) gamma_le32 log_pi_le side12 par12 brk12 piece12 min12 + comb12 tailE12 tailO12 ginvE12 ginvO12 (headPSD_of_psdCertR certE12) (headPSD_of_psdCertR certO12) + have e : ((P12.lamFloor : ℚ) : ℝ) = 7 / 20000000 := by norm_num [P12] + rwa [e] at h + +/-- **Weil positivity on every window with L <= 1/2** (goal node's full class, pole terms kept), +in the explicit-binder shape of `weil_positivity_prime_free_window`. -/ +theorem weil_positivity_window_half (g : ℝ → ℂ) (hg : WeilExplicit.IsWeilTest g) (L : ℝ) + (hL : L ≤ 1 / 2) (hsupp : tsupport g ⊆ Set.Icc (-L) L) : + 0 ≤ (WeilExplicit.weilForm (WeilExplicit.autocorr g)).re := + weil_positivity_of_windowFloor (by norm_num) windowFloor12 g hg L hL hsupp + +end KWin2 diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Window25.lean b/telperion/examples/rvm_bridge/lean/KWin2_Window25.lean new file mode 100644 index 000000000..22e6ef051 --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Window25.lean @@ -0,0 +1,316 @@ +/- + KWin2_Window25 -- THE WINDOW FLOOR AT L = 2/5, past the prime-free boundary, on the goal node's + full test class, with no Arb seam (rvm_bridge island, 2026-09-24). + + conjecture1_proved = False. A finite-window Weil positivity statement is NOT RH. PR #604 + recorded that at the prime-free edge the full-class margin is zero content (on a window the Weil + form IS the zero sum; certifying its margin says nothing new about the zeros); the same caveat + holds here: at 2L = 0.8 the numerical window floor is lambda*(2/5) ~ 1.82e-4 (Rayleigh-Ritz, + u-domain Legendre Galerkin), and a positive floor samples the low zeros, it constrains none of + them. Nor is this Connes-Consani (arXiv 2006.13771) or Yoshida: their theorems are for the + pole-free class and stop at 2L = log 2; this statement keeps the pole terms and is past log 2. + + WHAT IS NEW AGAINST KWin. At 2L = 0.8 > log 2 the prime comb of the Weil symbol is present: + weilSymbol (2/5) t = Re psi(1/4 + it/2) - log pi - (2 Lambda(2)/sqrt 2) cos(t log 2). + The certificate keeps it exactly on [0, T] (T = 24) inside the kernel-evaluated minorant (a + rational upper polynomial of c2 cos(t log 2), with log 2 and sqrt 2 enclosed in rationals by the + kernel-checked series log 2 = sum 2^-i / i and squares), and bounds it by its mass only beyond T + (beta0 = 0.318 <= betaStar(2/5, 24)). + + PROVED HERE, hypothesis-free (every numeric fact kernel-checked; the guard prints only + propext / Classical.choice / Quot.sound): + * evenSectorFloor25 / oddSectorFloor25: Zhu's sector floors at L = 2/5 with lam = 4e-5; + * windowFloor25 : WeilWindow.WindowFloor (2/5) (1/25000); + * weil_positivity_window_two_fifths: the explicit-binder positivity, in the shape of + weil_positivity_prime_free_window: for all g, L with L <= 2/5 and tsupport g in [-L, L], + 0 <= Re weilForm (autocorr g) (this contains the prime-free window, log 2 / 2 < 2/5). + THE ROUTE: Q(v) >= Rb v v (KWin2_Split, with the comb) >= (4e-5) int v^2 (KWin2_Tail: head + certificate KWin2_Cert25 + projection tail), then Zhu Lemma 6.1 (windowFloor_of_sectors). + No `sorry`. +-/ +import KWin2_Split +import KWin2_Cert25 +import KWin2_Consts + +open Real MeasureTheory Set Finset + +noncomputable section + +namespace KWin2 +open KWin (Psi epsR ip continuous_v gammaUpQ logPiUpQ gamma_le log_pi_le one_le_log_pi piHiQ pi_lt_Q psdCert + pi_gt_Q) +open WeilWindow RvMBridgeZhu WeilExplicit RvMBridge11 RvMBridge30 + +/-! ## A. Rational halves of the real side conditions (kernel). -/ + +theorem log2S_near : |log2S - P25.a0| + (1 / 2) ^ 60 ≤ P25.da := by decide +kernel + +/-- `c2 = 2 log 2 / sqrt 2` squeezed around `c0`. -/ +theorem c2_lo_q : P25.c0 - P25.dc ≤ 2 * (log2S - (1 / 2) ^ 60) / sq2hi := by decide +kernel +theorem c2_hi_q : 2 * (log2S + (1 / 2) ^ 60) / sq2lo ≤ P25.c0 + P25.dc := by decide +kernel + +/-- `beta0 + 1/24 + c0 + dc`, the point where `exp` is bounded above. -/ +def qBeta25 : ℚ := P25.beta0 + 1 / 24 + P25.c0 + P25.dc +theorem qBeta25_le : qBeta25 / 2 ≤ 1 := by decide +kernel +theorem qBeta25_nonneg : 0 ≤ qBeta25 / 2 := by decide +kernel + +/-- `exp(q/2)^2 * pi_hi <= 12` (Taylor upper bound, 12 terms). -/ +theorem beta25_q : ((∑ m ∈ range 12, (qBeta25 / 2) ^ m / (m.factorial : ℚ)) + + (qBeta25 / 2) ^ 12 * (12 + 1) / ((Nat.factorial 12 : ℚ) * 12)) ^ 2 * piHiQ ≤ 12 := by + decide +kernel + +/-- `12 <= exp(2.485)` (Taylor lower bound, 30 terms): `log 12 <= 2.485`. -/ +theorem log12_q : (12 : ℚ) ≤ ∑ i ∈ range 30, (2485 / 1000 : ℚ) ^ i / (i.factorial : ℚ) := by + decide +kernel + +/-- `exp(1/50) <= Cp` (Taylor upper bound, 4 terms). -/ +theorem cosh25_q : (∑ m ∈ range 4, (1 / 50 : ℚ) ^ m / (m.factorial : ℚ)) + + (1 / 50 : ℚ) ^ 4 * (4 + 1) / ((Nat.factorial 4 : ℚ) * 4) ≤ P25.Cp := by decide +kernel + +/-- The two ends of `|Psi_{2/5} - beta0| <= S0` as rational inequalities. -/ +theorem S0_lo_q : -(8463 / 2000 : ℚ) - logPiUpQ - (P25.c0 + P25.dc) - P25.beta0 ≥ -P25.S0 := by + decide +kernel +theorem S0_hi_q : (2485 / 1000 : ℚ) + 13 / 24 ^ 2 - 1 + (P25.c0 + P25.dc) - P25.beta0 ≤ P25.S0 := by + decide +kernel + +/-! ## B. The real side conditions. -/ + +lemma P25_ell : ((P25.ell : ℚ) : ℝ) = 2 / 5 := by norm_num [P25] +lemma P25_T : ((P25.T : ℚ) : ℝ) = 24 := by norm_num [P25] + +lemma lR25 : lR P25 = 2 / 5 := P25_ell +lemma TR25 : TR P25 = 24 := P25_T + +lemma log_two_lt_45 : Real.log 2 < 2 * (2 / 5 : ℝ) := by + have := Real.log_two_lt_d9; norm_num at this ⊢; linarith + +lemma twoL_le_log_three : 2 * (2 / 5 : ℝ) ≤ Real.log 3 := by + have h : (1 : ℝ) ≤ Real.log 3 := by + rw [Real.le_log_iff_exp_le (by norm_num)] + have := Real.exp_one_lt_d9; linarith + linarith + +/-- **`|log 2 - a0| <= da`.** -/ +theorem log2_near25 : |Real.log 2 - ((P25.a0 : ℚ) : ℝ)| ≤ ((P25.da : ℚ) : ℝ) := by + have h1 := log2_near_S + have h2 : |((log2S : ℚ) : ℝ) - ((P25.a0 : ℚ) : ℝ)| + (1 / 2) ^ 60 ≤ ((P25.da : ℚ) : ℝ) := by + have := (Rat.cast_le (K := ℝ)).mpr log2S_near + push_cast at this + exact this + calc |Real.log 2 - ((P25.a0 : ℚ) : ℝ)| + ≤ |Real.log 2 - ((log2S : ℚ) : ℝ)| + |((log2S : ℚ) : ℝ) - ((P25.a0 : ℚ) : ℝ)| := + abs_sub_le _ _ _ + _ ≤ (1 / 2) ^ 60 + |((log2S : ℚ) : ℝ) - ((P25.a0 : ℚ) : ℝ)| := by linarith + _ ≤ ((P25.da : ℚ) : ℝ) := by linarith + +/-- **`|c2 - c0| <= dc`**, `c2 = 2 Lambda(2)/sqrt 2`. -/ +theorem c2_near25 : |c2 - ((P25.c0 : ℚ) : ℝ)| ≤ ((P25.dc : ℚ) : ℝ) := by + rw [c2_eq] + obtain ⟨hs1, hs2⟩ := sqrt2_bounds + have hl := abs_le.mp log2_near_S + have hslo : (0 : ℝ) < ((sq2lo : ℚ) : ℝ) := by exact_mod_cast sq2lo_pos + have hsq : (0 : ℝ) < Real.sqrt 2 := by positivity + have hshi : (0 : ℝ) < ((sq2hi : ℚ) : ℝ) := by linarith + set S : ℝ := ((log2S : ℚ) : ℝ) with hSdef + set ε : ℝ := (1 / 2) ^ 60 with hε + have hSε : 0 ≤ S - ε := by + have := (Rat.cast_le (K := ℝ)).mpr log2S_ge + push_cast at this + rw [hSdef, hε]; linarith + have hlo : 2 * (S - ε) / ((sq2hi : ℚ) : ℝ) ≤ 2 * Real.log 2 / Real.sqrt 2 := by + rw [div_le_div_iff₀ hshi hsq] + have h1 : S - ε ≤ Real.log 2 := by linarith [hl.1] + have h2 : (S - ε) * Real.sqrt 2 ≤ Real.log 2 * ((sq2hi : ℚ) : ℝ) := by + calc (S - ε) * Real.sqrt 2 ≤ Real.log 2 * Real.sqrt 2 := + mul_le_mul_of_nonneg_right h1 hsq.le + _ ≤ Real.log 2 * ((sq2hi : ℚ) : ℝ) := + mul_le_mul_of_nonneg_left hs2 (by linarith) + linarith + have hhi : 2 * Real.log 2 / Real.sqrt 2 ≤ 2 * (S + ε) / ((sq2lo : ℚ) : ℝ) := by + rw [div_le_div_iff₀ hsq hslo] + have h1 : Real.log 2 ≤ S + ε := by linarith [hl.2] + have h2 : Real.log 2 * ((sq2lo : ℚ) : ℝ) ≤ (S + ε) * Real.sqrt 2 := by + calc Real.log 2 * ((sq2lo : ℚ) : ℝ) ≤ Real.log 2 * Real.sqrt 2 := + mul_le_mul_of_nonneg_left hs1 (Real.log_nonneg (by norm_num)) + _ ≤ (S + ε) * Real.sqrt 2 := mul_le_mul_of_nonneg_right h1 hsq.le + linarith + have hq1 : ((P25.c0 : ℚ) : ℝ) - ((P25.dc : ℚ) : ℝ) ≤ 2 * (S - ε) / ((sq2hi : ℚ) : ℝ) := by + have := (Rat.cast_le (K := ℝ)).mpr c2_lo_q + push_cast at this + rw [hSdef, hε]; exact this + have hq2 : 2 * (S + ε) / ((sq2lo : ℚ) : ℝ) ≤ ((P25.c0 : ℚ) : ℝ) + ((P25.dc : ℚ) : ℝ) := by + have := (Rat.cast_le (K := ℝ)).mpr c2_hi_q + push_cast at this + rw [hSdef, hε]; exact this + rw [abs_le] + constructor <;> linarith + +lemma c2_le25 : c2 ≤ ((P25.c0 : ℚ) : ℝ) + ((P25.dc : ℚ) : ℝ) := by + have := (abs_le.mp c2_near25).2; linarith + +/-- **`beta0 <= betaStar(2/5, 24)`.** -/ +theorem beta0_le_betaStar25 : b0R P25 ≤ betaStar (2 / 5) (TR P25) := by + unfold betaStar + rw [combMass_eq_two log_two_lt_45 twoL_le_log_three, TR25] + have hc := c2_le25 + have hq : ((qBeta25 : ℚ) : ℝ) ≤ Real.log (24 / (2 * Real.pi)) := by + rw [Real.le_log_iff_exp_le (by positivity)] + have hx0 : 0 ≤ ((qBeta25 : ℚ) : ℝ) / 2 := by + have := (Rat.cast_le (K := ℝ)).mpr qBeta25_nonneg; push_cast at this; exact this + have hx1 : ((qBeta25 : ℚ) : ℝ) / 2 ≤ 1 := by + have := (Rat.cast_le (K := ℝ)).mpr qBeta25_le; push_cast at this; exact this + have e1 : Real.exp ((qBeta25 : ℚ) : ℝ) = Real.exp (((qBeta25 : ℚ) : ℝ) / 2) ^ 2 := by + rw [← Real.exp_nat_mul]; congr 1; push_cast; ring + have e2 := Real.exp_bound' hx0 hx1 (n := 12) (by norm_num) + have hTq := (Rat.cast_le (K := ℝ)).mpr beta25_q + push_cast at hTq e2 + set Ts : ℝ := (∑ m ∈ range 12, (((qBeta25 : ℚ) : ℝ) / 2) ^ m / (m.factorial : ℝ)) + + (((qBeta25 : ℚ) : ℝ) / 2) ^ 12 * (12 + 1) / ((Nat.factorial 12 : ℝ) * 12) with hTs + have hpos : 0 ≤ Real.exp (((qBeta25 : ℚ) : ℝ) / 2) := (Real.exp_pos _).le + have hsq : Real.exp (((qBeta25 : ℚ) : ℝ) / 2) ^ 2 ≤ Ts ^ 2 := pow_le_pow_left₀ hpos e2 2 + have hpi := pi_lt_Q + have hpi0 := Real.pi_pos + rw [e1, show (24 : ℝ) / (2 * Real.pi) = 12 / Real.pi by field_simp; ring, le_div_iff₀ hpi0] + have h1 : Real.exp (((qBeta25 : ℚ) : ℝ) / 2) ^ 2 * Real.pi ≤ Ts ^ 2 * Real.pi := + mul_le_mul_of_nonneg_right hsq hpi0.le + have h2 : Ts ^ 2 * Real.pi ≤ Ts ^ 2 * ((piHiQ : ℚ) : ℝ) := + mul_le_mul_of_nonneg_left hpi.le (sq_nonneg _) + linarith + have hqd : ((qBeta25 : ℚ) : ℝ) = b0R P25 + 1 / 24 + ((P25.c0 : ℚ) : ℝ) + ((P25.dc : ℚ) : ℝ) := by + unfold qBeta25 b0R; push_cast; ring + rw [hqd] at hq + linarith + +/-- **`|weilSymbol (2/5) - beta0| <= S0` on `[0, 24]`.** -/ +theorem sym_bound25 : ∀ t, 0 ≤ t → t ≤ TR P25 → + |weilSymbol (2 / 5) t - b0R P25| ≤ ((P25.S0 : ℚ) : ℝ) := by + intro t ht0 htT + rw [TR25] at htT + rw [weilSymbol_eq_two log_two_lt_45 twoL_le_log_three] + unfold Psi + have hlow : psiR 0 ≤ psiR t := psiR_mono le_rfl (by rw [abs_of_nonneg ht0]; exact ht0) + have hup : psiR t ≤ psiR 24 := psiR_mono ht0 (by rw [abs_of_pos (by norm_num : (0 : ℝ) < 24)]; exact htT) + have hfl := psiR_floor_0 + have hst := psiR_le_stirling (t := 24) (by norm_num) + have h12 : Real.log ((24 : ℝ) / 2) = Real.log 12 := by norm_num + rw [h12] at hst + have hl12 : Real.log 12 ≤ 2485 / 1000 := by + rw [Real.log_le_iff_le_exp (by norm_num)] + have h := Real.sum_le_exp_of_nonneg (x := 2485 / 1000) (by norm_num) 30 + have hq' : (12 : ℝ) ≤ ∑ i ∈ range 30, (2485 / 1000 : ℝ) ^ i / (i.factorial : ℝ) := by + have := (Rat.cast_le (K := ℝ)).mpr log12_q + push_cast at this + exact this + linarith + have hlp := log_pi_le + have hlp1 := one_le_log_pi + have hc := c2_near25 + have hc0 := c2_nonneg + have hcos1 := Real.cos_le_one (t * Real.log 2) + have hcos2 := Real.neg_one_le_cos (t * Real.log 2) + have hccos1 : c2 * Real.cos (t * Real.log 2) ≤ c2 := by nlinarith + have hccos2 : -c2 ≤ c2 * Real.cos (t * Real.log 2) := by nlinarith + have hc2 := c2_le25 + have hlo := (Rat.cast_le (K := ℝ)).mpr S0_lo_q + have hhi := (Rat.cast_le (K := ℝ)).mpr S0_hi_q + push_cast at hlo hhi + unfold b0R + rw [abs_le] + constructor <;> nlinarith + +/-- **`cosh(l/2) <= Cp`.** -/ +theorem cosh25 : Real.cosh (lR P25 / 2) ≤ ((P25.Cp : ℚ) : ℝ) := by + rw [lR25] + have h := Real.cosh_le_exp_half_sq ((2 / 5 : ℝ) / 2) + have hx : ((2 / 5 : ℝ) / 2) ^ 2 / 2 = 1 / 50 := by norm_num + rw [hx] at h + have e2 := Real.exp_bound' (x := 1 / 50) (by norm_num) (by norm_num) (n := 4) (by norm_num) + have hq := (Rat.cast_le (K := ℝ)).mpr cosh25_q + push_cast at hq + linarith + +/-- **The symbol hypotheses at L = 2/5.** -/ +theorem symHyp25 : SymHyp P25 (weilSymbol (2 / 5)) where + cont := continuous_weilSymbol_two log_two_lt_45 twoL_le_log_three + bound := sym_bound25 + minor := by + intro i hi t hti hti' + have h := sym_minorant P25 brk25 piece25 min25 comb25 gamma_le log_pi_le log2_near25 c2_near25 + hi hti hti' + rw [weilSymbol_eq_two log_two_lt_45 twoL_le_log_three] + exact h + cosh := cosh25 + +/-! ## C. The sector floors and the window floor. -/ + +lemma lamFloor25_cast : ((P25.lamFloor : ℚ) : ℝ) = 1 / 25000 := by norm_num [P25] + +/-- A real sector test at L = 2/5: the common core of both sector floors. -/ +theorem sector_floor_core25 {par N : ℕ} (hpar : par = 0 ∨ par = 1) {lam : ℚ} + (htail : tailCond P25 par N lam = true) (hcert : psdCert (headMat P25 par N lam) N = true) + (hginv : ginvCheck P25 par N = true) {f : ℝ → ℂ} (hf : IsWeilTest f) (hre : ∀ x, (f x).im = 0) + (hpf : ∀ x, f (-x) = (epsR par : ℂ) * f x) (hs : tsupport f ⊆ Icc (-(2 / 5)) (2 / 5)) : + (1 / 25000 : ℝ) * (∫ x : ℝ, ‖f x‖ ^ 2) ≤ (WeilForm.weilForm (WeilForm.autocorr f)).re := by + set v : ℝ → ℝ := fun u => (f u).re with hvdef + have hfv : f = fun u => (v u : ℂ) := by + funext u; exact Complex.ext (by simp [hvdef]) (by simp [hvdef, hre u]) + rw [hfv] at hf hs ⊢ + have hev : ∀ u, v (-u) = epsR par * v u := by + intro u + have h := congrArg Complex.re (hpf u) + rw [hfv] at h + simpa [epsR] using h + have hLl : (2 / 5 : ℝ) ≤ lR P25 := by rw [lR25] + have hT : (15 / 4 : ℝ) ≤ TR P25 := by rw [TR25]; norm_num + have hQ := Q_ge_Rb P25 par25 log_two_lt_45 twoL_le_log_three hLl hT beta0_le_betaStar25 hpar hf hev hs + have hR := Rb_floor P25 symHyp25 par25 brk25 hpar htail (headPSD_of_psdCert hcert) hginv + (continuous_v hf) + have hl : (0 : ℝ) < lR P25 := lR_pos P25 par25 + have hip : ip (lR P25) v v = ∫ x : ℝ, ‖(v x : ℂ)‖ ^ 2 := by + unfold ip + rw [← integral_eq_interval' hf hl hLl hs] + congr 1; funext x + rw [Complex.norm_real, Real.norm_eq_abs, sq_abs]; ring + rw [lamFloor25_cast, hip] at hR + linarith + +theorem evenSectorFloor25 : WeilWindow.EvenSectorFloor (2 / 5) (1 / 25000) := by + intro f hf hre hev hs + exact sector_floor_core25 (par := 0) (N := 16) (Or.inl rfl) tailE25 certE25 ginvE25 hf hre + (fun x => by rw [hev x]; simp [epsR]) hs + +theorem oddSectorFloor25 : WeilWindow.OddSectorFloor (2 / 5) (1 / 25000) := by + intro f hf hre hodd hs + exact sector_floor_core25 (par := 1) (N := 14) (Or.inr rfl) tailO25 certO25 ginvO25 hf hre + (fun x => by rw [hodd x]; simp [epsR]) hs + +/-- **THE WINDOW FLOOR AT L = 2/5** (past the prime-free boundary, comb term n = 2 present): every +smooth compactly supported test `f` (complex, no parity) supported in `[-2/5, 2/5]` has +`Re weilForm (autocorr f) >= (1/25000) ||f||_2^2`. Hypothesis-free, no Arb seam. -/ +theorem windowFloor25 : WeilWindow.WindowFloor (2 / 5) (1 / 25000) := + windowFloor_of_sectors evenSectorFloor25 oddSectorFloor25 + +/-! ## D. The explicit-binder positivity. -/ + +/-- **Weil positivity on every window with L <= 2/5** (the goal node's full test class, pole terms +kept), in the explicit-binder shape of `weil_positivity_prime_free_window`. It contains the +prime-free window (log 2 / 2 < 2/5). -/ +theorem weil_positivity_window_two_fifths (g : ℝ → ℂ) (hg : WeilExplicit.IsWeilTest g) (L : ℝ) + (hL : L ≤ 2 / 5) (hsupp : tsupport g ⊆ Set.Icc (-L) L) : + 0 ≤ (WeilExplicit.weilForm (WeilExplicit.autocorr g)).re := by + have hs' : tsupport g ⊆ Icc (-(2 / 5)) (2 / 5) := hsupp.trans (Icc_subset_Icc (by linarith) hL) + have h := windowFloor25 g hg hs' + have hm : 0 ≤ ∫ x : ℝ, ‖g x‖ ^ 2 := integral_nonneg fun x => by positivity + have h2 : (0 : ℝ) ≤ (1 / 25000) * ∫ x : ℝ, ‖g x‖ ^ 2 := by positivity + rw [weilForm_autocorr_eq] at h + linarith + +/-- The prime-free window as a corollary (2L <= log 2 implies L <= 2/5). -/ +theorem weil_positivity_prime_free_window_of_two_fifths (g : ℝ → ℂ) (hg : WeilExplicit.IsWeilTest g) + (L : ℝ) (hL : 2 * L ≤ Real.log 2) (hsupp : tsupport g ⊆ Set.Icc (-L) L) : + 0 ≤ (WeilExplicit.weilForm (WeilExplicit.autocorr g)).re := + weil_positivity_window_two_fifths g hg L (by linarith [log_two_lt_45]) hsupp + +end KWin2 + +end diff --git a/telperion/examples/rvm_bridge/lean/KWin2_Window920.lean b/telperion/examples/rvm_bridge/lean/KWin2_Window920.lean new file mode 100644 index 000000000..c488704fc --- /dev/null +++ b/telperion/examples/rvm_bridge/lean/KWin2_Window920.lean @@ -0,0 +1,70 @@ +/- + KWin2_Window920 -- THE WINDOW FLOOR AT L = 9/20 (2L = 0.9, prime comb term n = 2 present), on the + goal node's full test class, with no Arb seam (rvm_bridge island, 2026-09-24). + + conjecture1_proved = False. A finite-window Weil positivity statement is NOT RH. As at the + prime-free edge (PR #604: on a window the Weil form IS the zero sum, so certifying its margin says + nothing new about the zeros), a positive floor here samples the low zeros and constrains none of + them; the numerical window floor is lambda*(9/20) ~ 1.62e-5 (Rayleigh-Ritz). Not Connes-Consani + / Yoshida (pole-free class, 2L <= log 2): the pole terms are kept and 2L = 0.9 > log 2. + + PROVED HERE, hypothesis-free (the guard prints only propext / Classical.choice / Quot.sound): + * windowFloor920 : WeilWindow.WindowFloor (9/20) (9/2000000) (lam = 4.5e-6); + * weil_positivity_window_nine_twentieths: for all g, L with L <= 9/20 and tsupport g in + [-L, L], 0 <= Re weilForm (autocorr g). + Route: the generic assembly KWin2_Window.windowFloor_of_cert, fed with the kernel evaluations of + this file (structural checks, the rational side conditions `sideCheck`) and of KWin2_Cert920E / + KWin2_Cert920O (the two head certificates; KWin2_Cert920N is the negative control). + No `sorry`. +-/ +import KWin2_Window +import KWin2_Cert920E +import KWin2_Cert920O +import KWin2_Cert920N + +open Real + +namespace KWin2 +open KWin (log_pi_le) + +theorem par920 : parCheck P920 = true := by decide +kernel +theorem brk920 : brkCheck P920 = true := by decide +kernel +theorem piece920 : pieceCheck P920 = true := by decide +kernel +theorem min920 : minCheck P920 = true := by decide +kernel +theorem comb920 : combCheck P920 = true := by decide +kernel +theorem tailE920 : tailCond P920 0 22 lamE920 = true := by decide +kernel +theorem tailO920 : tailCond P920 1 19 lamO920 = true := by decide +kernel +theorem ginvE920 : ginvCheck P920 0 22 = true := by decide +kernel +theorem ginvO920 : ginvCheck P920 1 19 = true := by decide +kernel +/-- The rational side conditions at L = 9/20 (xT = 2.7081 >= log 15). -/ +theorem side920 : sideCheck P920 (27081 / 10000) = true := by decide +kernel + +lemma lR920 : lR P920 = 9 / 20 := by norm_num [lR, P920] + +lemma log_two_lt_920 : Real.log 2 < 2 * (9 / 20 : ℝ) := by + have := Real.log_two_lt_d9; norm_num at this ⊢; linarith + +lemma twoL_le_log_three_920 : 2 * (9 / 20 : ℝ) ≤ Real.log 3 := by + have h : (1 : ℝ) ≤ Real.log 3 := by + rw [Real.le_log_iff_exp_le (by norm_num)] + have := Real.exp_one_lt_d9; linarith + linarith + +/-- **THE WINDOW FLOOR AT L = 9/20**: every smooth compactly supported test `f` (complex, no +parity) supported in `[-9/20, 9/20]` has `Re weilForm (autocorr f) >= 4.5e-6 ||f||_2^2`. -/ +theorem windowFloor920 : WeilWindow.WindowFloor (9 / 20) (9 / 2000000) := by + have h := windowFloor_of_cert P920 22 19 lamE920 lamO920 (27081 / 10000) log_two_lt_920 + twoL_le_log_three_920 (by rw [lR920]) gamma_le32 log_pi_le side920 par920 brk920 piece920 min920 + comb920 tailE920 tailO920 ginvE920 ginvO920 (headPSD_of_psdCert certE920) + (headPSD_of_psdCert certO920) + have e : ((P920.lamFloor : ℚ) : ℝ) = 9 / 2000000 := by norm_num [P920] + rwa [e] at h + +/-- **Weil positivity on every window with L <= 9/20** (goal node's full class, pole terms kept), +in the explicit-binder shape of `weil_positivity_prime_free_window`. -/ +theorem weil_positivity_window_nine_twentieths (g : ℝ → ℂ) (hg : WeilExplicit.IsWeilTest g) (L : ℝ) + (hL : L ≤ 9 / 20) (hsupp : tsupport g ⊆ Set.Icc (-L) L) : + 0 ≤ (WeilExplicit.weilForm (WeilExplicit.autocorr g)).re := + weil_positivity_of_windowFloor (by norm_num) windowFloor920 g hg L hL hsupp + +end KWin2 diff --git a/telperion/examples/rvm_bridge/lean/lakefile.toml b/telperion/examples/rvm_bridge/lean/lakefile.toml index 127dabe07..8bdef4269 100644 --- a/telperion/examples/rvm_bridge/lean/lakefile.toml +++ b/telperion/examples/rvm_bridge/lean/lakefile.toml @@ -6,7 +6,7 @@ name = "RvMBridge" # v4.32.0 islands (mirrormere, main) nor the v4.34.0-rc1 islands (missions/rh, li_positivity). # AxiomGuardRvMBridge is in defaultTargets so bare `lake build` compiles the guard and every # module it imports before CI runs `lake env lean AxiomGuardRvMBridge.lean` (cf. #448/#451). -defaultTargets = ["E6Bridge", "E6Bridge2", "E6Bridge3", "E6Bridge4", "E6Bridge5", "RvMBridgeGauss", "E6Bridge6", "E6Bridge7", "E6Bridge8", "E6Bridge9", "E6Bridge10", "E6Bridge11", "E6Bridge12", "E6Bridge13", "E6Bridge14", "E6Bridge15", "E6Bridge16", "E6Bridge18", "RvMBridgeXi", "E6Bridge17", "E6Bridge20", "E6Bridge21", "E6Bridge22", "E6Bridge19", "E6Bridge23", "E6Bridge25", "E6Bridge26", "E6Bridge24", "E6Bridge27", "E6Bridge28", "E6Bridge29", "E6Bridge30", "ZhuEnvelope", "ZhuSymbol", "ZhuLegendre", "ZhuParity", "ZhuSplit", "ZhuOrtho", "ZhuTail", "ZhuInstance", "W2cAssembly", "DogfoodComplexReImSplit", "DogfoodZeroSumMajorant", "KWin_Data", "KWin_Cert", "KWin_Constants", "KWin_Taylor", "KWin_Minorant", "KWin_Head", "KWin_Tail", "KWin_Split", "KWin_Window", "E6Bridge31", "E6Bridge32", "E6Bridge33", "E6Bridge34", "KWin_Bridge", "AxiomGuardRvMBridge"] +defaultTargets = ["E6Bridge", "E6Bridge2", "E6Bridge3", "E6Bridge4", "E6Bridge5", "RvMBridgeGauss", "E6Bridge6", "E6Bridge7", "E6Bridge8", "E6Bridge9", "E6Bridge10", "E6Bridge11", "E6Bridge12", "E6Bridge13", "E6Bridge14", "E6Bridge15", "E6Bridge16", "E6Bridge18", "RvMBridgeXi", "E6Bridge17", "E6Bridge20", "E6Bridge21", "E6Bridge22", "E6Bridge19", "E6Bridge23", "E6Bridge25", "E6Bridge26", "E6Bridge24", "E6Bridge27", "E6Bridge28", "E6Bridge29", "E6Bridge30", "ZhuEnvelope", "ZhuSymbol", "ZhuLegendre", "ZhuParity", "ZhuSplit", "ZhuOrtho", "ZhuTail", "ZhuInstance", "W2cAssembly", "DogfoodComplexReImSplit", "DogfoodZeroSumMajorant", "KWin_Data", "KWin_Cert", "KWin_Constants", "KWin_Taylor", "KWin_Minorant", "KWin_Head", "KWin_Tail", "KWin_Split", "KWin_Window", "E6Bridge31", "E6Bridge32", "E6Bridge33", "E6Bridge34", "KWin_Bridge", "KWin2_Data", "KWin2_Minorant", "KWin2_Round", "KWin2_Head", "KWin2_Tail", "KWin2_Split", "KWin2_Consts", "KWin2_Par25", "KWin2_Cert25", "KWin2_Window25", "KWin2_Window", "KWin2_Bridge", "AxiomGuardRvMBridge"] # anthropics/zeta-23-lean redirects to anthropics/formal-math; the Lean project is the # `zeta23/` subdirectory (package name `Zeta23`). Pinned to the exact commit that the E6 probe @@ -432,6 +432,86 @@ name = "E6Bridge34" [[lean_lib]] name = "KWin_Bridge" +# KWin2 (2026-09-24): the window certificate PAST the prime-free boundary (the prime comb enters at +# 2L > log 2), parametric in the window; first instance L = 2/5 (2L = 0.8, comb n = 2). Kernel-native, +# no Arb seam. A finite-window statement, NOT RH; not Connes-Consani (pole terms kept); cf. PR #604. +# conjecture1_proved = False. +[[lean_lib]] +name = "KWin2_Data" + +[[lean_lib]] +name = "KWin2_Minorant" + +[[lean_lib]] +name = "KWin2_Round" + +[[lean_lib]] +name = "KWin2_Head" + +[[lean_lib]] +name = "KWin2_Tail" + +[[lean_lib]] +name = "KWin2_Split" + +[[lean_lib]] +name = "KWin2_Consts" + +[[lean_lib]] +name = "KWin2_Par25" + +[[lean_lib]] +name = "KWin2_Cert25" + +[[lean_lib]] +name = "KWin2_Window25" + +[[lean_lib]] +name = "KWin2_Window" + +[[lean_lib]] +name = "KWin2_Bridge" + +[[lean_lib]] +name = "KWin2_Par920" + +[[lean_lib]] +name = "KWin2_Cert920E" + +[[lean_lib]] +name = "KWin2_Cert920O" + +[[lean_lib]] +name = "KWin2_Cert920N" + +[[lean_lib]] +name = "KWin2_Window920" + +[[lean_lib]] +name = "KWin2_Par12" + +[[lean_lib]] +name = "KWin2_Cert12E" + +[[lean_lib]] +name = "KWin2_Cert12O" + +[[lean_lib]] +name = "KWin2_Cert12N" + +[[lean_lib]] +name = "KWin2_Window12" + +# The HEAVY KWin2 instances (L = 9/20: ~17 GB peak, ~6 min kernel; L = 1/2: ~19 GB peak per +# sector, ~50 min kernel CPU) are registered but NOT in defaultTargets and NOT imported by +# AxiomGuardRvMBridge, so the hosted CI runner (16 GB) never evaluates them; their axioms are +# printed by this separate guard: lake build KWin2_GuardHeavy && lake env lean KWin2_GuardHeavy.lean +[[lean_lib]] +name = "KWin2_BridgeHeavy" + +[[lean_lib]] +name = "KWin2_GuardHeavy" + # The CI axiom guard, declared as a lib so `lake build` compiles it (and thus all its imports). [[lean_lib]] name = "AxiomGuardRvMBridge" From 1e96a6ab44d4fa09bd98e1de8c20176686b1e5a0 Mon Sep 17 00:00:00 2001 From: "Dr. Murphy" Date: Thu, 24 Sep 2026 11:59:17 -0400 Subject: [PATCH 2/7] mirrormere: register MM.weil_positivity_window_half (DRAFT); statement compiles against MMDefs; no grant before #607 Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01LMeoWeTz2Q3iSeLfqxfYo6 --- telperion/missions/mirrormere/lean/Statements.lean | 1 + .../Statements/MM_weil_positivity_window_half.lean | 7 +++++++ .../nodes/MM_weil_positivity_window_half.toml | 14 ++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 telperion/missions/mirrormere/lean/Statements/MM_weil_positivity_window_half.lean create mode 100644 telperion/missions/mirrormere/nodes/MM_weil_positivity_window_half.toml diff --git a/telperion/missions/mirrormere/lean/Statements.lean b/telperion/missions/mirrormere/lean/Statements.lean index b115c89ad..f17fe5460 100644 --- a/telperion/missions/mirrormere/lean/Statements.lean +++ b/telperion/missions/mirrormere/lean/Statements.lean @@ -39,3 +39,4 @@ import Statements.MM_rh_iff_theta_positivity import Statements.MM_theta_heat_monotone import Statements.MM_rh_iff_theta_widths import Statements.MM_weil_positivity_prime_free_window +import Statements.MM_weil_positivity_window_half diff --git a/telperion/missions/mirrormere/lean/Statements/MM_weil_positivity_window_half.lean b/telperion/missions/mirrormere/lean/Statements/MM_weil_positivity_window_half.lean new file mode 100644 index 000000000..3572d5171 --- /dev/null +++ b/telperion/missions/mirrormere/lean/Statements/MM_weil_positivity_window_half.lean @@ -0,0 +1,7 @@ +-- DO NOT EDIT BY HAND — generated by telperion mission; node MM_weil_positivity_window_half; sha256 e8ea9ae4f537da3f +import Mathlib +import Statements.MMDefs + +theorem weil_positivity_window_half (g : ℝ → ℂ) (hg : WeilExplicit.IsWeilTest g) (L : ℝ) + (hL : 2 * L ≤ 1) (hsupp : tsupport g ⊆ Set.Icc (-L) L) : + 0 ≤ (WeilExplicit.weilForm (WeilExplicit.autocorr g)).re := by sorry diff --git a/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_half.toml b/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_half.toml new file mode 100644 index 000000000..2fdb298a3 --- /dev/null +++ b/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_half.toml @@ -0,0 +1,14 @@ +created = "2026-09-24" +depends_on = ["MM_zeta_comb_membership_iff_rh"] +kind = "lemma" +name = "MM.weil_positivity_window_half" +statement_module = "Statements.MM_weil_positivity_window_half" +status = "draft" +title = "THE WEIL WINDOW PAST THE PRIME-FREE BOUNDARY, KERNEL-NATIVE (rvm_bridge island, KWin2_*, 2026-09-24): for every Weil test g with tsupport g in [-L, L] and 2L <= 1, Re weilForm (autocorr g) >= 0, with WindowFloor(1/2, 7/20000000) -- hypothesis-free, no Arb seam. The prime-2 comb term is present (2L = 1 > log 2) and accounted exactly; pole terms KEPT (goal-node test class; per PR #604 the small-L margin is zero content, NOT Connes-Consani). Finite window; conjecture1_proved = False" +updated = "2026-09-24" + +[proof] +artifact = "../../examples/rvm_bridge/lean/KWin2_BridgeHeavy.lean" +artifact_kind = "lean_module" +closure_clean = false +via = "direct" From 2bf7701f7d64b1cbfc5a9738d8dee0ce20a94cfc Mon Sep 17 00:00:00 2001 From: "Dr. Murphy" Date: Thu, 24 Sep 2026 12:02:49 -0400 Subject: [PATCH 3/7] mirrormere: register MM.weil_positivity_window_two_fifths (DRAFT, CI-buildable) instead of window_half (KWin2_BridgeHeavy needs 17-19 GB, above the 16 GB hosted runner, so CI cannot verify it) Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01LMeoWeTz2Q3iSeLfqxfYo6 --- telperion/missions/mirrormere/lean/Statements.lean | 2 +- .../Statements/MM_weil_positivity_window_half.lean | 7 ------- .../MM_weil_positivity_window_two_fifths.lean | 7 +++++++ .../nodes/MM_weil_positivity_window_half.toml | 14 -------------- .../MM_weil_positivity_window_two_fifths.toml | 14 ++++++++++++++ 5 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 telperion/missions/mirrormere/lean/Statements/MM_weil_positivity_window_half.lean create mode 100644 telperion/missions/mirrormere/lean/Statements/MM_weil_positivity_window_two_fifths.lean delete mode 100644 telperion/missions/mirrormere/nodes/MM_weil_positivity_window_half.toml create mode 100644 telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml diff --git a/telperion/missions/mirrormere/lean/Statements.lean b/telperion/missions/mirrormere/lean/Statements.lean index f17fe5460..1033e8d40 100644 --- a/telperion/missions/mirrormere/lean/Statements.lean +++ b/telperion/missions/mirrormere/lean/Statements.lean @@ -39,4 +39,4 @@ import Statements.MM_rh_iff_theta_positivity import Statements.MM_theta_heat_monotone import Statements.MM_rh_iff_theta_widths import Statements.MM_weil_positivity_prime_free_window -import Statements.MM_weil_positivity_window_half +import Statements.MM_weil_positivity_window_two_fifths diff --git a/telperion/missions/mirrormere/lean/Statements/MM_weil_positivity_window_half.lean b/telperion/missions/mirrormere/lean/Statements/MM_weil_positivity_window_half.lean deleted file mode 100644 index 3572d5171..000000000 --- a/telperion/missions/mirrormere/lean/Statements/MM_weil_positivity_window_half.lean +++ /dev/null @@ -1,7 +0,0 @@ --- DO NOT EDIT BY HAND — generated by telperion mission; node MM_weil_positivity_window_half; sha256 e8ea9ae4f537da3f -import Mathlib -import Statements.MMDefs - -theorem weil_positivity_window_half (g : ℝ → ℂ) (hg : WeilExplicit.IsWeilTest g) (L : ℝ) - (hL : 2 * L ≤ 1) (hsupp : tsupport g ⊆ Set.Icc (-L) L) : - 0 ≤ (WeilExplicit.weilForm (WeilExplicit.autocorr g)).re := by sorry diff --git a/telperion/missions/mirrormere/lean/Statements/MM_weil_positivity_window_two_fifths.lean b/telperion/missions/mirrormere/lean/Statements/MM_weil_positivity_window_two_fifths.lean new file mode 100644 index 000000000..65c3ffe42 --- /dev/null +++ b/telperion/missions/mirrormere/lean/Statements/MM_weil_positivity_window_two_fifths.lean @@ -0,0 +1,7 @@ +-- DO NOT EDIT BY HAND — generated by telperion mission; node MM_weil_positivity_window_two_fifths; sha256 f79ac0522710a3ea +import Mathlib +import Statements.MMDefs + +theorem weil_positivity_window_two_fifths (g : ℝ → ℂ) (hg : WeilExplicit.IsWeilTest g) (L : ℝ) + (hL : 2 * L ≤ 4 / 5) (hsupp : tsupport g ⊆ Set.Icc (-L) L) : + 0 ≤ (WeilExplicit.weilForm (WeilExplicit.autocorr g)).re := by sorry diff --git a/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_half.toml b/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_half.toml deleted file mode 100644 index 2fdb298a3..000000000 --- a/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_half.toml +++ /dev/null @@ -1,14 +0,0 @@ -created = "2026-09-24" -depends_on = ["MM_zeta_comb_membership_iff_rh"] -kind = "lemma" -name = "MM.weil_positivity_window_half" -statement_module = "Statements.MM_weil_positivity_window_half" -status = "draft" -title = "THE WEIL WINDOW PAST THE PRIME-FREE BOUNDARY, KERNEL-NATIVE (rvm_bridge island, KWin2_*, 2026-09-24): for every Weil test g with tsupport g in [-L, L] and 2L <= 1, Re weilForm (autocorr g) >= 0, with WindowFloor(1/2, 7/20000000) -- hypothesis-free, no Arb seam. The prime-2 comb term is present (2L = 1 > log 2) and accounted exactly; pole terms KEPT (goal-node test class; per PR #604 the small-L margin is zero content, NOT Connes-Consani). Finite window; conjecture1_proved = False" -updated = "2026-09-24" - -[proof] -artifact = "../../examples/rvm_bridge/lean/KWin2_BridgeHeavy.lean" -artifact_kind = "lean_module" -closure_clean = false -via = "direct" diff --git a/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml b/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml new file mode 100644 index 000000000..5ed46af8d --- /dev/null +++ b/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml @@ -0,0 +1,14 @@ +created = "2026-09-24" +depends_on = ["MM_zeta_comb_membership_iff_rh"] +kind = "lemma" +name = "MM.weil_positivity_window_two_fifths" +statement_module = "Statements.MM_weil_positivity_window_two_fifths" +status = "draft" +title = "THE WEIL WINDOW PAST THE PRIME-FREE BOUNDARY, KERNEL-NATIVE (rvm_bridge island, KWin2_*, 2026-09-24): for every Weil test g with tsupport g in [-L, L] and 2L <= 4/5, Re weilForm (autocorr g) >= 0, with WindowFloor(2/5, 1/25000) -- hypothesis-free, no Arb seam; the prime-2 comb term is present (2L = 0.8 > log 2) and accounted exactly; pole terms KEPT (goal-node class; not Connes-Consani). The same pipeline also proves L = 9/20 and L = 1/2 (KWin2_BridgeHeavy) but those need 17-19 GB RAM, above the 16 GB hosted CI runner, so they are NOT registered until CI can build them. Finite window; conjecture1_proved = False" +updated = "2026-09-24" + +[proof] +artifact = "../../examples/rvm_bridge/lean/KWin2_Bridge.lean" +artifact_kind = "lean_module" +closure_clean = false +via = "direct" From 5c6d6d7a3b06ae2affc49fb4dc36cf6dc872387e Mon Sep 17 00:00:00 2001 From: "Dr. Murphy" Date: Thu, 24 Sep 2026 15:24:50 -0400 Subject: [PATCH 4/7] missions: NOT_MIRRORS exemption for KWin2.expLo (rational Taylor lower bound, not BraggDefect.expLo) Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01LMeoWeTz2Q3iSeLfqxfYo6 --- telperion/src/telperion/missions/mirrors.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/telperion/src/telperion/missions/mirrors.py b/telperion/src/telperion/missions/mirrors.py index 07a732910..2584a138a 100644 --- a/telperion/src/telperion/missions/mirrors.py +++ b/telperion/src/telperion/missions/mirrors.py @@ -88,6 +88,11 @@ def declarations(path: Path) -> dict[str, str]: "from missions/rh RHDefs / WeilFormDefs for the Zhu window node (2026-09-23); against " "MMDefs's WeilExplicit.autocorr it is the same bare name in another namespace, exactly " "as the WeilFormDefs entry above.", + ("expLo", "rvm_bridge/lean/KWin2_Window.lean"): + "KWin2.expLo is `def expLo (x : ℚ) (n : ℕ) : ℚ`, the rational truncated exp Taylor sum " + "used as a lower bound in the KWin2 window certificates (2026-09-24); it is not a copy of " + "BraggDefect.expLo (MMDefs), a fixed real constant: same bare name, different namespace " + "and object.", } From 3fa979ba115daaa1a505ccbfdbf632d63b3cdccf Mon Sep 17 00:00:00 2001 From: "Dr. Murphy" Date: Thu, 24 Sep 2026 16:36:13 -0400 Subject: [PATCH 5/7] mirrormere: grant MM.weil_positivity_window_two_fifths under #607 provenance (honest labels) + rvm_bridge judge bundle merge cl/kwin (#615 grant) + main; read-back written in the author's session, recorded independence = "unverified"; granted via `mission grant` ([grant] digests, gate 2026-09-23.1; owner ruling 2026-09-24); rvm_bridge judge bundle regenerated (--check OK, 54 challenges). window_half (KWin2_BridgeHeavy) stays unregistered (outside CI). conjecture1_proved = False. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01LMeoWeTz2Q3iSeLfqxfYo6 --- .../missions/judge/rvm_bridge/MANIFEST.json | 11 ++++++++++ ...sitivity_window_two_fifths.comparator.json | 13 ++++++++++++ .../judge/rvm_bridge/MissionChallenges.lean | 1 + .../MM_weil_positivity_window_two_fifths.lean | 17 ++++++++++++++++ .../MM_weil_positivity_window_two_fifths.toml | 20 +++++++++++++++++-- 5 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 telperion/missions/judge/rvm_bridge/MM_weil_positivity_window_two_fifths.comparator.json create mode 100644 telperion/missions/judge/rvm_bridge/MissionChallenges/MM_weil_positivity_window_two_fifths.lean diff --git a/telperion/missions/judge/rvm_bridge/MANIFEST.json b/telperion/missions/judge/rvm_bridge/MANIFEST.json index d55b93d6b..392433965 100644 --- a/telperion/missions/judge/rvm_bridge/MANIFEST.json +++ b/telperion/missions/judge/rvm_bridge/MANIFEST.json @@ -258,6 +258,17 @@ "artifact_sha256": "2c4bc212327c00f147b41373496121cf3d54b9471eff6bb820088bbd54acd74f", "statement_sha256": "d4ff7d84406ce351f9b9ae81c66a2658ee01b814164581460b452aceb16dabdb" }, + { + "slug": "MM_weil_positivity_window_two_fifths", + "campaign": "mirrormere", + "theorem": "weil_positivity_window_two_fifths", + "solution_module": "KWin2_Bridge", + "challenge_module": "MissionChallenges.MM_weil_positivity_window_two_fifths", + "bridge_theorem": "MissionJudge.MM_weil_positivity_window_two_fifths", + "config": "MM_weil_positivity_window_two_fifths.comparator.json", + "artifact_sha256": "f868b4155ff67f58dac9a00d8b71eb00431ca92686bc884d8c1b0c8cf81003bb", + "statement_sha256": "90d7335afab6d23b698eff1321e21528a66624d4b1915c913455e4f7fcd25a00" + }, { "slug": "MM_zeta_comb_membership_iff_rh", "campaign": "mirrormere", diff --git a/telperion/missions/judge/rvm_bridge/MM_weil_positivity_window_two_fifths.comparator.json b/telperion/missions/judge/rvm_bridge/MM_weil_positivity_window_two_fifths.comparator.json new file mode 100644 index 000000000..bc7c7c55a --- /dev/null +++ b/telperion/missions/judge/rvm_bridge/MM_weil_positivity_window_two_fifths.comparator.json @@ -0,0 +1,13 @@ +{ + "challenge_module": "MissionChallenges.MM_weil_positivity_window_two_fifths", + "solution_module": "MissionChallenges.MM_weil_positivity_window_two_fifths", + "theorem_names": [ + "MissionJudge.MM_weil_positivity_window_two_fifths" + ], + "permitted_axioms": [ + "propext", + "Quot.sound", + "Classical.choice" + ], + "enable_nanoda": true +} diff --git a/telperion/missions/judge/rvm_bridge/MissionChallenges.lean b/telperion/missions/judge/rvm_bridge/MissionChallenges.lean index 319d06788..ee404f5a9 100644 --- a/telperion/missions/judge/rvm_bridge/MissionChallenges.lean +++ b/telperion/missions/judge/rvm_bridge/MissionChallenges.lean @@ -21,6 +21,7 @@ import MissionChallenges.MM_wall_map import MissionChallenges.MM_weil_positivity_implies_rh import MissionChallenges.MM_weil_positivity_implies_rh_of_gaussian import MissionChallenges.MM_weil_positivity_prime_free_window +import MissionChallenges.MM_weil_positivity_window_two_fifths import MissionChallenges.MM_zeta_comb_membership_iff_rh import MissionChallenges.MM_zeta_ordinates_not_uniformly_discrete import MissionChallenges.RH_bl_closed_form_five_nonneg diff --git a/telperion/missions/judge/rvm_bridge/MissionChallenges/MM_weil_positivity_window_two_fifths.lean b/telperion/missions/judge/rvm_bridge/MissionChallenges/MM_weil_positivity_window_two_fifths.lean new file mode 100644 index 000000000..0cfefd22d --- /dev/null +++ b/telperion/missions/judge/rvm_bridge/MissionChallenges/MM_weil_positivity_window_two_fifths.lean @@ -0,0 +1,17 @@ +/- DO NOT EDIT BY HAND -- generated by telperion.missions.judge. + Comparator CHALLENGE for registry node mirrormere/MM_weil_positivity_window_two_fifths. + The TYPE below is the registered statement, missions/mirrormere/lean/Statements/ + MM_weil_positivity_window_two_fifths.lean (header sha256 f79ac0522710a3ea), binders and conclusion verbatim; the + PROOF is the artifact constant `weil_positivity_window_two_fifths` from KWin2_Bridge. Both kernels + accept this module only if the artifact proves exactly the registered proposition. + The AxiomGuard imports load the whole island, so a vocabulary constant shadowed by + the artifact is a duplicate declaration here, not a silent substitution. The + `namespace` and the `open` lines inside it are the artifact's own at its + declaration, so every name in the statement resolves exactly as it does there. -/ +import KWin2_Bridge +import AxiomGuardRvMBridge + +theorem MissionJudge.MM_weil_positivity_window_two_fifths : + ∀ (g : ℝ → ℂ) (hg : WeilExplicit.IsWeilTest g) (L : ℝ) + (hL : 2 * L ≤ 4 / 5) (hsupp : tsupport g ⊆ Set.Icc (-L) L), 0 ≤ (WeilExplicit.weilForm (WeilExplicit.autocorr g)).re := + weil_positivity_window_two_fifths diff --git a/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml b/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml index 5ed46af8d..fadf171af 100644 --- a/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml +++ b/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml @@ -3,12 +3,28 @@ depends_on = ["MM_zeta_comb_membership_iff_rh"] kind = "lemma" name = "MM.weil_positivity_window_two_fifths" statement_module = "Statements.MM_weil_positivity_window_two_fifths" -status = "draft" +status = "proved" title = "THE WEIL WINDOW PAST THE PRIME-FREE BOUNDARY, KERNEL-NATIVE (rvm_bridge island, KWin2_*, 2026-09-24): for every Weil test g with tsupport g in [-L, L] and 2L <= 4/5, Re weilForm (autocorr g) >= 0, with WindowFloor(2/5, 1/25000) -- hypothesis-free, no Arb seam; the prime-2 comb term is present (2L = 0.8 > log 2) and accounted exactly; pole terms KEPT (goal-node class; not Connes-Consani). The same pipeline also proves L = 9/20 and L = 1/2 (KWin2_BridgeHeavy) but those need 17-19 GB RAM, above the 16 GB hosted CI runner, so they are NOT registered until CI can build them. Finite window; conjecture1_proved = False" updated = "2026-09-24" +[grant] +artifact_sha256 = "f868b4155ff67f58dac9a00d8b71eb00431ca92686bc884d8c1b0c8cf81003bb" +date = "2026-09-24" +gate_version = "2026-09-23.1" +identity = "dr.murphy.is.in@arda-dao.com" +session = "ef083c48-579d-4bec-a689-c30fdccec2a1" +statement_sha256 = "90d7335afab6d23b698eff1321e21528a66624d4b1915c913455e4f7fcd25a00" + [proof] artifact = "../../examples/rvm_bridge/lean/KWin2_Bridge.lean" artifact_kind = "lean_module" -closure_clean = false +closure_clean = true via = "direct" + +[readback] +auditor = "author session (self-attested; not independent)" +auditor_identity = "dr.murphy.is.in@arda-dao.com" +auditor_session = "ef083c48-579d-4bec-a689-c30fdccec2a1" +date = "2026-09-24" +independence = "unverified" +text = "Formal statement, read in the author's own session (so this read-back is NOT independent; the Comparator judge is the independent check that the artifact proves exactly this type). For every g : R -> C that is C-infinity with compact support (IsWeilTest), and every real L with 2L <= 4/5 and tsupport g inside [-L, L], the real part of weilForm(autocorr g) is >= 0, with weilForm = archSide - primeSide (both pole terms H(0), H(1) kept) and autocorr g u = int g(v) conj g(v-u) dv. Since 4/5 > log 2 (about 0.693), the support [-2L, 2L] of autocorr g can reach u = +-log 2, so the prime side is NOT empty: exactly the n = 2 term Lambda(2)/sqrt 2 (f(log 2) + f(-log 2)) can be nonzero (log 3 is about 1.10 > 4/5). So this is positivity of the Weil functional past the prime-free boundary, including one prime. Not vacuous: the class contains nonzero bumps for every L > 0. Strictly stronger than MM_weil_positivity_prime_free_window, whose hypothesis 2L <= log 2 implies 2L <= 4/5. It does not imply RH: Weil's criterion needs every support width, and this covers only 2L <= 4/5." From 8e9b4cbfeaf2176fc0cace54fad620110bf44fe8 Mon Sep 17 00:00:00 2001 From: "Dr. Murphy" Date: Fri, 25 Sep 2026 13:54:08 -0400 Subject: [PATCH 6/7] missions: heavy_certificates on the KWin2 node (judge runs Lean-kernel-only) `MM_weil_positivity_window_two_fifths` declares `heavy_certificates = true`, so the Comparator judge writes its config with `enable_nanoda = false`: the Lean kernel replay and the export axiom whitelist still run, the second (nanoda) kernel does not. The L = 1/2 window certificates are the heaviest in the registry (~1100 s and ~16 GB per decide in the local rebuild), well past what a 16 GB runner survives with two kernels. Merged cl/kwin in, which carries main (#632's flag, swap step and dispatch filter, #625's `ulimit -s unlimited`) and the same flag on the prime-free-window node. The two heavy nodes land in different shards -- prime-free in rvm_bridge 2/4, two-fifths in 3/4 -- so each shard has at most one heavy node and gets the swap step only where it is needed. Judge bundle regenerated; `judge --island rvm_bridge --check` matches the registry (54 challenges) and both heavy nodes' config rows read `lean-kernel-only`. `mission verify` is OK on all four campaigns. The records follow once the shards pass, as `comparator-record --lean-kernel-only`. No Lean source changes; no status change; conjecture1_proved = False. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_017icTazCuXLgRx61VNRAZWU --- telperion/missions/judge/rvm_bridge/MANIFEST.json | 1 + .../MM_weil_positivity_window_two_fifths.comparator.json | 2 +- .../mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/telperion/missions/judge/rvm_bridge/MANIFEST.json b/telperion/missions/judge/rvm_bridge/MANIFEST.json index 182b0978c..a9e5c20f2 100644 --- a/telperion/missions/judge/rvm_bridge/MANIFEST.json +++ b/telperion/missions/judge/rvm_bridge/MANIFEST.json @@ -289,6 +289,7 @@ "challenge_module": "MissionChallenges.MM_weil_positivity_window_two_fifths", "bridge_theorem": "MissionJudge.MM_weil_positivity_window_two_fifths", "config": "MM_weil_positivity_window_two_fifths.comparator.json", + "nanoda": false, "artifact_sha256": "f868b4155ff67f58dac9a00d8b71eb00431ca92686bc884d8c1b0c8cf81003bb", "statement_sha256": "90d7335afab6d23b698eff1321e21528a66624d4b1915c913455e4f7fcd25a00" }, diff --git a/telperion/missions/judge/rvm_bridge/MM_weil_positivity_window_two_fifths.comparator.json b/telperion/missions/judge/rvm_bridge/MM_weil_positivity_window_two_fifths.comparator.json index bc7c7c55a..3b672509b 100644 --- a/telperion/missions/judge/rvm_bridge/MM_weil_positivity_window_two_fifths.comparator.json +++ b/telperion/missions/judge/rvm_bridge/MM_weil_positivity_window_two_fifths.comparator.json @@ -9,5 +9,5 @@ "Quot.sound", "Classical.choice" ], - "enable_nanoda": true + "enable_nanoda": false } diff --git a/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml b/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml index fadf171af..63282ae1c 100644 --- a/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml +++ b/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml @@ -1,5 +1,6 @@ created = "2026-09-24" depends_on = ["MM_zeta_comb_membership_iff_rh"] +heavy_certificates = true kind = "lemma" name = "MM.weil_positivity_window_two_fifths" statement_module = "Statements.MM_weil_positivity_window_two_fifths" From 63d9e7b6433647a206c1c90cab586bef754781a6 Mon Sep 17 00:00:00 2001 From: "Dr. Murphy" Date: Fri, 25 Sep 2026 16:42:29 -0400 Subject: [PATCH 7/7] missions: record the Lean-kernel-only Comparator pass on the KWin2 node `judge rvm_bridge 3/4` of run 36170028959 (job 108205123231) passed 13/13. The line for this node is COMPARATOR PASS island=rvm_bridge node=MM_weil_positivity_window_two_fifths theorem=weil_positivity_window_two_fifths run=36170028959 kernel=lean-kernel-only and the other twelve nodes of that shard print `kernel=nanoda`, so the flag took the second kernel off this node alone. All four rvm_bridge shards of the run passed, so the other heavy node (prime-free window, shard 2/4 here) passed on this branch too. The recorded artifact sha256 (f868b415...) equals the one in `[grant]`: the judge checked the artifact the grant pinned. `provenance-report` now prints "Lean kernel only (heavy_certificates: nanoda not run)" for both heavy nodes. Also merged cl/kwin, which carries the prime-free-window record, so this branch states both verdicts. This record additionally pins `job_id`, `job_url` and the observed `kernel_mode`. The run's own conclusion is not a usable anchor: pushing a record onto the same pull request supersedes the run that validated the artifact (missions-comparator cancels in-progress runs on pull_request), so cl/kwin's run 36169770951 now reads "cancelled" although the job that judged the node succeeded. The job plus the artifact hash are what a verifier can check. Those three fields come from a schema addition that is not on main yet (PR pending); code without it ignores them, which I checked by loading this node with the branch's own registry loader. `mission verify` OK on all four campaigns; `judge --island rvm_bridge --check` matches the registry (54 challenges). No status change, no Lean source change; conjecture1_proved = False. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_017icTazCuXLgRx61VNRAZWU --- .../nodes/MM_weil_positivity_window_two_fifths.toml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml b/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml index 63282ae1c..15c24c786 100644 --- a/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml +++ b/telperion/missions/mirrormere/nodes/MM_weil_positivity_window_two_fifths.toml @@ -6,7 +6,18 @@ name = "MM.weil_positivity_window_two_fifths" statement_module = "Statements.MM_weil_positivity_window_two_fifths" status = "proved" title = "THE WEIL WINDOW PAST THE PRIME-FREE BOUNDARY, KERNEL-NATIVE (rvm_bridge island, KWin2_*, 2026-09-24): for every Weil test g with tsupport g in [-L, L] and 2L <= 4/5, Re weilForm (autocorr g) >= 0, with WindowFloor(2/5, 1/25000) -- hypothesis-free, no Arb seam; the prime-2 comb term is present (2L = 0.8 > log 2) and accounted exactly; pole terms KEPT (goal-node class; not Connes-Consani). The same pipeline also proves L = 9/20 and L = 1/2 (KWin2_BridgeHeavy) but those need 17-19 GB RAM, above the 16 GB hosted CI runner, so they are NOT registered until CI can build them. Finite window; conjecture1_proved = False" -updated = "2026-09-24" +updated = "2026-09-25" + +[comparator] +artifact_sha256 = "f868b4155ff67f58dac9a00d8b71eb00431ca92686bc884d8c1b0c8cf81003bb" +date = "2026-09-25" +job_id = "108205123231" +job_url = "https://github.com/DrMurphyIsIn/Arda/actions/runs/36170028959/job/108205123231" +kernel_mode = "lean-kernel-only" +run_id = "36170028959" +run_url = "https://github.com/DrMurphyIsIn/Arda/actions/runs/36170028959" +second_kernel = "none: heavy_certificates" +theorem = "weil_positivity_window_two_fifths" [grant] artifact_sha256 = "f868b4155ff67f58dac9a00d8b71eb00431ca92686bc884d8c1b0c8cf81003bb"