Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions zeta23/Solution.lean
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@ exactly the statement of its Challenge namesake and uses only the permitted axio
-/
import ChallengeDeps
import Zeta23.Unconditional
import Zeta23.FinalMult
import Zeta23.ThmD.Final
import Zeta23.ThmD.Mult
import Zeta23.ThmE.Final
import Zeta23.ThmE.Mult
import Zeta23.ThmDE.Final
import Zeta23.ThmDE.Mult

noncomputable section
Expand Down
1 change: 0 additions & 1 deletion zeta23/Solution/XiPrime.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
SPDX-License-Identifier: Apache-2.0
-/
import ChallengeDeps.XiPrime
import Zeta23.XiPrime.ExplicitFormula.ZeroFree
import Zeta23.XiPrime.Final

noncomputable section
Expand Down
7 changes: 0 additions & 7 deletions zeta23/Zeta23.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@ SPDX-License-Identifier: Apache-2.0
-/
-- Zeta23.lean — root of library Zeta23: the headline modules (see README.md).
import Zeta23.Unconditional
import Zeta23.ThmD.Final
import Zeta23.ThmE.Final
import Zeta23.ThmDE.Final
import Zeta23.FinalMult
import Zeta23.ThmD.Mult
import Zeta23.ThmE.Mult
import Zeta23.ThmDE.Mult
import Zeta23.ZeroSide.TightMult
import Zeta23.XiPrime.Final
import Zeta23.PairCeiling.CeilingLaw256
import Zeta23.PairCeiling.Signed
103 changes: 103 additions & 0 deletions zeta23/Zeta23/Analytic/BacklundInduction.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/-
Copyright (c) 2026 Anthropic, PBC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
SPDX-License-Identifier: Apache-2.0
-/
/-
Shared Backlund induction: bound |Im ∫ logDeriv f| by splitting at Re-zeros.
Used by Zeta23/RvM/Backlund.lean (f = riemannZeta) and Zeta23/ThmE/BacklundChi.lean
(f = χ.LFunction).
-/
import Mathlib.Analysis.SpecialFunctions.Integrals.Basic
import Mathlib.NumberTheory.LSeries.RiemannZeta

open Complex Set MeasureTheory Real intervalIntegral

noncomputable section

namespace Zeta23
namespace Analytic

