Skip to content

Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.

Python

doc(New/Determinant/AuxiliaryForms): add docstrings in PathData

sangxshc25a06c44a2f
diff --git a/src/New/Determinant/AuxiliaryForms/PathData.lean b/src/New/Determinant/AuxiliaryForms/PathData.lean
index 3f71be57ac2..3a658bb626d 100644
--- a/src/New/Determinant/AuxiliaryForms/PathData.lean
+++ b/src/New/Determinant/AuxiliaryForms/PathData.lean
@@ -133,6 +133,7 @@ abbrev reduceToTriangle (z : Bool) :
NumberField.RingOfIntegers D.E ⧸ (triangleModulus z ϑ).ideal :=
factor (gridModulus_ideal_le_triangleModulus_ideal ϑ z)
+/-- The generator `D.piM` divides `D.gridLevelGen`. -/
lemma piM_dvd_gridLevelGen : D.piM ∣ D.gridLevelGen := dvd_pow_self _ (NeZero.ne _)
end GridModuli
@@ -326,10 +327,13 @@ def transposedChain (z : Bool) (b : ℕ) : D.GridForm z 0 D.m →ₗ[ℂ] D.Grid
else
0
+/-- For `b < D.m`, the chain `transposedChain ϑ z b` is the transposed lift `pointTransposedLift ϑ z
+b` after `transposedChain ϑ z (b + 1)`. -/
lemma transposedChain_of_lt (hb : b < D.m) :
transposedChain ϑ z b = pointTransposedLift ϑ z b ∘ₗ transposedChain ϑ z (b + 1) := by
rw [transposedChain, ite_eq_left hb]
+/-- The chain `transposedChain ϑ z D.m` is the identity. -/
lemma transposedChain_self : transposedChain ϑ z D.m = LinearMap.id := by
rw [transposedChain, ite_eq_right (lt_irrefl _), dite_eq_left rfl]
@@ -424,14 +428,19 @@ namespace IsSumOfRootsOfUnity
variable {N N' : ℕ} {z u : ℂ}
+/-- Zero is a sum of at most `N` roots of unity. -/
lemma zero : IsSumOfRootsOfUnity N 0 := ⟨0, by simp, by simp, rfl⟩
+/-- A number of finite order is a sum of at most `1` root of unity. -/
lemma of_isOfFinOrder (hu : IsOfFinOrder u) : IsSumOfRootsOfUnity 1 u :=
⟨{u}, by simp, by simpa using hu, by simp⟩
+/-- A sum of at most `N` roots of unity is a sum of at most `N'` roots of unity if `N ≤ N'`. -/
lemma mono (hz : IsSumOfRootsOfUnity N z) (hN : N ≤ N') : IsSumOfRootsOfUnity N' z :=
hz.imp fun _ hs ↦ ⟨hs.1.trans hN, hs.2⟩
+/-- Multiplying a sum of at most `N` roots of unity by a number of finite order gives a sum of at
+most `N` roots of unity. -/
lemma mul_left (hz : IsSumOfRootsOfUnity N z) (hu : IsOfFinOrder u) :
IsSumOfRootsOfUnity N (u * z) := by
obtain ⟨s, h_card, h_root, rfl⟩ := hz
@@ -548,6 +557,7 @@ structure IsPathDatum (N : ℕ) (w : Finset (GridNode × GridNode)) (Ψ : EdgeTu
/-- (iii) The values of `Ψ` are sums of at most `N` roots of unity. -/
isSumOfRootsOfUnity (S : EdgeTuple ϑ) : IsSumOfRootsOfUnity N (Ψ S)
+/-- A path datum with bound `N` is a path datum with any larger bound `N'`. -/
lemma IsPathDatum.mono {N N' : ℕ} {Ψ : EdgeTuple ϑ → ℂ} (hΨ : IsPathDatum N w Ψ) (hN : N ≤ N') :
IsPathDatum N' w Ψ :=
{ hΨ with isSumOfRootsOfUnity S := (hΨ.isSumOfRootsOfUnity S).mono hN }
@@ -560,6 +570,7 @@ lemma edgeCharProd_mul (g g' : NodeFamily ϑ) (w : Finset (GridNode × GridNode)
refine prod_congr rfl fun e _ ↦ ?_
simp only [Pi.mul_apply, MonoidHom.map_mul, mul_div_mul_comm, Units.val_mul]
+/-- The factor `New.Data.edgeCharProd` has finite order. -/
lemma isOfFinOrder_edgeCharProd (g : NodeFamily ϑ) (w : Finset (GridNode × GridNode)) :
IsOfFinOrder (edgeCharProd g w) :=
(CommMonoid.torsion ℂ).prod_mem fun e _ ↦
@@ -572,10 +583,12 @@ lemma tupleAction_mul (g g' : NodeFamily ϑ) (S : EdgeTuple ϑ) :
funext e
simp [tupleAction, Matrix.mul_assoc]
+/-- The identity family acts trivially on tuples. -/
lemma tupleAction_one (S : EdgeTuple ϑ) : tupleAction 1 S = S := by
funext e
simp [tupleAction]
+/-- A tuple lies in `tuplesOn ϑ w` if and only if it vanishes at every edge not in `w`. -/
lemma mem_tuplesOn : S ∈ tuplesOn ϑ w ↔ ∀ e : GridNode × GridNode, e ∉ w → S e = 0 := by
simp only [tuplesOn, mem_image, mem_univ, true_and]
refine ⟨?_, fun hS ↦ ⟨fun e ↦ S e, funext fun e ↦ ?_⟩⟩
@@ -583,6 +596,7 @@ lemma mem_tuplesOn : S ∈ tuplesOn ϑ w ↔ ∀ e : GridNode × GridNode, e ∉
simp [updateFinset, he]
· by_cases he : e ∈ w <;> simp [updateFinset, he, hS e]
+/-- The only tuple supported on the empty set of edges is `0`. -/
lemma tuplesOn_empty : tuplesOn ϑ ∅ = {0} := by
ext S
simp [mem_tuplesOn, funext_iff]