/-- Induction on the number of Re-zeros of `f(· + iT)` in `(u,v) ⊆ [1/2,2]`. -/
lemma im_integral_logDeriv_le_aux_of {f : ℂ → ℂ} {T : ℝ}
(hbase : ∀ u v : ℝ, 1 / 2 ≤ u → u < v → v ≤ 2 →
(∀ σ ∈ Set.Ioo u v, (f (σ + T * I)).re ≠ 0) →
|(∫ σ in u..v, logDeriv f (σ + T * I)).im| ≤ 2 * Real.pi)
(hint : ∀ {u v : ℝ}, u ∈ Set.Icc (1 / 2 : ℝ) 2 → v ∈ Set.Icc (1 / 2 : ℝ) 2 →
IntervalIntegrable (fun σ : ℝ => logDeriv f (σ + T * I)) volume u v)
(P : Finset ℝ) (hP : ∀ σ ∈ Set.Icc (1 / 2 : ℝ) 2, (f (σ + T * I)).re = 0 → σ ∈ P) :
∀ n : ℕ, ∀ u v : ℝ, 1 / 2 ≤ u → u < v → v ≤ 2 →
(P.filter (fun x => u < x ∧ x < v)).card ≤ n →
|(∫ σ in u..v, logDeriv f (σ + T * I)).im|
≤ 2 * Real.pi * ((P.filter (fun x => u < x ∧ x < v)).card + 1) := by
have base : ∀ u v : ℝ, 1 / 2 ≤ u → u < v → v ≤ 2 →
(P.filter (fun x => u < x ∧ x < v)).card = 0 →
|(∫ σ in u..v, logDeriv f (σ + T * I)).im|
≤ 2 * Real.pi * ((P.filter (fun x => u < x ∧ x < v)).card + 1) := by
intro u v hu huv hv hc
have hno : ∀ σ ∈ Set.Ioo u v, (f (σ + T * I)).re ≠ 0 := by
intro σ hσ hre
have hσP : σ ∈ P.filter (fun x => u < x ∧ x < v) :=
Finset.mem_filter.mpr ⟨hP σ ⟨by linarith [hσ.1], by linarith [hσ.2]⟩ hre, hσ.1, hσ.2⟩
rw [Finset.card_eq_zero] at hc
simp [hc] at hσP
rw [hc]
simpa using hbase u v hu huv hv hno
intro n
induction n with
| zero =>
intro u v hu huv hv hc
exact base u v hu huv hv (Nat.le_zero.mp hc)
| succ n ih =>
intro u v hu huv hv hc
by_cases hc0 : (P.filter (fun x => u < x ∧ x < v)).card = 0
· exact base u v hu huv hv hc0
obtain ⟨m, hm⟩ := Finset.card_pos.mp (Nat.pos_of_ne_zero hc0)
obtain ⟨-, hum, hmv⟩ := Finset.mem_filter.mp hm
set S := P.filter (fun x => u < x ∧ x < v) with hSdef
set S₁ := P.filter (fun x => u < x ∧ x < m) with hS₁def
set S₂ := P.filter (fun x => m < x ∧ x < v) with hS₂def
have hdisj : Disjoint S₁ S₂ := by
rw [Finset.disjoint_left]
intro x hx1 hx2
have := (Finset.mem_filter.mp hx1).2.2
have := (Finset.mem_filter.mp hx2).2.1
linarith
have hsubS : S₁ ∪ S₂ ⊆ S.erase m := by
intro x hx
rw [Finset.mem_erase]
rcases Finset.mem_union.mp hx with hx | hx
· obtain ⟨hxP, hux, hxm⟩ := Finset.mem_filter.mp hx
exact ⟨hxm.ne, Finset.mem_filter.mpr ⟨hxP, hux, by linarith⟩⟩
· obtain ⟨hxP, hmx, hxv⟩ := Finset.mem_filter.mp hx
exact ⟨hmx.ne', Finset.mem_filter.mpr ⟨hxP, by linarith, hxv⟩⟩
have hcard : S₁.card + S₂.card + 1 ≤ S.card := by
have h1 : S₁.card + S₂.card = (S₁ ∪ S₂).card := (Finset.card_union_of_disjoint hdisj).symm
have h2 : (S₁ ∪ S₂).card ≤ (S.erase m).card := Finset.card_le_card hsubS
have h3 : (S.erase m).card = S.card - 1 := Finset.card_erase_of_mem hm
have h4 : 1 ≤ S.card := Finset.card_pos.mpr ⟨m, hm⟩
omega
have hc1 : S₁.card ≤ n := by omega
have hc2 : S₂.card ≤ n := by omega
have e1 := ih u m hu hum (by linarith) hc1
have e2 := ih m v (by linarith) hmv hv hc2
have hmI : m ∈ Set.Icc (1 / 2 : ℝ) 2 := ⟨by linarith, by linarith⟩
have huI : u ∈ Set.Icc (1 / 2 : ℝ) 2 := ⟨hu, by linarith⟩
have hvI : v ∈ Set.Icc (1 / 2 : ℝ) 2 := ⟨by linarith, hv⟩
rw [← intervalIntegral.integral_add_adjacent_intervals (hint huI hmI) (hint hmI hvI),
Complex.add_im]
have hcast : ((S₁.card : ℝ) + 1) + ((S₂.card : ℝ) + 1) ≤ (S.card : ℝ) + 1 := by
have : ((S₁.card + S₂.card + 1 : ℕ) : ℝ) ≤ (S.card : ℝ) := by exact_mod_cast hcard
push_cast at this; linarith
calc |(∫ σ in u..m, logDeriv f (σ + T * I)).im
+ (∫ σ in m..v, logDeriv f (σ + T * I)).im|
≤ |(∫ σ in u..m, logDeriv f (σ + T * I)).im|
+ |(∫ σ in m..v, logDeriv f (σ + T * I)).im| := abs_add_le _ _
_ ≤ 2 * Real.pi * ((S₁.card : ℝ) + 1) + 2 * Real.pi * ((S₂.card : ℝ) + 1) :=
add_le_add e1 e2
_ ≤ 2 * Real.pi * ((S.card : ℝ) + 1) := by nlinarith [Real.pi_pos]

end Analytic
end Zeta23

end
95 changes: 61 additions & 34 deletions zeta23/Zeta23/Analytic/RectangleLogDeriv.lean
Original file line number Diff line number Diff line change
Expand Up @@ -181,20 +181,9 @@ theorem rectangleIntegral'_mul_logDeriv_of_poles {f g : ℂ → ℂ} {z w : ℂ}
have hZmem : ∀ ρ ∈ Z, ρ ∈ Rectangle z w \ (P : Set ℂ) := fun ρ hρ =>
⟨hZsub hρ, by simpa using hZnotP ρ hρ⟩
-- zeros are interior points
have hZint : ∀ ρ ∈ Z, Rectangle z w ∈ 𝓝 ρ := by
intro ρ hρ
have hρR : ρ ∈ Rectangle z w := hZsub hρ
have hρB : ρ ∉ RectangleBorder z w := fun h => hborder ρ h ((hZ ρ (hZmem ρ hρ)).mpr hρ)
obtain ⟨h1, h2⟩ := hρR
have h1' : z.re ≤ ρ.re ∧ ρ.re ≤ w.re := by simpa [uIcc_of_le hre] using h1
have h2' : z.im ≤ ρ.im ∧ ρ.im ≤ w.im := by simpa [uIcc_of_le him] using h2
simp only [RectangleBorder, mem_union, mem_reProdIm, mem_singleton_iff, not_or] at hρB
obtain ⟨⟨⟨hb1, hb2⟩, hb3⟩, hb4⟩ := hρB
rw [rectangle_mem_nhds_iff, mem_reProdIm, uIoo_of_le hre, uIoo_of_le him]
refine ⟨⟨lt_of_le_of_ne h1'.1 (fun h => hb2 ⟨h.symm, h2⟩),
lt_of_le_of_ne h1'.2 (fun h => hb4 ⟨h, h2⟩)⟩,
⟨lt_of_le_of_ne h2'.1 (fun h => hb1 ⟨h1, h.symm⟩),
lt_of_le_of_ne h2'.2 (fun h => hb3 ⟨h1, h⟩)⟩⟩
have hZint : ∀ ρ ∈ Z, Rectangle z w ∈ 𝓝 ρ := fun ρ hρ =>
rectangle_mem_nhds_of_mem_of_not_mem_border hre him (hZsub hρ)
(fun h => hborder ρ h ((hZ ρ (hZmem ρ hρ)).mpr hρ))
-- residues: +ord·g at zeros, −m·g at poles
let A : ℂ → ℂ := fun q => if q ∈ P then -((m q : ℂ) * g q) else (analyticOrderNatAt f q : ℂ) * g q
have hint : ∀ q ∈ Z ∪ P, Rectangle z w ∈ 𝓝 q := by
Expand Down Expand Up @@ -360,27 +349,65 @@ theorem rectangleIntegral'_mul_logDeriv {f g : ℂ → ℂ} {z w : ℂ} (hre : z
(by simp) (by simpa using hf) hg hborder (by simpa using hZ) hZsub (fun _ => 0) (by simp)
simpa using h

/-- **Weighted argument principle, self-contained form**: as `rectangleIntegral'_mul_logDeriv`, with
the finite zero set produced rather than supplied. -/
theorem rectangleIntegral'_mul_logDeriv' {f g : ℂ → ℂ} {z w : ℂ} (hre : z.re ≤ w.re)
(him : z.im ≤ w.im)
(hf : AnalyticOnNhd ℂ f (Rectangle z w)) (hg : AnalyticOnNhd ℂ g (Rectangle z w))
(hborder : ∀ s ∈ RectangleBorder z w, f s ≠ 0) :
RectangleIntegral' (fun s => g s * logDeriv f s) z w
= ∑ ρ ∈ (finite_zeros_rectangle hf (rectangleBorder_subset_rectangle z w
(show z ∈ RectangleBorder z w from Or.inl (Or.inl (Or.inl ⟨left_mem_uIcc, rfl⟩))))
(hborder z (Or.inl (Or.inl (Or.inl ⟨left_mem_uIcc, rfl⟩))))).toFinset,
(analyticOrderNatAt f ρ : ℂ) * g ρ := by
/-- **Strip zero count as a contour integral**: for any function `f` analytic on `[-1, 2] × [T₁, T₂]`
whose zeros `P` all lie in `0 < Re s < 1`, have finite intersection with `(T₁, T₂]`, and avoid the
horizontal edges `Im s = T₁, T₂`, `(1/2πi) ∮_{∂([-1,2]×[T₁,T₂])} f'/f = ∑_{ρ ∈ P, T₁ < Im ρ ≤ T₂} mult ρ`. -/
theorem rectangleIntegral'_logDeriv_strip_eq_finsum {f : ℂ → ℂ} {P : ℂ → Prop} {mult : ℂ → ℕ}
{T₁ T₂ : ℝ} (hT : T₁ ≤ T₂)
(hf : AnalyticOnNhd ℂ f (Rectangle (-1 + T₁ * I) (2 + T₂ * I)))
(hfin : ({ρ | P ρ} ∩ {ρ | T₁ < ρ.im ∧ ρ.im ≤ T₂}).Finite)
(hzero : ∀ s, f s = 0 ↔ P s)
(hstrip : ∀ ρ, P ρ → 0 < ρ.re ∧ ρ.re < 1)
(hgood₁ : ∀ ρ, P ρ → ρ.im ≠ T₁)
(hgood₂ : ∀ ρ, P ρ → ρ.im ≠ T₂)
(hmult : ∀ ρ, P ρ → analyticOrderNatAt f ρ = mult ρ) :
RectangleIntegral' (logDeriv f) (-1 + T₁ * I) (2 + T₂ * I)
= ((∑ᶠ ρ ∈ {ρ | P ρ} ∩ {ρ | T₁ < ρ.im ∧ ρ.im ≤ T₂}, mult ρ : ℕ) : ℂ) := by
classical
set hfin := finite_zeros_rectangle hf (rectangleBorder_subset_rectangle z w
(show z ∈ RectangleBorder z w from Or.inl (Or.inl (Or.inl ⟨left_mem_uIcc, rfl⟩))))
(hborder z (Or.inl (Or.inl (Or.inl ⟨left_mem_uIcc, rfl⟩))))
refine rectangleIntegral'_mul_logDeriv hre him hf hg hborder hfin.toFinset ?_ ?_
· intro s hs
simp [Set.Finite.mem_toFinset, hs]
· intro s hs
exact ((Set.Finite.mem_toFinset _).mp hs).1

set z : ℂ := -1 + T₁ * I with hzdef
set w : ℂ := 2 + T₂ * I with hwdef
have hzre : z.re = -1 := by simp [z]
have hzim : z.im = T₁ := by simp [z]
have hwre : w.re = 2 := by simp [w]
have hwim : w.im = T₂ := by simp [w]
have hre : z.re ≤ w.re := by rw [hzre, hwre]; norm_num
have him : z.im ≤ w.im := by rw [hzim, hwim]; exact hT
have hmem : ∀ s : ℂ, s ∈ Rectangle z w ↔
(-1 ≤ s.re ∧ s.re ≤ 2) ∧ (T₁ ≤ s.im ∧ s.im ≤ T₂) := by
intro s
simp only [Rectangle, mem_reProdIm, hzre, hzim, hwre, hwim,
uIcc_of_le (show (-1 : ℝ) ≤ 2 by norm_num), uIcc_of_le hT, mem_Icc]
have hg : AnalyticOnNhd ℂ (fun _ : ℂ => (1 : ℂ)) (Rectangle z w) := fun _ _ => analyticAt_const
have hZ : ∀ s ∈ Rectangle z w, f s = 0 ↔ s ∈ hfin.toFinset := by
intro s hs
rw [Set.Finite.mem_toFinset]
obtain ⟨_, hi1, hi2⟩ := (hmem s).mp hs
rw [hzero]
exact ⟨fun hp => ⟨hp, lt_of_le_of_ne hi1 (fun h' => hgood₁ s hp h'.symm), hi2⟩, fun h => h.1⟩
have hZsub : ((hfin.toFinset : Finset ℂ) : Set ℂ) ⊆ Rectangle z w := by
intro s hs
rw [Finset.mem_coe, Set.Finite.mem_toFinset] at hs
obtain ⟨hp, hi1, hi2⟩ := hs
obtain ⟨h1, h2⟩ := hstrip s hp
exact (hmem s).mpr ⟨⟨by linarith, by linarith⟩, hi1.le, hi2⟩
have hborder : ∀ s ∈ RectangleBorder z w, f s ≠ 0 := by
intro s hs h0
have hp := (hzero s).mp h0
obtain ⟨h1, h2⟩ := hstrip s hp
simp only [RectangleBorder, mem_union, mem_reProdIm, mem_singleton_iff, hzre, hzim, hwre,
hwim] at hs
rcases hs with ((⟨_, h'⟩ | ⟨h', _⟩) | ⟨_, h'⟩) | ⟨h', _⟩
· exact hgood₁ s hp h'
· linarith
· exact hgood₂ s hp h'
· linarith
have key := rectangleIntegral'_mul_logDeriv hre him hf hg hborder hfin.toFinset hZ hZsub
simp only [one_mul, mul_one] at key
rw [show (fun s => logDeriv f s) = logDeriv f from rfl] at key
rw [key, finsum_mem_eq_finite_toFinset_sum _ hfin, Nat.cast_sum]
refine Finset.sum_congr rfl fun ρ hρ => ?_
rw [Set.Finite.mem_toFinset] at hρ
rw [hmult ρ hρ.1]

end Analytic
end Zeta23
Loading